This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

xgcc and -isystem switch behavior

Hi there,

target = arm-elf
host = solaris 2.6
Tools to be compiled = Gcc 3.04 (1st in native then the cross comp) + newlib 1.10 (like glibc) + binutils 2.11
Prefix = same for all the products

During the compilation of the cross compiler,  we got : (I removed the -I -B -L arguments so its clear)

---> /home/mklein/gcc-3.0.4_build/gcc/xgcc [..vatious switch and dir.....] -isystem /home/mklein/gcc/arm-elf/include
../gcc-3.0.4_src/libstdc++-v3/libsupc++/ -o eh_alloc.o

Which gives an error

---> In file included from /home/mklein/gcc-3.0.4_build/arm-elf/libstdc++-v3/include/cstdlib:31,
--->    from ../../../../gcc-3.0.4_src/libstdc++-v3/libsupc++/
--->/home/mklein/gcc-3.0.4_build/arm-elf/libstdc++-v3/include/bits/std_cstdlib.h:75: `div_t'
--->    not declared
---> [ ....]

It happens obviously because the compiler doesn't use the good sdtlib.h

It uses the stdlib.h of gcc-3.0.4_build/gcc/include instead of using the one specified by the -isystem switch (this
switch was specified by the makefile of gcc)

Ok, it's easy to fix, I just rename

gcc-3.0.4_build/gcc/include/stdlib.h  to
gcc-3.0.4_build/gcc/include/_stdlib.h so/home/mklein/gcc/arm-elf/include/    sdtlib.h is used instead.

Question is:

- Any idea how to fix that correctly so its done automatically by the main
makefiles ? (instead of stopping the makefile, hacking and changing the stdlib.h etc .. )
- Is that a bug or did I miss something ? Or maybe it's normal, I just fix it like I did and I
don't worry ?

Thanks for your opinion,

Best Regards.

Matthieu Klein

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]