Arm multilibs broken revisited

Dave Murphy wintermute2k4@ntlworld.com
Tue Jul 31 19:30:00 GMT 2007


Hi

I'm now experiencing the broken multilibs problem on a mingw host as 
mentioned in this post 
http://www.cygwin.com/ml/newlib/2007/msg00487.html and this one 
http://sourceware.org/ml/newlib/2006/msg00502.html

Previously I only experienced the problem with a freeBSD host but since 
trying to build a toolchain including gcc 4.2.1 the 
<builddir>/newlib/targ-include dir isn't being created and populated 
before building the first set of libraries. This works with the same 
build setup for gcc 4.1.x

I added an error directive in init.c to force a failure when 
HAVE_INITFINI_ARRAY is not defined. This is quite blatently defined in 
the generated newlib.h but the -isystem path being used does not exist 
at the point of failure.
 
arm-eabi-gcc -B/d/projects/devkitPro/test/build/newlib/arm-eabi/newlib/ 
-isystem 
/d/projects/devkitPro/test/build/newlib/arm-eabi/newlib/targ-include 
-isystem 
/d/projects/devkitPro/test/newlib-1.15.0-new/newlib/libc/include 
-DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" 
-DPACKAGE_VERSION=\"1.15.0\" -DPACKAGE_STRING=\"newlib\ 1.15.0\" 
-DPACKAGE_BUGREPORT=\"\"  -I. 
-I/d/projects/devkitPro/test/newlib-1.15.0-new/newlib/libc/misc -O2 
-D__NO_SYSCALLS__ -fno-builtin      -O2 -DREENTRANT_SYSCALLS_PROVIDED   
-mthumb -c -o lib_a-init.o `test -f 'init.c' || echo 
'/d/projects/devkitPro/test/newlib-1.15.0-new/newlib/libc/misc/'`init.c
d:/projects/devkitPro/test/newlib-1.15.0-new/newlib/libc/misc/init.c:62:2: 
error: #error why am I not defined
make[8]: *** [lib_a-init.o] Error 1


My complete build log up to the error can be downloaded from 
http://devkitpro.sf.net/newlib-build-log.zip

What else can I do to figure out why this is failing?

I get the impression that something is changing the build order of the 
libraries. Jeff's posts imply that the top level -marm libraries should 
be built first which would populate the -isystem path.

I've also tried to force the makefile rule that populates targ-include 
to copy the files to the appropriate place but I can't seem to find a 
variable with the required full path.



Dave



More information about the Newlib mailing list