Re: Autoconf and a bare-metal host with no C library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Thu, Oct 13, 2016 at 04:11:47AM +0200, Luca Saiu wrote:
>
> So the problem is simple: as soon as I add
>
> --8<---------------cut here---------------start------------->8---
> AC_PROG_CC
> --8<---------------cut here---------------end--------------->8---
>
> to configure.ac, the generated configure fails with
>
> --8<---------------cut here---------------start------------->8---
> configure: error: C compiler cannot create executables
> See `config.log' for more details
> --8<---------------cut here---------------end--------------->8---
>
> , which is not very surprising.  The C compiler indeed cannot generate
> standalone programs, without crt0.o .

When I wrote a libc-less ARM-based project [0], I set linker flags
before AC_PROG_CC, like

LIBS=-lgcc
LDFLAGS="${LDFLAGS} -nostdlib -static -T./2138.ld boot.o"
AC_PROG_CC

[0] https://savannah.nongnu.org/p/stribog (the ARM-specific
part is in the sw/target directory).

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux