This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Updated RTEMS soccon Path


Hi,

Ada now builds for RTEMS if you pass in a
CFLAGS_FOR_TARGET which points to OS header
files.  --sysroot cannot be used because it
assumes RTEMS is installed under /usr/ and it
is not.

ACATS results posted.

http://gcc.gnu.org/ml/gcc-testresults/2008-08/msg00811.html

2008-08-08 Joel Sherrill <joel.sherrill@oarcorp.com>

   * s-oscons-tmplt.c: RTEMS defines AF_INET6 but does support it.
   * gsocket.h, socket.c: Update to support RTEMS.
   * gcc-interface/Make-lang.in: Include CFLAGS_FOR_TARGET when cross.

--
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill@OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
  Support Available             (256) 722-9985


Index: gcc/ada/s-oscons-tmplt.c
===================================================================
--- gcc/ada/s-oscons-tmplt.c	(revision 138841)
+++ gcc/ada/s-oscons-tmplt.c	(working copy)
@@ -829,6 +829,10 @@
 #endif
 CND(AF_INET, "IPv4 address family")
 
+#if defined(__rtems__)
+# undef AF_INET6
+#endif
+
 #ifndef AF_INET6
 # define AF_INET6 -1
 #else
Index: gcc/ada/gsocket.h
===================================================================
--- gcc/ada/gsocket.h	(revision 138841)
+++ gcc/ada/gsocket.h	(working copy)
@@ -184,7 +184,7 @@
 
 #if defined (_AIX) || defined (__FreeBSD__) || defined (__hpux__) || defined (__osf__) || defined (_WIN32) || defined (__APPLE__)
 # define HAVE_THREAD_SAFE_GETxxxBYyyy 1
-#elif defined (sgi) || defined (linux) || defined (__GLIBC__) || (defined (sun) && defined (__SVR4) && !defined (__vxworks))
+#elif defined (sgi) || defined (linux) || defined (__GLIBC__) || (defined (sun) && defined (__SVR4) && !defined (__vxworks)) || defined(__rtems__)
 # define HAVE_GETxxxBYyyy_R 1
 #endif
 
@@ -194,7 +194,7 @@
 # define Need_Netdb_Buffer 0
 #endif
 
-#if defined (__FreeBSD__) || defined (__vxworks)
+#if defined (__FreeBSD__) || defined (__vxworks) || defined(__rtems__)
 # define Has_Sockaddr_Len 1
 #else
 # define Has_Sockaddr_Len 0
Index: gcc/ada/socket.c
===================================================================
--- gcc/ada/socket.c	(revision 138841)
+++ gcc/ada/socket.c	(working copy)
@@ -240,7 +240,7 @@
   struct servent *rh;
   int ri;
 
-#if defined(__linux__) || defined(__GLIBC__)
+#if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__)
   (void) getservbyname_r (name, proto, ret, buf, buflen, &rh);
 #else
   rh = getservbyname_r (name, proto, ret, buf, buflen);
@@ -256,7 +256,7 @@
   struct servent *rh;
   int ri;
 
-#if defined(__linux__) || defined(__GLIBC__)
+#if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__)
   (void) getservbyport_r (port, proto, ret, buf, buflen, &rh);
 #else
   rh = getservbyport_r (port, proto, ret, buf, buflen);
Index: gcc/ada/gcc-interface/Make-lang.in
===================================================================
--- gcc/ada/gcc-interface/Make-lang.in	(revision 138841)
+++ gcc/ada/gcc-interface/Make-lang.in	(working copy)
@@ -933,9 +933,9 @@
   ./s-oscons-tmplt.exe > s-oscons-tmplt.s
 
 else
-OSCONS_CPP=$(GCC_FOR_TARGET) -E -C \
+OSCONS_CPP=$(GCC_FOR_TARGET) $(CFLAGS_FOR_TARGET) -E -C \
   -DTARGET=\"$(target)\" s-oscons-tmplt.c > s-oscons-tmplt.i
-OSCONS_EXTRACT=$(GCC_FOR_TARGET) -S s-oscons-tmplt.i
+OSCONS_EXTRACT=$(GCC_FOR_TARGET) $(CFLAGS_FOR_TARGET) -S s-oscons-tmplt.i
 endif
 
 ada/s-oscons-$(THREAD_KIND).ads : ada/s-oscons-tmplt.c ada/gsocket.h ada/xoscons.adb ada/xutil.ads ada/xutil.adb

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]