autoconf
[Top][All Lists]
Advanced

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

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


From: Ineiev
Subject: Re: Autoconf and a bare-metal host with no C library
Date: Fri, 14 Oct 2016 03:16:49 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]