summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haubenwallner <haubi@gentoo.org>2011-05-26 09:14:13 +0000
committerMichael Haubenwallner <haubi@gentoo.org>2011-05-26 09:14:13 +0000
commit4d1836866892ade36456492ec431b6b0734f3650 (patch)
tree5dd95a6dc7eeecb6a05e91d9448d307ab117b6b5 /src/patchsets/mico
parentnot patching autoconf-generated any more (need eautoreconf in ebuild) (diff)
downloadgentoo-4d1836866892ade36456492ec431b6b0734f3650.tar.gz
gentoo-4d1836866892ade36456492ec431b6b0734f3650.tar.bz2
gentoo-4d1836866892ade36456492ec431b6b0734f3650.zip
moved from ebuild: Stop CFLAGS/CXXFLAGS tweaking in configure
Diffstat (limited to 'src/patchsets/mico')
-rw-r--r--src/patchsets/mico/2.3.13/010_all_preserve-cflags.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/patchsets/mico/2.3.13/010_all_preserve-cflags.patch b/src/patchsets/mico/2.3.13/010_all_preserve-cflags.patch
new file mode 100644
index 0000000000..5faa255fca
--- /dev/null
+++ b/src/patchsets/mico/2.3.13/010_all_preserve-cflags.patch
@@ -0,0 +1,64 @@
+Do not tweak CFLAGS/CXXFLAGS for -g/-O2 if not explicitly requested
+by configure arguments --*able-debug/--*able-optimize.
+
+--- configure.in.orig 2011-05-25 16:22:01.402618836 +0200
++++ configure.in 2011-05-25 16:27:35.022640710 +0200
+@@ -112,12 +112,12 @@
+ use_repo=$enableval, use_repo=no)
+
+ AC_ARG_ENABLE(optimize,
+- [ --disable-optimize do not use -O2 to compile],
+- use_opt=$enableval, use_opt=yes)
++ [ --enable-optimize use -O2 to compile],
++ use_opt=$enableval, use_opt=default)
+
+ AC_ARG_ENABLE(debug,
+ [ --enable-debug use -g to compile],
+- use_debug=$enableval, use_debug=no)
++ use_debug=$enableval, use_debug=default)
+
+ AC_ARG_ENABLE(shared,
+ [ --disable-shared don't build shared libs],
+@@ -976,7 +976,7 @@
+ CONF_SHARED_CC="$CXX -shared"
+ CONF_PICFLAGS=-fPIC
+ CONF_LDSOFLAGS=-fPIC
+- if test X"$use_opt" != Xyes; then
++ if test X"$use_opt" = Xno; then
+ # by default Intel uses -O so we need to disable it
+ CONF_OPT_FLAGS=-O0
+ use_opt=yes
+@@ -1032,17 +1032,23 @@
+ #
+
+ changequote(<<, >>)
+-CXXFLAGS=`echo " $CXXFLAGS " | sed -e 's/ -g / /g' -e 's/ -O[0-9]* / /g'`
+-CFLAGS=`echo " $CFLAGS " | sed -e 's/ -g / /g' -e 's/ -O[0-9]* / /g'`
+-changequote([, ])
+-if test X"$use_opt" != Xno; then
+- CXXFLAGS="$CONF_OPT_FLAGS $CXXFLAGS"
+- CFLAGS="$CONF_OPT_FLAGS $CFLAGS"
+-fi
+-if test X"$use_debug" != Xno; then
+- CXXFLAGS="$CONF_DEBUG_FLAGS $CXXFLAGS"
+- CFLAGS="$CONF_DEBUG_FLAGS $CFLAGS"
++if test X"$use_opt" != Xdefault; then
++ CXXFLAGS=`echo " $CXXFLAGS " | sed -e 's/ -O[0-9]* / /g'`
++ CFLAGS=`echo " $CFLAGS " | sed -e 's/ -O[0-9]* / /g'`
++ if test X"$use_opt" = Xyes; then
++ CXXFLAGS="$CONF_OPT_FLAGS $CXXFLAGS"
++ CFLAGS="$CONF_OPT_FLAGS $CFLAGS"
++ fi
+ fi
++if test X"$use_debug" != Xdefault; then
++ CXXFLAGS=`echo " $CXXFLAGS " | sed -e 's/ -g / /g'`
++ CFLAGS=`echo " $CFLAGS " | sed -e 's/ -g / /g'`
++ if test X"$use_debug" = Xyes; then
++ CXXFLAGS="$CONF_DEBUG_FLAGS $CXXFLAGS"
++ CFLAGS="$CONF_DEBUG_FLAGS $CFLAGS"
++ fi
++fi
++changequote([, ])
+
+ if test "x$use_memcheck" = "xyes" ; then
+ case $target in