This is the mail archive of the
mailing list for the GCC project.
Patch for limits.h and RTEMS
- To: egcs-patches at egcs dot cygnus dot com
- Subject: Patch for limits.h and RTEMS
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 29 Mar 1999 11:39:40 -0500
- CC: joel at OARcorp dot com, ian at zembu dot com
gcc can build two different versions of limits.h. If there is a
system limits.h, it builds a limits.h which includes the system one
and then ensures that certain values are set correctly.
gcc checks whether there is a system limits.h by looking in a specific
directory, normally /usr/include. When building a cross compiler, it
looks in $(tooldir)/sys-include; the user is expected to preinstall
the appropriate header files in that directory.
This works fine, except for a couple of environments which are
normally build in conjunction with gcc. For these environments,
limits.h does exist, but it is not yet installed in
$(tooldir)/sys-include; it lives in a directory parallel to the gcc
The two environments I know of which have this problem are cygwin and
RTEMS. For cygwin, I fixed the problem over a year ago:
Wed Jan 28 20:04:43 1998 Ian Lance Taylor <firstname.lastname@example.org>
* i386/t-cygwin32 (LIMITS_H_TEST, LIBGCC2_INCLUDES): Define.
Here is the appropriate patch for RTEMS. Since gcc includes some
RTEMS configuration information, it should include this as well.
Mon Mar 29 11:37:49 1999 Ian Lance Taylor <email@example.com>
* t-rtems (LIMITS_H_TEST, LIBGCC2_INCLUDES): Define.
RCS file: /zembu/cvsfiles/tools/egcs/gcc/config/t-rtems,v
retrieving revision 22.214.171.124
retrieving revision 1.5
diff -u -r126.96.36.199 -r1.5
--- t-rtems 1998/12/04 18:55:54 188.8.131.52
+++ t-rtems 1998/12/04 19:09:12 1.5
@@ -4,3 +4,10 @@
# Don't install "assert.h" in gcc. RTEMS uses the one in newlib.
+# RTEMS always has limits.h.
+LIMITS_H_TEST = true
+# If we are building next to newlib, this will let us find the RTEMS
+# limits.h when building libgcc2. Otherwise, newlib must be installed
+LIBGCC2_INCLUDES = -I$(srcdir)/../newlib/libc/sys/rtems/include