我为 sh3eb-elf
目标构建了一个交叉编译器。现在我需要一个 libc 实现。但是,当我想构建newlib时,配置
失败。
运行配置:
../newlib-cygwin/configure --host=sh3eb-elf
失败了。快速浏览一下 config.log
:
configure:4435: sh3eb-elf-gcc conftest.c >&5
[...]/sh3eb-elf/sh3eb-elf/lib/gcc/sh3eb-elf/8.1.0/../../../../sh3eb-elf/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
configure:4439: $? = 1
显然链接器找不到libc,这正是我首先要在这里构建的。我很困惑...configure
的参数是否错误?
最佳答案
我不知道为什么,但正如 Chrono Kitsune 指出的那样,使用 --target=sh3eb-elf
可以解决问题。
关于c - 构建 libc (newlib) 结果为 "cannot find -lc",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51910120/