diff options
Diffstat (limited to 'debian/patches/mangle-fstack-protector.diff')
-rw-r--r-- | debian/patches/mangle-fstack-protector.diff | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/patches/mangle-fstack-protector.diff b/debian/patches/mangle-fstack-protector.diff new file mode 100644 index 0000000..19b27f7 --- /dev/null +++ b/debian/patches/mangle-fstack-protector.diff @@ -0,0 +1,26 @@ +# DP: When using GCC versions older than 4.9, automagically mangle +# DP: -fstack-protector-strong to -fstack-protector + +Index: b/Lib/distutils/sysconfig.py +=================================================================== +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -13,6 +13,7 @@ import _imp + import os + import re + import sys ++import fnmatch + + from .errors import DistutilsPlatformError + +@@ -197,6 +198,10 @@ def customize_compiler(compiler): + cc = newcc + if 'CXX' in os.environ: + cxx = os.environ['CXX'] ++ if fnmatch.filter([cc, cxx], '*-4.[0-8]'): ++ configure_cflags = configure_cflags.replace('-fstack-protector-strong', '-fstack-protector') ++ ldshared = ldshared.replace('-fstack-protector-strong', '-fstack-protector') ++ cflags = cflags.replace('-fstack-protector-strong', '-fstack-protector') + if 'LDSHARED' in os.environ: + ldshared = os.environ['LDSHARED'] + if 'CPP' in os.environ: |