summaryrefslogtreecommitdiff
path: root/dev-python/pysvn/files/pysvn-1.9.11-respect-flags.patch
blob: 9a9bcd7f44ec2890cbcc1dc7c11bb0b7c6d17f9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
From 73655a682b69fd514f7060eb67e60ecb617c5f27 Mon Sep 17 00:00:00 2001
From: Sebastian Pipping <sebastian@pipping.org>
Date: Sun, 1 Mar 2020 14:16:13 +0100
Subject: [PATCH] Respect CC, CXX, LDFLAGS

---
 Patches/test_proplist.mak |  4 ++--
 Source/setup_configure.py | 24 ++++++++++--------------
 2 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/Patches/test_proplist.mak b/Patches/test_proplist.mak
index 9d9a58a..02e7a68 100644
--- a/Patches/test_proplist.mak
+++ b/Patches/test_proplist.mak
@@ -2,7 +2,7 @@ CCCFLAGS=-fPIC -fexceptions -frtti -I$(SVN_INC) -I$(APR_INC)
 LDLIBS=-L$(SVN_LIB) -lsvn_client-1 -lapr-0
 
 test_proplist: test_proplist.o
-	g++ -g -o test_proplist test_proplist.o $(LDLIBS)
+	$(CXX) $(LDFLAGS) -o test_proplist test_proplist.o $(LDLIBS)
 
 test_proplist.o: test_proplist.cpp
-	g++ -c -g $(CCCFLAGS) -o $@ $<
+	$(CXX) -c $(LDFLAGS) $(CCCFLAGS) -o $@ $<
diff --git a/Source/setup_configure.py b/Source/setup_configure.py
index e02a6a5..bbe7ec7 100644
--- a/Source/setup_configure.py
+++ b/Source/setup_configure.py
@@ -900,8 +900,8 @@ class CompilerGCC(Compiler):
     def __init__( self, setup ):
         Compiler.__init__( self, setup )
 
-        self._addVar( 'CCC',            'g++' )
-        self._addVar( 'CC',             'gcc' )
+        self._addVar( 'CCC',            '$(CXX)' )
+        self._addVar( 'CC',             '$(CC)' )
 
     def getPythonExtensionFileExt( self ):
         return '.so'
@@ -1037,8 +1037,8 @@ class MacOsxCompilerGCC(CompilerGCC):
         else:
             arch_options = ''
 
-        self._addVar( 'CCC',            'g++ %s' % (arch_options,) )
-        self._addVar( 'CC',             'gcc %s' % (arch_options,) )
+        self._addVar( 'CCC',            '$(CXX) %s' % (arch_options,) )
+        self._addVar( 'CC',             '$(CC) %s' % (arch_options,) )
 
         self._find_paths_pycxx_dir = [
                         '../Import/pycxx-%d.%d.%d' % min_pycxx_version,
@@ -1104,11 +1104,10 @@ class MacOsxCompilerGCC(CompilerGCC):
 
     def setupUtilities( self ):
         self._addVar( 'CCCFLAGS',
-                                        '-g  '
                                         '-Wall -fPIC -fexceptions -frtti '
                                         '-I. -I%(APR_INC)s -I%(APU_INC)s -I%(SVN_INC)s '
                                         '-D%(DEBUG)s' )
-        self._addVar( 'LDEXE',          '%(CCC)s -g' )
+        self._addVar( 'LDEXE',          '%(CCC)s $(LDFLAGS)' )
 
     def setupPySvn( self ):
         # Support building in a virtualenv.
@@ -1132,7 +1131,6 @@ class MacOsxCompilerGCC(CompilerGCC):
         self._addVar( 'PYTHON_INC',         distutils.sysconfig.get_python_inc() )
 
         py_cflags_list = [
-                    '-g',
                     '-Wall -fPIC',
                     '-I. -I%(APR_INC)s -I%(APU_INC)s -I%(SVN_INC)s',
                     '-DPYCXX_PYTHON_2TO3 -I%(PYCXX)s -I%(PYCXX_SRC)s -I%(PYTHON_INC)s',
@@ -1166,7 +1164,7 @@ class MacOsxCompilerGCC(CompilerGCC):
 
         if self.options.hasOption( '--link-python-framework-via-dynamic-lookup' ):
             # preferred link method on homebrew for pysvn
-            self._addVar( 'LDSHARED',   '%(CCC)s -bundle -g '
+            self._addVar( 'LDSHARED',   '%(CCC)s -bundle $(LDFLAGS) '
                                         '-framework System '
                                         '-framework CoreFoundation '
                                         '-framework Kerberos '
@@ -1174,7 +1172,7 @@ class MacOsxCompilerGCC(CompilerGCC):
                                         '-undefined dynamic_lookup '
                                         '%(LDLIBS)s' )
         else:
-            self._addVar( 'LDSHARED',   '%(CCC)s -bundle -g '
+            self._addVar( 'LDSHARED',   '%(CCC)s -bundle $(LDFLAGS) '
                                         '-framework System '
                                         '%(PYTHON_FRAMEWORK)s '
                                         '-framework CoreFoundation '
@@ -1247,11 +1245,10 @@ class UnixCompilerGCC(CompilerGCC):
 
     def setupUtilities( self ):
         self._addVar( 'CCCFLAGS',
-                                        '-g  '
                                         '-Wall -fPIC -fexceptions -frtti '
                                         '-I. -I%(APR_INC)s -I%(APU_INC)s -I%(SVN_INC)s '
                                         '-D%(DEBUG)s' )
-        self._addVar( 'LDEXE',          '%(CCC)s -g' )
+        self._addVar( 'LDEXE',          '%(CCC)s $(LDFLAGS)' )
 
     def setupPySvn( self ):
         self._pysvnModuleSetup()
@@ -1279,8 +1276,7 @@ class UnixCompilerGCC(CompilerGCC):
         py_cflags_list.extend( self._getDefines( '-D%s' ) )
 
         if self.options.hasOption( '--enable-debug' ):
-            print( 'Info: Debug enabled' )
-            py_cflags_list.append( '-g' )
+            print( 'Info: --enable-debug ignored' )
 
         if self.options.hasOption( '--disable-deprecated-functions-warnings' ):
             print( 'Info: Disable deprecated functions warnings' )
@@ -1289,7 +1285,7 @@ class UnixCompilerGCC(CompilerGCC):
         self._addVar( 'CCFLAGS',    ' '.join( py_cflags_list ) )
         self._addVar( 'CCCFLAGS',   ' '.join( py_cflags_list+['-fexceptions -frtti'] ) )
         self._addVar( 'LDLIBS',     ' '.join( self._getLdLibs() ) )
-        self._addVar( 'LDSHARED',   '%(CCC)s -shared -g' )
+        self._addVar( 'LDSHARED',   '%(CCC)s -shared $(LDFLAGS)' )
 
 #--------------------------------------------------------------------------------
 class LinuxCompilerGCC(UnixCompilerGCC):
-- 
2.24.1