components/python/python26/patches/ld-zignore_sparc_core_workaround.patch
changeset 171 dbff1afe6b31
equal deleted inserted replaced
170:14cadb780400 171:dbff1afe6b31
       
     1 # This patch is to work around a core dump issue when we try to build cStringIO
       
     2 # with -zignore in LD_OPTIONS. 
       
     3 #
       
     4 --- Python-2.6.4/setup.pyy	Thu Apr  7 10:38:59 2011
       
     5 +++ Python-2.6.4/setup.py	Thu Apr  7 12:04:36 2011
       
     6 @@ -235,7 +235,13 @@
       
     7                  return
       
     8  
       
     9          try:
       
    10 +            ldo = None
       
    11 +	    if ext.name == 'cStringIO' and 'LD_OPTIONS' in os.environ:
       
    12 +                ldo = os.environ['LD_OPTIONS']
       
    13 +		del os.environ['LD_OPTIONS']
       
    14              build_ext.build_extension(self, ext)
       
    15 +            if ldo != None:
       
    16 +	        os.environ['LD_OPTIONS'] = ldo
       
    17          except (CCompilerError, DistutilsError), why:
       
    18              self.announce('WARNING: building of extension "%s" failed: %s' %
       
    19                            (ext.name, sys.exc_info()[1]))