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,28 +6695,36 @@ fi ...@@ -6695,28 +6695,36 @@ 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
CFLAGS_FOR_TARGET=$CFLAGS if test "x${is_cross_compiler}" = xyes; then
case " $CFLAGS " in CFLAGS_FOR_TARGET="-g -O2"
*" -O2 "*) ;; else
*) CFLAGS_FOR_TARGET="-O2 $CFLAGS_FOR_TARGET" ;; CFLAGS_FOR_TARGET=$CFLAGS
esac case " $CFLAGS " in
case " $CFLAGS " in *" -O2 "*) ;;
*" -g "* | *" -g3 "*) ;; *) CFLAGS_FOR_TARGET="-O2 $CFLAGS_FOR_TARGET" ;;
*) CFLAGS_FOR_TARGET="-g $CFLAGS_FOR_TARGET" ;; esac
esac case " $CFLAGS " in
*" -g "* | *" -g3 "*) ;;
*) CFLAGS_FOR_TARGET="-g $CFLAGS_FOR_TARGET" ;;
esac
fi
fi fi
if test "x$CXXFLAGS_FOR_TARGET" = x; then if test "x$CXXFLAGS_FOR_TARGET" = x; then
CXXFLAGS_FOR_TARGET=$CXXFLAGS if test "x${is_cross_compiler}" = xyes; then
case " $CXXFLAGS " in CXXFLAGS_FOR_TARGET="-g -O2"
*" -O2 "*) ;; else
*) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS_FOR_TARGET" ;; CXXFLAGS_FOR_TARGET=$CXXFLAGS
esac case " $CXXFLAGS " in
case " $CXXFLAGS " in *" -O2 "*) ;;
*" -g "* | *" -g3 "*) ;; *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS_FOR_TARGET" ;;
*) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;; esac
esac case " $CXXFLAGS " in
*" -g "* | *" -g3 "*) ;;
*) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;;
esac
fi
fi fi
......
...@@ -2341,28 +2341,36 @@ AC_SUBST(DEBUG_PREFIX_CFLAGS_FOR_TARGET) ...@@ -2341,28 +2341,36 @@ 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
CFLAGS_FOR_TARGET=$CFLAGS if test "x${is_cross_compiler}" = xyes; then
case " $CFLAGS " in CFLAGS_FOR_TARGET="-g -O2"
*" -O2 "*) ;; else
*) CFLAGS_FOR_TARGET="-O2 $CFLAGS_FOR_TARGET" ;; CFLAGS_FOR_TARGET=$CFLAGS
esac case " $CFLAGS " in
case " $CFLAGS " in *" -O2 "*) ;;
*" -g "* | *" -g3 "*) ;; *) CFLAGS_FOR_TARGET="-O2 $CFLAGS_FOR_TARGET" ;;
*) CFLAGS_FOR_TARGET="-g $CFLAGS_FOR_TARGET" ;; esac
esac case " $CFLAGS " in
*" -g "* | *" -g3 "*) ;;
*) CFLAGS_FOR_TARGET="-g $CFLAGS_FOR_TARGET" ;;
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
CXXFLAGS_FOR_TARGET=$CXXFLAGS if test "x${is_cross_compiler}" = xyes; then
case " $CXXFLAGS " in CXXFLAGS_FOR_TARGET="-g -O2"
*" -O2 "*) ;; else
*) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS_FOR_TARGET" ;; CXXFLAGS_FOR_TARGET=$CXXFLAGS
esac case " $CXXFLAGS " in
case " $CXXFLAGS " in *" -O2 "*) ;;
*" -g "* | *" -g3 "*) ;; *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS_FOR_TARGET" ;;
*) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;; esac
esac case " $CXXFLAGS " in
*" -g "* | *" -g3 "*) ;;
*) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;;
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