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
This commit is contained in:
Aldy Hernandez 2015-03-10 16:37:53 +00:00 committed by Aldy Hernandez
parent 0757674c83
commit fc30054eff
3 changed files with 59 additions and 36 deletions

View File

@ -1,3 +1,10 @@
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.

8
configure vendored
View File

@ -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
*" -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
*" -g "* | *" -g3 "*) ;; *" -g "* | *" -g3 "*) ;;
*) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;; *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;;
esac esac
fi
fi fi

View File

@ -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
*" -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
*" -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)