mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-27 01:45:35 +08:00
When vxcrtstuff.c was created, the set of #includes was copied from crtstuff.c. But crtstuff.c also has a bunch of #undefs after the first #include, because, as the comment says, including auto-host.h when building objects that are meant for target is technically not correct. This manifests when I try do do a canadian cross, with build=linux, host=windows and target=vxworks, in that we pick up a #define caddr_t char * from auto-host.h, which then of course creates a problem when we later include a target header that has typedef char * caddr_t; I assume that the #undefs in crtstuff.c have been added for similar reasons. These potentially problematic #defines all seem to be guarded by #ifndef USED_FOR_TARGET, which tconfig.h defines before including auto-host.h. So at first, it seems that one could avoid the problem by simply removing the initial include of auto-host.h. Unfortunately, we do need some of the things defined in auto-host.h within such an ifndef USED_FOR_TARGET, namely the define of HAVE_INITFINI_ARRAY_SUPPORT, which is what later causes initfini-array.h to define USE_INITFINI_ARRAY. So as the next best fix, just copy the #undefs from crtstuff.c. libgcc/ * config/vxcrtstuff.c: Undefine caddr_t, pid_t, rlim_t, ssize_t and vfork after including auto-host.h. |
||
---|---|---|
.. | ||
config | ||
soft-fp | ||
ChangeLog | ||
config.host | ||
config.in | ||
configure | ||
configure.ac | ||
crtstuff.c | ||
dfp-bit.c | ||
dfp-bit.h | ||
divmod.c | ||
emutls.c | ||
enable-execute-stack-empty.c | ||
enable-execute-stack-mprotect.c | ||
find-symver.awk | ||
fixed-bit.c | ||
fixed-bit.h | ||
fixed-obj.mk | ||
floatunsidf.c | ||
floatunsisf.c | ||
floatunsitf.c | ||
floatunsixf.c | ||
fp-bit.c | ||
fp-bit.h | ||
gbl-ctors.h | ||
gcov.h | ||
gen-fixed.sh | ||
generic-morestack-thread.c | ||
generic-morestack.c | ||
generic-morestack.h | ||
gstdint.h | ||
gthr-posix.h | ||
gthr-single.h | ||
gthr.h | ||
libgcc2.c | ||
libgcc2.h | ||
libgcc-std.ver.in | ||
libgcov-driver-system.c | ||
libgcov-driver.c | ||
libgcov-interface.c | ||
libgcov-merge.c | ||
libgcov-profiler.c | ||
libgcov-util.c | ||
libgcov.h | ||
Makefile.in | ||
memcmp.c | ||
memcpy.c | ||
memmove.c | ||
memset.c | ||
mkheader.sh | ||
mkmap-flat.awk | ||
mkmap-symver.awk | ||
offloadstuff.c | ||
shared-object.mk | ||
siditi-object.mk | ||
static-object.mk | ||
sync.c | ||
udivhi3.c | ||
udivmod.c | ||
udivmodhi4.c | ||
udivmodsi4.c | ||
unwind-arm-common.inc | ||
unwind-c.c | ||
unwind-compat.c | ||
unwind-compat.h | ||
unwind-dw2-fde-compat.c | ||
unwind-dw2-fde-dip.c | ||
unwind-dw2-fde.c | ||
unwind-dw2-fde.h | ||
unwind-dw2.c | ||
unwind-dw2.h | ||
unwind-generic.h | ||
unwind-pe.h | ||
unwind-seh.c | ||
unwind-sjlj.c | ||
unwind.inc | ||
vtv_end_preinit.c | ||
vtv_end.c | ||
vtv_start_preinit.c | ||
vtv_start.c |