Error building libgcc: missing setting for CPP
Paul Smith
psmith@gnu.org
Mon Jan 23 04:48:00 GMT 2012
Hi all. So, I'm trying to build a cross-compiler (on GNU/Linux) suite
from GCC 4.6.2, which includes a number of build utilities including GCC
and its libraries, binutils of course, make, gdb, fakeroot, bison, flex.
I have a makefile that did this for me and I was able to get it to work,
a year or two ago, with GCC 4.2.4, although I had to whack a few things.
Now I'm trying to update the environment with all the latest stuff,
removing the hacks as hopefully I won't need them. I've gotten things
moving but I'm seeing two persistent problems. The one I want to
discuss here is:
During the compilation of GCC 4.6.2, when it gets to build libgcc, the
configure is bailing on me:
checking whether ln -s works... yes
checking for x86_64-generic-linux-gnu-gcc... /usr/src/gcc/obj-base/gcc/./gcc/xgcc \
-B/usr/src/gcc/obj-base/gcc/./gcc/ -B/tmp/invalid/generic/x86_64-generic-linux-gnu/bin/ \
-B/tmp/invalid/generic/x86_64-generic-linux-gnu/lib/ \
-isystem /tmp/invalid/generic/x86_64-generic-linux-gnu/include \
-isystem /tmp/invalid/generic/x86_64-generic-linux-gnu/sys-include \
--sysroot=/tmp/invalid/rhel5/sysroot
checking for suffix of object files... configure: error: in `/usr/src/gcc/obj-base/gcc/x86_64-generic-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[3]: *** [configure-target-libgcc] Error 1
make[3]: Leaving directory `/usr/src/gcc/obj-base/gcc'
Looking
at /usr/src/gcc/obj-base/gcc/x86_64-generic-linux-gnu/libgcc/config.log,
I get this error:
configure:3246: checking for suffix of object files
configure:3268: /usr/src/gcc/obj-base/gcc/./gcc/xgcc -B/usr/src/gcc/obj-base/gcc/./gcc/ \
-B/tmp/invalid/generic/x86_64-generic-linux-gnu/bin/ \
-B/tmp/invalid/generic/x86_64-generic-linux-gnu/lib/ \
-isystem /tmp/invalid/generic/x86_64-generic-linux-gnu/include \
-isystem /tmp/invalid/generic/x86_64-generic-linux-gnu/sys-include \
--sysroot=/tmp/invalid/rhel5/sysroot -c -g -O2 conftest.c >&5
/usr/src/gcc/obj-base/gcc/./gcc/as: line 87: exec: --: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
configure:3272: $? = 1
If I check the "as" shell script, I can see that the "ORIGINAL_*" values
are all empty:
ORIGINAL_AS_FOR_TARGET=""
ORIGINAL_LD_FOR_TARGET=""
ORIGINAL_PLUGIN_LD_FOR_TARGET=""
ORIGINAL_NM_FOR_TARGET=""
and so when we get to:
case "$invoked" in
as)
original=$ORIGINAL_AS_FOR_TARGET
prog=as-new$exeext
dir=gas
;;
$original is empty, and then later:
exec $original ${1+"$@"}
we exec just the arguments, causing this problem.
I can't figure out where this is going wrong. Can someone point me to
where these values (ORIGINAL_AS_FOR_TARGET etc.) are supposed to be set?
--
-------------------------------------------------------------------------------
Paul D. Smith <psmith@gnu.org> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
More information about the Gcc-help
mailing list