]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
config.h: Updates for GNU/Linux/sparc.
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Mon, 19 Jul 1999 19:32:38 +0000 (19:32 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Mon, 19 Jul 1999 19:32:38 +0000 (19:32 +0000)
1999-07-19  Alexandre Oliva  <oliva@dcc.unicamp.br>

* config.h: Updates for GNU/Linux/sparc.  Use HEURISTIC2 on
Solaris7/sparc, since HEURISTIC1 does not work.
* os_dep.c: Updates for GNU/Linux/sparc.
* misc.c (GC_init_inner): Likewise.
From gc-boehm 4.14.

From-SVN: r28181

boehm-gc/ChangeLog
boehm-gc/config.h
boehm-gc/misc.c
boehm-gc/os_dep.c

index 5cea85f7cf12e62d34b2a0a0361213c7d721cc8a..beab3b3da1dac125f5a648ded7e6452481934a76 100644 (file)
@@ -1,3 +1,11 @@
+1999-07-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * config.h: Updates for GNU/Linux/sparc.  Use HEURISTIC2 on
+       Solaris7/sparc, since HEURISTIC1 does not work.
+       * os_dep.c: Updates for GNU/Linux/sparc.
+       * misc.c (GC_init_inner): Likewise.
+       From gc-boehm 4.14.
+
 1999-07-19  Tom Tromey  <tromey@cygnus.com>
 
        * config.h (MPROTECT_VDB): Don't define on Linux.
index 7791b6cacb98f232a40746eab6bf55f714574ce3..913371629305cc8f898b9e74202a81265b64b514 100644 (file)
 #    define LINUX
 #    define mach_type_known
 # endif
+# if (defined(linux) || defined(__linux__)) && \
+     (defined(sparc) || defined(__sparc__))
+#    define SPARC
+#    define LINUX
+#    define mach_type_known
+# endif
 # if defined(__alpha) || defined(__alpha__)
 #   define ALPHA
 #   if defined(linux) || defined(__linux__)
 #        define HEAP_START DATAEND
 #       endif
 #      define PROC_VDB
-#      define HEURISTIC1
+/*     HEURISTIC1 reportedly no longer works under 2.7.  Thus we       */
+/*     switched to HEURISTIC2, eventhough it creates some debugging    */
+/*     issues.                                                         */
+#      define HEURISTIC2
 #      include <unistd.h>
 #       define GETPAGESIZE()  sysconf(_SC_PAGESIZE)
                /* getpagesize() appeared to be missing from at least one */
 #       define STACKBOTTOM ((ptr_t) 0xdfff0000)
 #   endif
 #   define DYNAMIC_LOADING
+#   ifdef LINUX
+#     define OS_TYPE "LINUX"
+#     ifdef __ELF__
+#         define DATASTART GC_data_start
+#     else
+          Linux Sparc non elf ?
+#     endif
+      extern int _end;
+#     define DATAEND (&_end)
+#     define SVR4
+#     define STACKBOTTOM ((ptr_t) 0xf0000000)
+#   endif
 # endif
 
 # ifdef I386
 #   define THREADS
 # endif
 
-# if defined(SPARC)
+# if defined(SPARC) && !defined(LINUX)
 #   define SAVE_CALL_CHAIN
 #   define ASM_CLEAR_CODE      /* Stack clearing is crucial, and we    */
                                /* include assembly code to do it well. */
index 70f583f982d5d91b726698fefd908e92e2c77c80..18b30a18a89b419081f1922aac26f04848ea8aa2 100644 (file)
@@ -439,6 +439,9 @@ void GC_init_inner()
 #   if defined(LINUX) && defined(ALPHA)
       GC_init_linuxalpha();
 #   endif
+#   if defined(LINUX) && defined(SPARC)
+       GC_init_linuxsparc();
+#   endif
 #   ifdef SOLARIS_THREADS
        GC_thr_init();
        /* We need dirty bits in order to find live stack sections.     */
index 29cf8ff99ecd21151e74188a7e59937c1ed267d6..1b1442fe5c56a3ae0c98593a1665103e1b5957d3 100644 (file)
@@ -68,7 +68,7 @@
 #   define NEED_FIND_LIMIT
 # endif
 
-# if defined(LINUX) && (defined(POWERPC) || defined(ALPHA))
+# if defined(LINUX) && (defined(POWERPC) || defined(ALPHA) || defined(SPARC))
 #   define NEED_FIND_LIMIT
 # endif
 
   }
 #endif
 
+#if defined(LINUX) && defined(SPARC)
+  ptr_t GC_data_start;
+
+  void GC_init_linuxsparc()
+  {
+    extern ptr_t GC_find_limit();
+    extern char **_environ;
+      /* This may need to be environ, without the underscore, for     */
+      /* some versions.                                               */
+    GC_data_start = GC_find_limit((ptr_t)&_environ, FALSE);
+  }
+#endif
+
 # ifdef ECOS
 
 # ifndef ECOS_GC_MEMORY_SIZE
@@ -2261,7 +2274,7 @@ struct hblk *h;
  * Call stack save code for debugging.
  * Should probably be in mach_dep.c, but that requires reorganization.
  */
-#if defined(SPARC)
+#if defined(SPARC) && !defined(LINUX)
 #   if defined(SUNOS4)
 #     include <machine/frame.h>
 #   else