summaryrefslogtreecommitdiff
path: root/stepmake
diff options
context:
space:
mode:
authorMarkus Oehme <oehme.markus@gmx.de>2012-07-10 11:47:00 +0200
committerJohn Mandereau <john.mandereau@gmail.com>2012-07-15 02:21:05 +0200
commit49e9d46c164c99a85cb17efc4f17d7d3391af09b (patch)
tree3eb195a5b57d20cce147fb0b058962ab1ddba9b8 /stepmake
parentd05afb4c0bf29cbd6a98691c9c62afa1604fa4b2 (diff)
Don't split -f CPP flags in python-config output
Fix LilyPond Issue 2634 "aclocal.m4 incorrectly remove parts of python-cflags output". Bug reported by Cyprien Nicolas from Gentoo bug 415793.
Diffstat (limited to 'stepmake')
-rw-r--r--stepmake/aclocal.m46
1 files changed, 5 insertions, 1 deletions
diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4
index b42851e57d..682b6b1bd1 100644
--- a/stepmake/aclocal.m4
+++ b/stepmake/aclocal.m4
@@ -1035,7 +1035,11 @@ AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [
# Clean out junk: http://bugs.python.org/issue3290
# Python headers may need some -f* flags, leave them in.
# We want the sed commands to look like 's/-[WDOm][[:alnum:][:punct:]][[:alnum:][:punct:]]*//g' and 's/-arch [^[:space:]]*//g', but automake eats brackets.
- PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/-[[WDOm]][[[:alnum:][:punct:]]][[[:alnum:][:punct:]]]*//g' | sed -e 's/-arch @<:@^@<:@:space:@:>@@:>@*//g'`
+ #PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/-[[WDOm]][[[:alnum:][:punct:]]][[[:alnum:][:punct:]]]*//g' | sed -e 's/-arch @<:@^@<:@:space:@:>@@:>@*//g'`
+ # The above sed BRE matches parts of legal options, stipping down part of that option, resulting in invalid gcc arguments. Gentoo Bug #415793
+ # For instance, '-floop-stip-mime' becomes '-floop-strip', and '-fvect-cost-model' becomes '-fvect-cost'.
+ # Tentative fix to require a non alphanumeric character before the initial hyphen of the BRE or the hyphen being the first character in the string.
+ PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/\(^\|[[^[:alnum:]]]\)-[[WDOm]][[[:alnum:][:punct:]]][[[:alnum:][:punct:]]]*//g' | sed -e 's/-arch @<:@^@<:@:space:@:>@@:>@*//g'`
PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
fi