]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
adaint.h: (__gnat_plist_init): Not defined for RTX.
authorJose Ruiz <ruiz@adacore.com>
Thu, 13 Dec 2007 10:19:55 +0000 (11:19 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 13 Dec 2007 10:19:55 +0000 (11:19 +0100)
2007-12-06  Jose Ruiz  <ruiz@adacore.com>

* adaint.h: (__gnat_plist_init): Not defined for RTX.

* initialize.c (__gnat_initialize): Do not call __gnat_plist_init for
RTX systems.

* Makefile.in: Add new files s-tasinf-linux.ads and s-tasinf-linux.adb.
(LIBGNAT_TARGET_PAIRS, MISCLIB, THREADSLIB,
EXTRA_GNATRTL_NONTASKING_OBJS, EXTRA_GNATRTL_TASKING_OBJS,
GNATLIB_SHARED for RTX run time): Use the versions required by RTX.

* mingw32.h:
Do not define GNAT_UNICODE_SUPPORT for RTX since it is not supported.

* sysdep.c (winflush_function for RTX): Procedure that does nothing
since we only have problems with Windows 95/98, which are not
supported by RTX.
(__gnat_ttyname): Return the empty string on Nucleus, just as
done on vxworks.

From-SVN: r130816

gcc/ada/Makefile.in
gcc/ada/adaint.h
gcc/ada/initialize.c
gcc/ada/mingw32.h
gcc/ada/sysdep.c

index db65816b877935903f05b9aeacebba7eec9d891a..d9792ca4744aa8d4e5c6a56f04f6c48bafdd28ff 100644 (file)
@@ -418,6 +418,9 @@ ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
   EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
   EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
 
+  EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
+  EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
+
   ifeq ($(strip $(filter-out yes,$(TRACE))),)
     LIBGNAT_TARGET_PAIRS += \
     s-traces.adb<s-traces-default.adb \
@@ -488,6 +491,9 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(targ))),)
   endif
 
   EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
+
+  EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
+  EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
 endif
 
 # vxworksae / vxworks 653
@@ -572,6 +578,9 @@ ifeq ($(strip $(filter-out sparc% wrs vx%,$(targ))),)
 
   EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
   EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
+
+  EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
+  EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
 endif
 
 ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
@@ -637,6 +646,9 @@ ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
   endif
 
   EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
+
+  EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
+  EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
 endif
 
 ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
@@ -669,6 +681,9 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
 
   EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
   EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
+
+  EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
+  EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
 endif
 
 ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
@@ -701,6 +716,9 @@ ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
 
   EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
   EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o
+
+  EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
+  EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
 endif
 
 ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
@@ -843,6 +861,8 @@ ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
     g-soccon.ads<g-soccon-linux-x86.ads \
     s-osinte.adb<s-osinte-posix.adb \
     s-osinte.ads<s-osinte-linux.ads \
+    s-tasinf.ads<s-tasinf-linux.ads \
+    s-tasinf.adb<s-tasinf-linux.adb \
     s-taprop.adb<s-taprop-linux.adb
 
     EH_MECHANISM=-gcc
@@ -925,6 +945,8 @@ ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
     s-osinte.ads<s-osinte-linux.ads \
     s-osprim.adb<s-osprim-posix.adb \
     s-taprop.adb<s-taprop-linux.adb \
+    s-tasinf.ads<s-tasinf-linux.ads \
+    s-tasinf.adb<s-tasinf-linux.adb \
     s-taspri.ads<s-taspri-posix.ads \
     s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
     system.ads<system-linux-s390x.ads
@@ -937,6 +959,8 @@ ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
     s-osinte.ads<s-osinte-linux.ads \
     s-osprim.adb<s-osprim-posix.adb \
     s-taprop.adb<s-taprop-linux.adb \
+    s-tasinf.ads<s-tasinf-linux.ads \
+    s-tasinf.adb<s-tasinf-linux.adb \
     s-taspri.ads<s-taspri-posix.ads \
     s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
     system.ads<system-linux-s390.ads
@@ -1175,7 +1199,7 @@ ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
   s-osinte.adb<s-osinte-vms-ia64.adb \
   s-osinte.ads<s-osinte-vms-ia64.ads \
   s-vaflop.adb<s-vaflop-vms-ia64.adb \
-  system.ads<system-vms_64.ads
+  system.ads<system-vms-ia64.ads
 
   LIBGNAT_TARGET_PAIRS_AUX2 = \
   s-parame.ads<s-parame-vms-ia64.ads
@@ -1222,6 +1246,7 @@ endif
   i-cpoint.ads<i-cpoint-vms_64.ads \
   i-cpoint.adb<i-cpoint-vms_64.adb \
   i-cstrea.adb<i-cstrea-vms.adb \
+  i-forbla.ads<i-forbla-unimplemented.ads \
   s-inmaop.adb<s-inmaop-vms.adb \
   s-interr.adb<s-interr-vms.adb \
   s-intman.adb<s-intman-vms.adb \
@@ -1276,19 +1301,11 @@ ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
   LIBGNAT_TARGET_PAIRS = \
   a-dirval.adb<a-dirval-mingw.adb \
   a-excpol.adb<a-excpol-abort.adb \
-  a-exetim.adb<a-exetim-mingw.adb \
-  a-exetim.ads<a-exetim-mingw.ads \
-  a-intnam.ads<a-intnam-mingw.ads \
   a-numaux.adb<a-numaux-x86.adb \
   a-numaux.ads<a-numaux-x86.ads \
   s-gloloc.adb<s-gloloc-mingw.adb \
   s-inmaop.adb<s-inmaop-dummy.adb \
-  s-interr.adb<s-interr-sigaction.adb \
-  s-intman.adb<s-intman-mingw.adb \
   s-memory.adb<s-memory-mingw.adb \
-  s-osinte.ads<s-osinte-mingw.ads \
-  s-osprim.adb<s-osprim-mingw.adb \
-  s-taprop.adb<s-taprop-mingw.adb \
   s-taspri.ads<s-taspri-mingw.ads \
   s-tasinf.adb<s-tasinf-mingw.adb \
   s-tasinf.ads<s-tasinf-mingw.ads \
@@ -1297,24 +1314,50 @@ ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
   g-socthi.adb<g-socthi-mingw.adb \
   g-stsifd.adb<g-stsifd-sockets.adb \
   g-soccon.ads<g-soccon-mingw.ads \
-  g-soliop.ads<g-soliop-mingw.ads \
-  system.ads<system-mingw.ads
+  g-soliop.ads<g-soliop-mingw.ads
+
+  ifeq ($(strip $(filter-out rtx_w32 rtx_rtss,$(THREAD_KIND))),)
+    LIBGNAT_TARGET_PAIRS += \
+    s-intman.adb<s-intman-dummy.adb \
+    s-osinte.ads<s-osinte-rtx.ads \
+    s-osprim.adb<s-osprim-rtx.adb \
+    s-taprop.adb<s-taprop-rtx.adb \
+    system.ads<system-rtx.ads
+
+    MISCLIB = -lwsock32 -lrtapi_w32
+    THREADSLIB=-lrtapi_w32
+  else
+    LIBGNAT_TARGET_PAIRS += \
+    a-exetim.adb<a-exetim-mingw.adb \
+    a-exetim.ads<a-exetim-mingw.ads \
+    a-intnam.ads<a-intnam-mingw.ads \
+    s-interr.adb<s-interr-sigaction.adb \
+    s-intman.adb<s-intman-mingw.adb \
+    s-osinte.ads<s-osinte-mingw.ads \
+    s-osprim.adb<s-osprim-mingw.adb \
+    s-taprop.adb<s-taprop-mingw.adb \
+    system.ads<system-mingw.ads
+
+    EXTRA_GNATRTL_NONTASKING_OBJS = g-regist.o
+    EXTRA_GNATRTL_TASKING_OBJS=a-exetim.o
+
+    MISCLIB = -lwsock32
+
+    # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
+    # auto-import support for array/record will be done.
+    GNATLIB_SHARED = gnatlib-shared-win32
+  endif
 
   TOOLS_TARGET_PAIRS= \
   mlib-tgt-specific.adb<mlib-tgt-mingw.adb \
   indepsw.adb<indepsw-mingw.adb
 
-  MISCLIB = -lwsock32
+  EH_MECHANISM=-gcc
   GMEM_LIB = gmemlib
   PREFIX_OBJS = $(PREFIX_REAL_OBJS)
   EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
   EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
-  EXTRA_GNATRTL_NONTASKING_OBJS = g-regist.o
-  EXTRA_GNATRTL_TASKING_OBJS = a-exetim.o
   soext = .dll
-# ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT auto-import
-# support for array/record will be done.
-  GNATLIB_SHARED = gnatlib-shared-win32
   LIBRARY_VERSION := $(LIB_VERSION)
 endif
 
@@ -1328,6 +1371,8 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
   s-osinte.ads<s-osinte-linux.ads \
   s-osprim.adb<s-osprim-posix.adb \
   s-taprop.adb<s-taprop-linux.adb \
+  s-tasinf.ads<s-tasinf-linux.ads \
+  s-tasinf.adb<s-tasinf-linux.adb \
   s-taspri.ads<s-taspri-posix.ads \
   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
   system.ads<system-linux-ppc.ads
@@ -1353,6 +1398,8 @@ ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
   s-osinte.ads<s-osinte-linux.ads \
   s-osprim.adb<s-osprim-posix.adb \
   s-taprop.adb<s-taprop-linux.adb \
+  s-tasinf.ads<s-tasinf-linux.ads \
+  s-tasinf.adb<s-tasinf-linux.adb \
   s-taspri.ads<s-taspri-posix.ads \
   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
   system.ads<system-linux-sparc.ads
@@ -1378,6 +1425,8 @@ ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
   s-osinte.ads<s-osinte-linux-hppa.ads \
   s-osprim.adb<s-osprim-posix.adb \
   s-taprop.adb<s-taprop-linux.adb \
+  s-tasinf.ads<s-tasinf-linux.ads \
+  s-tasinf.adb<s-tasinf-linux.adb \
   s-taspri.ads<s-taspri-posix.ads \
   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
   system.ads<system-linux-hppa.ads
@@ -1431,6 +1480,8 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
   s-osinte.adb<s-osinte-posix.adb \
   s-osprim.adb<s-osprim-posix.adb \
   s-taprop.adb<s-taprop-linux.adb \
+  s-tasinf.ads<s-tasinf-linux.ads \
+  s-tasinf.adb<s-tasinf-linux.adb \
   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
   s-taspri.ads<s-taspri-posix.ads \
   system.ads<system-linux-ia64.ads
@@ -1457,6 +1508,8 @@ ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
   s-osinte.adb<s-osinte-posix.adb \
   s-osprim.adb<s-osprim-posix.adb \
   s-taprop.adb<s-taprop-linux.adb \
+  s-tasinf.ads<s-tasinf-linux.ads \
+  s-tasinf.adb<s-tasinf-linux.adb \
   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
   s-taspri.ads<s-taspri-posix.ads \
   system.ads<system-linux-alpha.ads
@@ -1485,6 +1538,8 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
   s-osinte.adb<s-osinte-posix.adb \
   s-osprim.adb<s-osprim-posix.adb \
   s-taprop.adb<s-taprop-linux.adb \
+  s-tasinf.ads<s-tasinf-linux.ads \
+  s-tasinf.adb<s-tasinf-linux.adb \
   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
   s-taspri.ads<s-taspri-posix.ads \
   system.ads<system-linux-x86_64.ads
@@ -1631,7 +1686,6 @@ ifeq ($(TOOLSCASE),cross)
   vpath %.h   ../
 endif
 
-
 ../../gnatchop$(exeext): 
        $(GNATMAKE) -c $(ADA_INCLUDES) gnatchop --GCC="$(CC) $(ALL_ADAFLAGS)"
        $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatchop 
@@ -2127,6 +2181,7 @@ socket.o  : socket.c gsocket.h
 sysdep.o  : sysdep.c
 raise-gcc.o : raise-gcc.c raise.h
 raise.o   : raise.c raise.h
+vx_stack_info.o : vx_stack_info.c
 
 gen-soccon: gen-soccon.c gsocket.h
        $(CC) $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
index 131fe1f2dd5c735cf90d70234f81e7cec7df23e6..77724cdd7947e73e4e000edf1ab9185c09621dba 100644 (file)
@@ -168,7 +168,7 @@ extern int    __gnat_dup2                      (int, int);
 extern void   __gnat_os_filename                   (char *, char *, char *,
                                                    int *, char *, int *);
 
-#ifdef __MINGW32__
+#if defined (__MINGW32__) && !defined (RTX)
 extern void   __gnat_plist_init                    (void);
 #endif
 
index 17a8fc55fe419e16034a079ec1073bd5af387f74..a06e98ece65fefa5ca56e375efba6d57b32bde4e 100644 (file)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                          C Implementation File                           *
  *                                                                          *
- *          Copyright (C) 1992-2006, Free Software Foundation, Inc.         *
+ *          Copyright (C) 1992-2007, Free Software Foundation, Inc.         *
  *                                                                          *
  * GNAT is free software;  you can  redistribute it  and/or modify it under *
  * terms of the  GNU General Public License as published  by the Free Soft- *
 #include <windows.h>
 
 extern void __gnat_init_float (void);
-extern void __gnat_plist_init (void);
 extern void __gnat_install_SEH_handler (void *);
 
+#ifndef RTX
+/* Do not define for RTX since it is only used for creating child processes
+   which is not supported in RTX. */
+extern void __gnat_plist_init (void);
+#endif
+
 void
 __gnat_initialize (void *eh)
 {
@@ -71,9 +76,11 @@ __gnat_initialize (void *eh)
       given that we have set Max_Digits etc with this in mind */
    __gnat_init_float ();
 
+#ifndef RTX
    /* Initialize a lock for a process handle list - see adaint.c for the
       implementation of __gnat_portable_no_block_spawn, __gnat_portable_wait */
    __gnat_plist_init();
+#endif
 
    /* Note that we do not activate this for the compiler itself to avoid a
       bootstrap path problem.  Older version of gnatbind will generate a call
index e58b45f760a0aece0557bf8c0f91e4c49c6f69e0..8018e14986ce7e6117d3093d455b50be7bf9b1b2 100644 (file)
    version. It is not possible to use it with previous version due to a bug
    in the MingW runtime.  */
 
-#if ((__MINGW32_MAJOR_VERSION == 3 \
+#if (((__MINGW32_MAJOR_VERSION == 3 \
                   && __MINGW32_MINOR_VERSION >= 9) \
-     || (__MINGW32_MAJOR_VERSION >= 4))
+     || (__MINGW32_MAJOR_VERSION >= 4)) \
+     && !defined (RTX))
 #define GNAT_UNICODE_SUPPORT
 
 #else
index cde8e544eb7e496e0c07c058d36bcaf917a341be..6aca196af76e40493abf501909b3c6bb5a6ee9e8 100644 (file)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                          C Implementation File                           *
  *                                                                          *
- *         Copyright (C) 1992-2006, Free Software Foundation, Inc.          *
+ *         Copyright (C) 1992-2007, Free Software Foundation, Inc.          *
  *                                                                          *
  * GNAT is free software;  you can  redistribute it  and/or modify it under *
  * terms of the  GNU General Public License as published  by the Free Soft- *
@@ -213,6 +213,23 @@ __gnat_ttyname (int filedes)
    Calling FlushConsoleInputBuffer just after getch() fix the bug under
    95/98. */
 
+#ifdef RTX
+
+static void winflush_nt (void);
+
+/* winflush_function will do nothing since we only have problems with Windows
+   95/98 which are not supported by RTX. */
+
+static void (*winflush_function) (void) = winflush_nt;
+
+static void
+winflush_nt (void)
+{
+  /* Does nothing as there is no problem under NT.  */
+}
+
+#else
+
 static void winflush_init (void);
 
 static void winflush_95 (void);
@@ -279,6 +296,8 @@ __gnat_is_windows_xp (void)
 
 #endif
 
+#endif
+
 #else
 
 static const char *mode_read_text = "r";
@@ -309,15 +328,13 @@ __gnat_set_text_mode (int handle ATTRIBUTE_UNUSED)
 char *
 __gnat_ttyname (int filedes)
 {
-#ifndef __vxworks
+#if defined (__vxworks) || defined (__nucleus)
+  return "";
+#else
   extern char *ttyname (int);
 
   return ttyname (filedes);
-
-#else
-  return "";
-
-#endif
+#endif /* defined (__vxworks) || defined (__nucleus) */
 }
 #endif
 \f
@@ -872,30 +889,4 @@ __gnat_get_task_options (void)
 #endif
 }
 
-typedef struct
-{
-  int  size;
-  char *base;
-  char *end;
-} stack_info;
-
-/* __gnat_get_stack_info is used by s-stchop.adb only for VxWorks. This
-   procedure fills the stack information associated to the currently
-   executing task. */
-extern void __gnat_get_stack_info (stack_info *vxworks_stack_info);
-
-void
-__gnat_get_stack_info (stack_info *vxworks_stack_info)
-{
-  TASK_DESC descriptor;
-
-  /* Ask the VxWorks kernel about stack values */
-  taskInfoGet (taskIdSelf (), &descriptor);
-
-  /* Fill the stack data with the information provided by the kernel */
-  vxworks_stack_info->size = descriptor.td_stackSize;
-  vxworks_stack_info->base = descriptor.td_pStackBase;
-  vxworks_stack_info->end  = descriptor.td_pStackEnd;
-}
-
 #endif