Patchwork [configure] Make sure CFLAGS_FOR_TARGET And CXXFLAGS_FOR_TARGET contain -O2

login
register
mail settings
Submitter Christophe LYON
Date June 28, 2012, 9:05 a.m.
Message ID <4FEC1E4F.9020404@st.com>
Download mbox | patch
Permalink /patch/167819/
State New
Headers show

Comments

Christophe LYON - June 28, 2012, 9:05 a.m.
On 28.06.2012 09:32, Alexandre Oliva wrote:
> I suggest changing both occurrences of $CFLAGS within the case
> statements, then; the more uniform logic is more appealing to me.
>
> Patch approved with these changes.
>
> Thanks,
>
Thanks; here is an updated version taking your comment into account.

Can you commit it for me (I don't have write access).

Thanks.

Christophe.
2012-06-28  Christophe Lyon <christophe.lyon@st.com>

	* configure.ac (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Make sure
	they contain -O2.
	* configure: Regenerate.
Alexandre Oliva - June 28, 2012, 11:52 a.m.
On Jun 28, 2012, Christophe Lyon <christophe.lyon@st.com> wrote:

> Can you commit it for me (I don't have write access).

Done, GCC SVN and src CVS trees.  Thanks!

> 2012-06-28  Christophe Lyon <christophe.lyon@st.com>

> 	* configure.ac (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Make sure
> 	they contain -O2.
> 	* configure: Regenerate.

Patch

diff --git a/configure b/configure
index 083f2ce..1ab12db 100755
--- a/configure
+++ b/configure
@@ -6690,11 +6690,11 @@  if test "x$CFLAGS_FOR_TARGET" = x; then
   CFLAGS_FOR_TARGET=$CFLAGS
   case " $CFLAGS " in
     *" -O2 "*) ;;
-    *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
+    *) CFLAGS_FOR_TARGET="-O2 $CFLAGS_FOR_TARGET" ;;
   esac
   case " $CFLAGS " in
     *" -g "* | *" -g3 "*) ;;
-    *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
+    *) CFLAGS_FOR_TARGET="-g $CFLAGS_FOR_TARGET" ;;
   esac
 fi
 
@@ -6703,11 +6703,11 @@  if test "x$CXXFLAGS_FOR_TARGET" = x; then
   CXXFLAGS_FOR_TARGET=$CXXFLAGS
   case " $CXXFLAGS " in
     *" -O2 "*) ;;
-    *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
+    *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS_FOR_TARGET" ;;
   esac
   case " $CXXFLAGS " in
     *" -g "* | *" -g3 "*) ;;
-    *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
+    *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;;
   esac
 fi
 
diff --git a/configure.ac b/configure.ac
index 378e9f5..82dbe4c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2145,11 +2145,11 @@  if test "x$CFLAGS_FOR_TARGET" = x; then
   CFLAGS_FOR_TARGET=$CFLAGS
   case " $CFLAGS " in
     *" -O2 "*) ;;
-    *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
+    *) CFLAGS_FOR_TARGET="-O2 $CFLAGS_FOR_TARGET" ;;
   esac
   case " $CFLAGS " in
     *" -g "* | *" -g3 "*) ;;
-    *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
+    *) CFLAGS_FOR_TARGET="-g $CFLAGS_FOR_TARGET" ;;
   esac
 fi
 AC_SUBST(CFLAGS_FOR_TARGET)
@@ -2158,11 +2158,11 @@  if test "x$CXXFLAGS_FOR_TARGET" = x; then
   CXXFLAGS_FOR_TARGET=$CXXFLAGS
   case " $CXXFLAGS " in
     *" -O2 "*) ;;
-    *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
+    *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS_FOR_TARGET" ;;
   esac
   case " $CXXFLAGS " in
     *" -g "* | *" -g3 "*) ;;
-    *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
+    *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;;
   esac
 fi
 AC_SUBST(CXXFLAGS_FOR_TARGET)