libstdc++ breakage when overriding system headers
Jonathan Larmour
jlarmour@redhat.com
Wed Aug 22 02:29:00 GMT 2001
For various reasons, I need to override the system headers with different
ones. I can guarantee that the binary interface to the already built
libstdc++ would be the same. However it seems impossible to do.
For example:
In file included from
/home/jlarmour/sourceware/test/arm-elf/include/g++-v3/bits/std_ctime.h:40,
from
/home/jlarmour/sourceware/test/arm-elf/include/g++-v3/bits/locale_facets.h:41,
from
/home/jlarmour/sourceware/test/arm-elf/include/g++-v3/bits/basic_ios.h:36,
from
/home/jlarmour/sourceware/test/arm-elf/include/g++-v3/bits/std_ios.h:46,
from
/home/jlarmour/sourceware/test/arm-elf/include/g++-v3/bits/std_ostream.h:39,
from
/home/jlarmour/sourceware/test/arm-elf/include/g++-v3/bits/std_iostream.h:40,
from
/home/jlarmour/sourceware/test/arm-elf/include/g++-v3/iostream:31,
from
/home/jlarmour/cpp/language/c++/libstdc++/current/tests/cout.cxx:69:
/home/jlarmour/sourceware/test/arm-elf/H-i686-pc-linux-gnu/arm-elf/include/time.h:35:
redefinition
of `struct tm'
/export/pot/ecc-obj/arm/ebsa/install/include/cyg/libc/time/time.h:59:
previous
definition of `struct tm'
The problem is that std_ctime.h has #include_next'd <time.h>. However even
by using -isystem there is no way to stop it finding the "wrong" headers -
it will merrily continue to the headers in $EXEC_PREFIX/arm-elf/include
regardless.
Using -I and -isystem is documented in GCC as a way to override the system
headers, but libstdc++ makes it impossible. What needs to be done to fix
this?
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
More information about the Libstdc++
mailing list