Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 602152 | Differences between
and this patch

Collapse All | Expand All

(-)Source/setup_configure.py.orig (-17 / +15 lines)
Lines 890-897 Link Here
890
    def __init__( self, setup ):
890
    def __init__( self, setup ):
891
        Compiler.__init__( self, setup )
891
        Compiler.__init__( self, setup )
892
892
893
        self._addVar( 'CCC',            'g++' )
893
        self._addVar( 'CCC',            '$(CXX)' )
894
        self._addVar( 'CC',             'gcc' )
894
        self._addVar( 'CC',             '$(CC)' )
895
895
896
    def getPythonExtensionFileExt( self ):
896
    def getPythonExtensionFileExt( self ):
897
        return '.so'
897
        return '.so'
Lines 1027-1034 Link Here
1027
        else:
1027
        else:
1028
            arch_options = ''
1028
            arch_options = ''
1029
1029
1030
        self._addVar( 'CCC',            'g++ %s' % (arch_options,) )
1030
        self._addVar( 'CCC',            '$(CXX) %s' % (arch_options,) )
1031
        self._addVar( 'CC',             'gcc %s' % (arch_options,) )
1031
        self._addVar( 'CC',             '$(CC) %s' % (arch_options,) )
1032
1032
1033
        self._find_paths_pycxx_dir = [
1033
        self._find_paths_pycxx_dir = [
1034
                        '../Import/pycxx-%d.%d.%d' % min_pycxx_version,
1034
                        '../Import/pycxx-%d.%d.%d' % min_pycxx_version,
Lines 1094-1104 Link Here
1094
1094
1095
    def setupUtilities( self ):
1095
    def setupUtilities( self ):
1096
        self._addVar( 'CCCFLAGS',
1096
        self._addVar( 'CCCFLAGS',
1097
                                        '-g  '
1097
                                        '$(CXXFLAGS) '
1098
                                        '-Wall -fPIC -fexceptions -frtti '
1098
                                        '-Wall -fPIC -fexceptions -frtti '
1099
                                        '-I. -I%(APR_INC)s -I%(APU_INC)s -I%(SVN_INC)s '
1099
                                        '-I. -I%(APR_INC)s -I%(APU_INC)s -I%(SVN_INC)s '
1100
                                        '-D%(DEBUG)s' )
1100
                                        '-D%(DEBUG)s' )
1101
        self._addVar( 'LDEXE',          '%(CCC)s -g' )
1101
        self._addVar( 'LDEXE',          '%(CCC)s $(LDFLAGS)' )
1102
1102
1103
    def setupPySvn( self ):
1103
    def setupPySvn( self ):
1104
        # Support building in a virtualenv.
1104
        # Support building in a virtualenv.
Lines 1122-1128 Link Here
1122
        self._addVar( 'PYTHON_INC',         distutils.sysconfig.get_python_inc() )
1122
        self._addVar( 'PYTHON_INC',         distutils.sysconfig.get_python_inc() )
1123
1123
1124
        py_cflags_list = [
1124
        py_cflags_list = [
1125
                    '-g',
1125
                    '$(CXXFLAGS) ',
1126
                    '-Wall -fPIC',
1126
                    '-Wall -fPIC',
1127
                    '-I. -I%(APR_INC)s -I%(APU_INC)s -I%(SVN_INC)s',
1127
                    '-I. -I%(APR_INC)s -I%(APU_INC)s -I%(SVN_INC)s',
1128
                    '-DPYCXX_PYTHON_2TO3 -I%(PYCXX)s -I%(PYCXX_SRC)s -I%(PYTHON_INC)s',
1128
                    '-DPYCXX_PYTHON_2TO3 -I%(PYCXX)s -I%(PYCXX_SRC)s -I%(PYTHON_INC)s',
Lines 1156-1176 Link Here
1156
1156
1157
        if self.options.hasOption( '--link-python-framework-via-dynamic-lookup' ):
1157
        if self.options.hasOption( '--link-python-framework-via-dynamic-lookup' ):
1158
            # preferred link method on homebrew for pysvn
1158
            # preferred link method on homebrew for pysvn
1159
            self._addVar( 'LDSHARED',   '%(CCC)s -bundle -g '
1159
            self._addVar( 'LDSHARED',   '%(CCC)s -bundle $(LDFLAGS) '
1160
                                        '-framework System '
1160
                                        '-framework System '
1161
                                        '-framework CoreFoundation '
1161
                                        '-framework CoreFoundation '
1162
                                        '-framework Kerberos '
1162
                                        '-framework Kerberos '
1163
                                        '-framework Security '
1163
                                        '-framework Security '
1164
                                        '-undefined dynamic_lookup '
1164
                                        '-undefined dynamic_lookup ')
1165
                                        '%(LDLIBS)s' )
1166
        else:
1165
        else:
1167
            self._addVar( 'LDSHARED',   '%(CCC)s -bundle -g '
1166
            self._addVar( 'LDSHARED',   '%(CCC)s -bundle $(LDFLAGS) '
1168
                                        '-framework System '
1167
                                        '-framework System '
1169
                                        '%(PYTHON_FRAMEWORK)s '
1168
                                        '%(PYTHON_FRAMEWORK)s '
1170
                                        '-framework CoreFoundation '
1169
                                        '-framework CoreFoundation '
1171
                                        '-framework Kerberos '
1170
                                        '-framework Kerberos '
1172
                                        '-framework Security '
1171
                                        '-framework Security ')
1173
                                        '%(LDLIBS)s' )
1174
1172
1175
class UnixCompilerGCC(CompilerGCC):
1173
class UnixCompilerGCC(CompilerGCC):
1176
    def __init__( self, setup ):
1174
    def __init__( self, setup ):
Lines 1233-1243 Link Here
1233
1231
1234
    def setupUtilities( self ):
1232
    def setupUtilities( self ):
1235
        self._addVar( 'CCCFLAGS',
1233
        self._addVar( 'CCCFLAGS',
1236
                                        '-g  '
1234
                                        '$(CXXFLAGS) '
1237
                                        '-Wall -fPIC -fexceptions -frtti '
1235
                                        '-Wall -fPIC -fexceptions -frtti '
1238
                                        '-I. -I%(APR_INC)s -I%(APU_INC)s -I%(SVN_INC)s '
1236
                                        '-I. -I%(APR_INC)s -I%(APU_INC)s -I%(SVN_INC)s '
1239
                                        '-D%(DEBUG)s' )
1237
                                        '-D%(DEBUG)s' )
1240
        self._addVar( 'LDEXE',          '%(CCC)s -g' )
1238
        self._addVar( 'LDEXE',          '%(CCC)s $(LDFLAGS)' )
1241
1239
1242
    def setupPySvn( self ):
1240
    def setupPySvn( self ):
1243
        self._pysvnModuleSetup()
1241
        self._pysvnModuleSetup()
Lines 1266-1272 Link Here
1266
1264
1267
        if self.options.hasOption( '--enable-debug' ):
1265
        if self.options.hasOption( '--enable-debug' ):
1268
            print( 'Info: Debug enabled' )
1266
            print( 'Info: Debug enabled' )
1269
            py_cflags_list.append( '-g' )
1267
            py_cflags_list.append( '$(CXXFLAGS)' )
1270
1268
1271
        if self.options.hasOption( '--disable-deprecated-functions-warnings' ):
1269
        if self.options.hasOption( '--disable-deprecated-functions-warnings' ):
1272
            print( 'Info: Disable deprecated functions warnings' )
1270
            print( 'Info: Disable deprecated functions warnings' )
Lines 1275-1281 Link Here
1275
        self._addVar( 'CCFLAGS',    ' '.join( py_cflags_list ) )
1273
        self._addVar( 'CCFLAGS',    ' '.join( py_cflags_list ) )
1276
        self._addVar( 'CCCFLAGS',   ' '.join( py_cflags_list+['-fexceptions -frtti'] ) )
1274
        self._addVar( 'CCCFLAGS',   ' '.join( py_cflags_list+['-fexceptions -frtti'] ) )
1277
        self._addVar( 'LDLIBS',     ' '.join( self._getLdLibs() ) )
1275
        self._addVar( 'LDLIBS',     ' '.join( self._getLdLibs() ) )
1278
        self._addVar( 'LDSHARED',   '%(CCC)s -shared -g' )
1276
        self._addVar( 'LDSHARED',   '%(CCC)s -shared $(LDFLAGS)' )
1279
1277
1280
#--------------------------------------------------------------------------------
1278
#--------------------------------------------------------------------------------
1281
class LinuxCompilerGCC(UnixCompilerGCC):
1279
class LinuxCompilerGCC(UnixCompilerGCC):

Return to bug 602152