7026922 Userland should pass -z ignore by default when building (workaround sparc linker core issue)
authorNorm Jacobs <Norm.Jacobs@Oracle.COM>
Thu, 07 Apr 2011 22:51:51 -0700
changeset 171 dbff1afe6b31
parent 170 14cadb780400
child 172 093198acf7d4
7026922 Userland should pass -z ignore by default when building (workaround sparc linker core issue)
components/imagemagick/Makefile
components/python/python26/patches/ld-zignore_sparc_core_workaround.patch
--- a/components/imagemagick/Makefile	Tue Apr 05 21:26:34 2011 -0700
+++ b/components/imagemagick/Makefile	Thu Apr 07 22:51:51 2011 -0700
@@ -57,6 +57,11 @@
 #
 COMPONENT_PRE_CONFIGURE_ACTION= ($(CP) -R $(SOURCE_DIR)/PerlMagick $(@D))
 
+# Studio 12.1 -xO4 + -zignore on sparc causes linker core dump prior to
+# build 163.
+studio_OPT.sparc.32 =	-xO3
+studio_OPT.sparc.64 =	-xO3
+
 # Show name of "error tag" as part of the warning
 #
 CFLAGS+= -errtags
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/python26/patches/ld-zignore_sparc_core_workaround.patch	Thu Apr 07 22:51:51 2011 -0700
@@ -0,0 +1,19 @@
+# This patch is to work around a core dump issue when we try to build cStringIO
+# with -zignore in LD_OPTIONS. 
+#
+--- Python-2.6.4/setup.pyy	Thu Apr  7 10:38:59 2011
++++ Python-2.6.4/setup.py	Thu Apr  7 12:04:36 2011
[email protected]@ -235,7 +235,13 @@
+                 return
+ 
+         try:
++            ldo = None
++	    if ext.name == 'cStringIO' and 'LD_OPTIONS' in os.environ:
++                ldo = os.environ['LD_OPTIONS']
++		del os.environ['LD_OPTIONS']
+             build_ext.build_extension(self, ext)
++            if ldo != None:
++	        os.environ['LD_OPTIONS'] = ldo
+         except (CCompilerError, DistutilsError), why:
+             self.announce('WARNING: building of extension "%s" failed: %s' %
+                           (ext.name, sys.exc_info()[1]))