This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
libstdc++ breakage when overriding system headers
- To: libstdc++ at sources dot redhat dot com
- Subject: libstdc++ breakage when overriding system headers
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Wed, 22 Aug 2001 10:29:04 +0100
- Organization: Red Hat UK Ltd.
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