public inbox for gentoo-embedded@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-embedded] autotools: stage1 cross C compiler cannot create executables
@ 2012-10-18 22:56 Christopher Friedt
  2012-10-20 17:01 ` Mike Frysinger
  0 siblings, 1 reply; 3+ messages in thread
From: Christopher Friedt @ 2012-10-18 22:56 UTC (permalink / raw
  To: gentoo-embedded

Here's another random question from me, for all of the experts on the list ;-)

This one is related to Makefile.am configure.ac - autotools.

I've produced a stage1 cross compiler. I do not yet have a full libc -
just headers - crt files do not exist, so I can't create an
executable. But I would like to compile my libc, and I've decided to
use autotools for some crazy reason. This is a small C library that
I've written (including all the necessary crt files) so the problem
isn't specific to glibc, although I do recall having run into this one
before.

The only problem with autotools and using a stage1 compiler, is that
the macro AC_PROG_CC in configure.ac always dies because the compiler
tries to link main to a fully-fledged executable can't find the crt
files yet.

Is there some kind of auto-magical autoconf incantation that only
checks to see if the compiler can simply compile (and not necessarily
link)?

For some reason, AC_<blank>_<blank>_CHECK comes to mind, but I could
just be senile.

PS: the only justification I have for inquiring on #gentoo-embedded is
because I'm building my package with emerge and it happens to be for a
cross-toolchain built with crossdev :)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-embedded] autotools: stage1 cross C compiler cannot create executables
  2012-10-18 22:56 [gentoo-embedded] autotools: stage1 cross C compiler cannot create executables Christopher Friedt
@ 2012-10-20 17:01 ` Mike Frysinger
  2012-10-22  1:23   ` Christopher Friedt
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2012-10-20 17:01 UTC (permalink / raw
  To: gentoo-embedded; +Cc: Christopher Friedt

[-- Attachment #1: Type: Text/Plain, Size: 608 bytes --]

On Thursday 18 October 2012 18:56:20 Christopher Friedt wrote:
> The only problem with autotools and using a stage1 compiler, is that
> the macro AC_PROG_CC in configure.ac always dies because the compiler
> tries to link main to a fully-fledged executable can't find the crt
> files yet.
> 
> Is there some kind of auto-magical autoconf incantation that only
> checks to see if the compiler can simply compile (and not necessarily
> link)?

glibc puts into its aclocal.m4:
dnl These modifications are to allow for an empty cross compiler tree.
define([_AC_COMPILER_EXEEXT], [EXEEXT=
])
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-embedded] autotools: stage1 cross C compiler cannot create executables
  2012-10-20 17:01 ` Mike Frysinger
@ 2012-10-22  1:23   ` Christopher Friedt
  0 siblings, 0 replies; 3+ messages in thread
From: Christopher Friedt @ 2012-10-22  1:23 UTC (permalink / raw
  To: gentoo-embedded

awesome - thanks.

I'll give this a shot tomorrow.

On Sat, Oct 20, 2012 at 1:01 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Thursday 18 October 2012 18:56:20 Christopher Friedt wrote:
>> The only problem with autotools and using a stage1 compiler, is that
>> the macro AC_PROG_CC in configure.ac always dies because the compiler
>> tries to link main to a fully-fledged executable can't find the crt
>> files yet.
>>
>> Is there some kind of auto-magical autoconf incantation that only
>> checks to see if the compiler can simply compile (and not necessarily
>> link)?
>
> glibc puts into its aclocal.m4:
> dnl These modifications are to allow for an empty cross compiler tree.
> define([_AC_COMPILER_EXEEXT], [EXEEXT=
> ])
> -mike


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-22  3:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-18 22:56 [gentoo-embedded] autotools: stage1 cross C compiler cannot create executables Christopher Friedt
2012-10-20 17:01 ` Mike Frysinger
2012-10-22  1:23   ` Christopher Friedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox