Gentoo Archives: gentoo-embedded

From: Christopher Friedt <chrisfriedt@×××××.com>
To: gentoo-embedded@l.g.o
Subject: [gentoo-embedded] autotools: stage1 cross C compiler cannot create executables
Date: Fri, 19 Oct 2012 00:36:48
Message-Id: CAF4BF-QF0a_-ocH5NNTB6-FL+=99rKs3Ai64svjiNgK99ojO8w@mail.gmail.com
1 Here's another random question from me, for all of the experts on the list ;-)
2
3 This one is related to Makefile.am configure.ac - autotools.
4
5 I've produced a stage1 cross compiler. I do not yet have a full libc -
6 just headers - crt files do not exist, so I can't create an
7 executable. But I would like to compile my libc, and I've decided to
8 use autotools for some crazy reason. This is a small C library that
9 I've written (including all the necessary crt files) so the problem
10 isn't specific to glibc, although I do recall having run into this one
11 before.
12
13 The only problem with autotools and using a stage1 compiler, is that
14 the macro AC_PROG_CC in configure.ac always dies because the compiler
15 tries to link main to a fully-fledged executable can't find the crt
16 files yet.
17
18 Is there some kind of auto-magical autoconf incantation that only
19 checks to see if the compiler can simply compile (and not necessarily
20 link)?
21
22 For some reason, AC_<blank>_<blank>_CHECK comes to mind, but I could
23 just be senile.
24
25 PS: the only justification I have for inquiring on #gentoo-embedded is
26 because I'm building my package with emerge and it happens to be for a
27 cross-toolchain built with crossdev :)

Replies