[Bug libgcj/21942] New: boehm-gc doesn't compile on Solaris 10/amd64
gcc-bugzilla at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Jun 6 22:56:00 GMT 2005
The amd64 multilib of boehm-gc doesn't build on i386-pc-solaris2.10: the
compilation fails with
/vol/gnu/src/gcc/gcc-dist/boehm-gc/include/private/gcconfig.h:435: error: parse error before '--' token
Environment:
System: SunOS cumaru 5.10 Generic_Patch i86pc i386 i86pc
Architecture: i86pc
host: i386-pc-solaris2.10
build: i386-pc-solaris2.10
target: i386-pc-solaris2.10
configured with: /vol/gnu/src/gcc/gcc-dist/configure --prefix=/vol/gcc --with-local-prefix=/vol/gcc --disable-nls --with-gnu-as --with-as=/usr/sfw/bin/gas --with-gmp-dir=/vol/gnu/obj/gmp-4.1.3 --with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3 --enable-languages=c,c++,f95,java,objc,ada --disable-libmudflap
How-To-Repeat:
Bootstrap mainline as described above.
------- Additional Comments From ro at techfak dot uni-bielefeld dot de 2005-06-06 22:56 -------
Fix:
I've added a clause to boehm-gc/include/private/gcconfig.h for
X86_64/SUNOS5 to allow boehm-gc to compile, but gctest doesn't fully work
yet (but at least as well as the 32-bit version). Cf. PR libgcj/21940 for
32-bit gctest failures on this platform.
Index: boehm-gc/include/private/gcconfig.h
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/include/private/gcconfig.h,v
retrieving revision 1.44
diff -u -p -r1.44 gcconfig.h
--- boehm-gc/include/private/gcconfig.h 25 May 2005 13:10:00 -0000 1.44
+++ boehm-gc/include/private/gcconfig.h 6 Jun 2005 22:54:37 -0000
@@ -146,6 +146,11 @@
# define SUNOS5
# define mach_type_known
# endif
+# if defined(sun) && defined(__amd64)
+# define X86_64
+# define SUNOS5
+# define mach_type_known
+# endif
# if (defined(__OS2__) || defined(__EMX__)) && defined(__32BIT__)
# define I386
# define OS2
@@ -1912,6 +1917,36 @@
extern char etext[];
# define SEARCH_FOR_DATA_START
# endif
+# ifdef SUNOS5
+# define ELF_CLASS ELFCLASS64
+# define OS_TYPE "SUNOS5"
+ extern int _etext[], _end[];
+ extern ptr_t GC_SysVGetDataStart();
+# define DATASTART GC_SysVGetDataStart(0x1000, _etext)
+# define DATAEND (_end)
+/* # define STACKBOTTOM ((ptr_t)(_start)) worked through 2.7, */
+/* but reportedly breaks under 2.8. It appears that the stack */
+/* base is a property of the executable, so this should not break */
+/* old executables. */
+/* HEURISTIC2 probably works, but this appears to be preferable. */
+/* # include <sys/vm.h> */
+/* # define STACKBOTTOM USRSTACK */
+# define HEURISTIC2
+# define PROC_VDB
+# define DYNAMIC_LOADING
+# if !defined(USE_MMAP) && defined(REDIRECT_MALLOC)
+# define USE_MMAP
+ /* Otherwise we now use calloc. Mmap may result in the */
+ /* heap interleaved with thread stacks, which can result in */
+ /* excessive blacklisting. Sbrk is unusable since it */
+ /* doesn't interact correctly with the system malloc. */
+# endif
+# ifdef USE_MMAP
+# define HEAP_START (ptr_t)0x40000000
+# else
+# define HEAP_START DATAEND
+# endif
+# endif
# endif
#if defined(LINUX) && defined(USE_MMAP)
--
Summary: boehm-gc doesn't compile on Solaris 10/amd64
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386-pc-solaris2.10
GCC host triplet: i386-pc-solaris2.10
GCC target triplet: i386-pc-solaris2.10
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21942
More information about the Gcc-bugs
mailing list