Commit fc30054e by Aldy Hernandez Committed by Aldy Hernandez

re PR bootstrap/25672 (cross build's libgcc picks up CFLAGS)

	PR bootstrap/25672
	* configure.ac: Do not initialize CFLAGS_FOR_TARGET from CFLAGS if
	cross-compiling.  Similarly for CXX_FOR_TARGET.
	* configure: Regenerate.

From-SVN: r221326
parent 0757674c
2015-03-09 Aldy Hernandez <aldyh@redhat.com>
PR bootstrap/25672
* configure.ac: Do not initialize CFLAGS_FOR_TARGET from CFLAGS if
cross-compiling. Similarly for CXX_FOR_TARGET.
* configure: Regenerate.
2015-03-10 Ilya Enkovich <ilya.enkovich@intel.com> 2015-03-10 Ilya Enkovich <ilya.enkovich@intel.com>
* Makefile.def: Add libmpx. * Makefile.def: Add libmpx.
......
...@@ -6695,6 +6695,9 @@ fi ...@@ -6695,6 +6695,9 @@ fi
# gcc) are built with "-O2 -g", so include those options when setting # gcc) are built with "-O2 -g", so include those options when setting
# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET. # CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
if test "x$CFLAGS_FOR_TARGET" = x; then if test "x$CFLAGS_FOR_TARGET" = x; then
if test "x${is_cross_compiler}" = xyes; then
CFLAGS_FOR_TARGET="-g -O2"
else
CFLAGS_FOR_TARGET=$CFLAGS CFLAGS_FOR_TARGET=$CFLAGS
case " $CFLAGS " in case " $CFLAGS " in
*" -O2 "*) ;; *" -O2 "*) ;;
...@@ -6704,10 +6707,14 @@ if test "x$CFLAGS_FOR_TARGET" = x; then ...@@ -6704,10 +6707,14 @@ if test "x$CFLAGS_FOR_TARGET" = x; then
*" -g "* | *" -g3 "*) ;; *" -g "* | *" -g3 "*) ;;
*) CFLAGS_FOR_TARGET="-g $CFLAGS_FOR_TARGET" ;; *) CFLAGS_FOR_TARGET="-g $CFLAGS_FOR_TARGET" ;;
esac esac
fi
fi fi
if test "x$CXXFLAGS_FOR_TARGET" = x; then if test "x$CXXFLAGS_FOR_TARGET" = x; then
if test "x${is_cross_compiler}" = xyes; then
CXXFLAGS_FOR_TARGET="-g -O2"
else
CXXFLAGS_FOR_TARGET=$CXXFLAGS CXXFLAGS_FOR_TARGET=$CXXFLAGS
case " $CXXFLAGS " in case " $CXXFLAGS " in
*" -O2 "*) ;; *" -O2 "*) ;;
...@@ -6717,6 +6724,7 @@ if test "x$CXXFLAGS_FOR_TARGET" = x; then ...@@ -6717,6 +6724,7 @@ if test "x$CXXFLAGS_FOR_TARGET" = x; then
*" -g "* | *" -g3 "*) ;; *" -g "* | *" -g3 "*) ;;
*) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;; *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;;
esac esac
fi
fi fi
......
...@@ -2341,6 +2341,9 @@ AC_SUBST(DEBUG_PREFIX_CFLAGS_FOR_TARGET) ...@@ -2341,6 +2341,9 @@ AC_SUBST(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
# gcc) are built with "-O2 -g", so include those options when setting # gcc) are built with "-O2 -g", so include those options when setting
# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET. # CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
if test "x$CFLAGS_FOR_TARGET" = x; then if test "x$CFLAGS_FOR_TARGET" = x; then
if test "x${is_cross_compiler}" = xyes; then
CFLAGS_FOR_TARGET="-g -O2"
else
CFLAGS_FOR_TARGET=$CFLAGS CFLAGS_FOR_TARGET=$CFLAGS
case " $CFLAGS " in case " $CFLAGS " in
*" -O2 "*) ;; *" -O2 "*) ;;
...@@ -2350,10 +2353,14 @@ if test "x$CFLAGS_FOR_TARGET" = x; then ...@@ -2350,10 +2353,14 @@ if test "x$CFLAGS_FOR_TARGET" = x; then
*" -g "* | *" -g3 "*) ;; *" -g "* | *" -g3 "*) ;;
*) CFLAGS_FOR_TARGET="-g $CFLAGS_FOR_TARGET" ;; *) CFLAGS_FOR_TARGET="-g $CFLAGS_FOR_TARGET" ;;
esac esac
fi
fi fi
AC_SUBST(CFLAGS_FOR_TARGET) AC_SUBST(CFLAGS_FOR_TARGET)
if test "x$CXXFLAGS_FOR_TARGET" = x; then if test "x$CXXFLAGS_FOR_TARGET" = x; then
if test "x${is_cross_compiler}" = xyes; then
CXXFLAGS_FOR_TARGET="-g -O2"
else
CXXFLAGS_FOR_TARGET=$CXXFLAGS CXXFLAGS_FOR_TARGET=$CXXFLAGS
case " $CXXFLAGS " in case " $CXXFLAGS " in
*" -O2 "*) ;; *" -O2 "*) ;;
...@@ -2363,6 +2370,7 @@ if test "x$CXXFLAGS_FOR_TARGET" = x; then ...@@ -2363,6 +2370,7 @@ if test "x$CXXFLAGS_FOR_TARGET" = x; then
*" -g "* | *" -g3 "*) ;; *" -g "* | *" -g3 "*) ;;
*) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;; *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;;
esac esac
fi
fi fi
AC_SUBST(CXXFLAGS_FOR_TARGET) AC_SUBST(CXXFLAGS_FOR_TARGET)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment