This is the mail archive of the
mailing list for the GCC project.
[VxWorks] Set LIMITS_H_TRUE to true
- From: Richard Sandiford <richard at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: nathan at codesourcery dot com
- Date: Fri, 02 Mar 2007 10:29:59 +0000
- Subject: [VxWorks] Set LIMITS_H_TRUE to true
When building gcc for VxWorks, it isn't necessary (or wise) to point
the configure script at the VxWorks headers. The headers should always
be found via the $WIND_USR and $WIND_BASE environent variables instead.
Thus in a normal VxWorks configuration, $(SYSTEM_HEADER_DIR) points at
the default /sys-include subdirectory of the install tree rather than
at the system libraries.
It could be argued that t-vxworks should point SYSTEM_HEADER_DIR at the
real headers instead, allowing them to be fixincluded. However, there
are two separate sets of system headers -- one for the kernel and one
for RTPs -- and neither the generation nor the use sides of the fixinclude
system are yet set up to deal with this. I believe Joseph is going to
be extending it to work better with SYSROOT_HEADER_SUFFIX, which may
improve the situation, but there are other reasons not to redirect
(1) The kernel headers are deliberately not ISO-clean. Trying to
apply rules like machine_name will break things quite severely.
Of course, we could simply go through each fixinclude rule to
make sure it is safe for VxWorks, but...
(2) ...the headers are already GNU clean, and in practice work without
modification. I think it is better to rely on the human maintenance
of the VxWorks headers to keep things that way. It also makes it
easier for users who want to upgrade their VxWorks installation,
without having to run mkheaders.
Anyway, the upshot is, the default LIMITS_H_TEST won't be able to find
the limits.h file. I think this is actually a good thing: given that
there are two separate sets of headers, testing the existence of limits.h
in one of them is not enough anyway. Fortunately, we know upfront that
both the kernel and RTP headers provide limits.h, so we can hardwire
LIMITS_H_TEST to true. Other ports do a similar thing.
Tested on i586-wrs-vxworks. This patch, in combination with the one
I posted yesterday and with Mark's recent patches, is enough to get
that configuration to build properly on mainline. OK to install?
* config/t-vworks (LIMITS_H_TEST): Define to true for VxWorks.
--- gcc/config/t-vxworks 2007-03-02 01:47:44.000000000 -0800
+++ gcc/config/t-vxworks 2007-03-02 01:49:22.000000000 -0800
@@ -27,6 +27,9 @@ LIBGCC2_INCLUDES = -nostdinc -I \
*) echo $(WIND_BASE)/target/h ;; \
+# Both the kernel and RTP headers provide limits.h.
+LIMITS_H_TEST = true
vxworks.o: $(srcdir)/config/vxworks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \