diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2015-03-10 16:37:53 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2015-03-10 16:37:53 +0000 |
commit | fc30054eff136a33c545df9337dfb41ce93623a3 (patch) | |
tree | 97a44f4af7af6c36d2792d5d77bd9bc86eb73655 /configure | |
parent | 0757674c837edede75a9c8a840c55190f971c004 (diff) | |
download | gcc-fc30054eff136a33c545df9337dfb41ce93623a3.zip gcc-fc30054eff136a33c545df9337dfb41ce93623a3.tar.gz gcc-fc30054eff136a33c545df9337dfb41ce93623a3.tar.bz2 |
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
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 44 |
1 files changed, 26 insertions, 18 deletions
@@ -6695,28 +6695,36 @@ fi # gcc) are built with "-O2 -g", so include those options when setting # CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET. if test "x$CFLAGS_FOR_TARGET" = x; then - CFLAGS_FOR_TARGET=$CFLAGS - case " $CFLAGS " in - *" -O2 "*) ;; - *) CFLAGS_FOR_TARGET="-O2 $CFLAGS_FOR_TARGET" ;; - esac - case " $CFLAGS " in - *" -g "* | *" -g3 "*) ;; - *) CFLAGS_FOR_TARGET="-g $CFLAGS_FOR_TARGET" ;; - esac + if test "x${is_cross_compiler}" = xyes; then + CFLAGS_FOR_TARGET="-g -O2" + else + CFLAGS_FOR_TARGET=$CFLAGS + case " $CFLAGS " in + *" -O2 "*) ;; + *) CFLAGS_FOR_TARGET="-O2 $CFLAGS_FOR_TARGET" ;; + esac + case " $CFLAGS " in + *" -g "* | *" -g3 "*) ;; + *) CFLAGS_FOR_TARGET="-g $CFLAGS_FOR_TARGET" ;; + esac + fi fi if test "x$CXXFLAGS_FOR_TARGET" = x; then - CXXFLAGS_FOR_TARGET=$CXXFLAGS - case " $CXXFLAGS " in - *" -O2 "*) ;; - *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS_FOR_TARGET" ;; - esac - case " $CXXFLAGS " in - *" -g "* | *" -g3 "*) ;; - *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;; - esac + if test "x${is_cross_compiler}" = xyes; then + CXXFLAGS_FOR_TARGET="-g -O2" + else + CXXFLAGS_FOR_TARGET=$CXXFLAGS + case " $CXXFLAGS " in + *" -O2 "*) ;; + *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS_FOR_TARGET" ;; + esac + case " $CXXFLAGS " in + *" -g "* | *" -g3 "*) ;; + *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;; + esac + fi fi |