shadow header success
Nathan Myers
ncm@cantrip.org
Sun May 14 03:11:00 GMT 2000
This is to report an initial success with shadow headers. Having
constructed a set of shadows, under cshadow/, of files included by
standard headers in /usr/include etc., as described in the previous
posting, I was able to build a "hello world" program using them with
the command line:
v3/bin/g++ -D_ISOC9X_SOURCE -I gcc/libstdc++-v3/shadow
-I build/i686-pc-linux-gnu/libstdc++-v3/cshadow hello.c
The only oddity was the need for the -D option, arising from the
(re-)definition of std::fprintf() found in shadow/bits/std_cstdio.h.
The work left to do to make them all play nice includes:
- additions to configure.in to discover
- bogus header names to tell inclosure to ignore, based on
the target build environment identified (e.g. machine/ansi.h
on Linux/x86/glibc), and
- the directories searched by the compiler, in addition to ours,
to pass to the inclosure script. This must identify header
directories looked at by the _target_ compiler.
- additions to configure.in to handle a flag --enable-shadow-headers.
- additions to Makefile.am to build the cshadow/ directory, if
that flag is set, and additions to install the shadow/ and cshadow/
trees under the --prefix tree.
- cleaning up use of pathnames and temp files in the scripts
inclosure and mkcshadow.
- adding shadow declarations for non-ISO extensions to standard
headers under shadow/ and shadow/bits/, such as the POSIX and
XOPEN extensions (girded about with "#ifdef __USE_*" directives as
appropriate).
Nathan Myers
ncm at cantrip dot org
More information about the Libstdc++
mailing list