简体   繁体   English

构建libc(newlib)结果为“找不到-lc”

[英]Building libc (newlib) results in “cannot find -lc”

I built a cross-compiler for sh3eb-elf targets. 我为sh3eb-elf目标构建了一个交叉编译器。 Now I need a libc implementation. 现在,我需要一个libc实现。 However, when I want to build newlib , configure fails. 但是,当我要构建newlib时configure失败。

Running configure: 运行配置:

../newlib-cygwin/configure --host=sh3eb-elf

It fails. 它失败。 A quick look into config.log : 快速浏览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

Obviously the linker does not find libc which is what I am trying to build here in the first place. 显然,链接器找不到libc ,这是我首先要在此处构建的。 I am confused... Are the parameters of configure wrong? 我很困惑... configure的参数是否错误?

我不确定为什么,但是正如Chrono Kitsune指出的那样,使用--target=sh3eb-elf可以解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM