[Gc] minor nit with gc6.8 on Solaris x86_64 [patch]

Tim Mooney Tim.Mooney at ndsu.edu
Tue Jan 16 17:44:57 PST 2007


[I'm not subscribed to this list, please Cc: me on any replies]

I ran into a compile error in dyn_load.c when building gc6.8 on solaris
2.10 on a dual AMD Opteron box using the Sun Workshop 11 compilers
(completely up to date with patches).  I was building in AMD64 mode, using
the compiler flags

 	-xtarget=native -xarch=amd64

(I didn't initially specify the configure option
--build=x86_64-sun-solaris2.10, though I later tried that, and it didn't
make a difference).

Reading through the archives and the list of recent changes, the fix
was pretty easy.

Rainer Orth's work was done against the 7.0 alpha series, where the
include/private/gcconfig.h defines SOLARIS on the Solaris platform,
but the 6.x series apparently used SUNOS5 instead.  When Rainer's
fixes were backported to 6.x, the #define wasn't changed to SUNOS5,
so the compile is essentially acting like it can't tell what platform
it's building on.  Other parts of his patch check for SOLARIS, so the
easiest fix was to just define both SUNOS5 and SOLARIS in this case.

The patch is


--- gc6.8.orig/include/private/gcconfig.h	2006-07-07 16:08:05.000000000 -0500
+++ gc6.8/include/private/gcconfig.h	2007-01-16 19:35:39.415046000 -0600
@@ -156,6 +156,7 @@
  # endif
  # if defined(sun) && defined(__amd64)
  #    define X86_64
+#    define SUNOS5
  #    define SOLARIS
  #    define mach_type_known
  # endif


Note that I also did "make check", and both tests passed.

Thanks,

Tim
-- 
Tim Mooney                                           Tim.Mooney at ndsu.edu
Information Technology Services                      (701) 231-1076 (Voice)
Room 242-J6, IACC Building                           (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164


More information about the Gc mailing list