This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Merge C++ conversion into trunk (0/6 - Overview)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: Mike Stump <mikestump at comcast dot net>, Diego Novillo <dnovillo at google dot com>, gcc-patches at gcc dot gnu dot org, Lawrence Crowl <crowl at google dot com>, dj at redhat dot com, rguenther at suse dot de, tromey at redhat dot com, laurynas dot biveinis at gmail dot com
- Date: Thu, 13 Sep 2012 17:57:36 +0200
- Subject: Re: Merge C++ conversion into trunk (0/6 - Overview)
- References: <20120812200427.GA12561@google.com> <7C104A77-8655-41DE-AF40-B1248B67D2E1@comcast.net> <20120913084621.GC22619@tucnak.redhat.com> <50519F03.4030801@gnu.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Sep 13, 2012 at 10:53:23AM +0200, Paolo Bonzini wrote:
> Il 13/09/2012 10:46, Jakub Jelinek ha scritto:
> >> > # Remove the -O2: for historical reasons, unless bootstrapping we prefer
> >> > # optimizations to be activated explicitly by the toplevel.
> >> > case "$CC" in
> >> > */prev-gcc/xgcc*) ;;
> >> > *) CFLAGS=`echo $CFLAGS | sed "s/-O[[s0-9]]* *//" ` ;;
> >> > esac
> >> > AC_SUBST(CFLAGS)
> >> >
> >> > in configure.ac does this. I think if CXXFLAGS is also so done, we'd gain parity.
> > Can we get this change in? The current state is terribly annoying.
>
> Yes, please go ahead.
Here it is, bootstrapped/regtested on x86_64-linux and i686-linux,
additionally tested on --disable-bootstrap tree, both by make cc1 inside of
gcc subdir (no -O2) and make all-gcc above it (with -O2).
Ok for trunk?
2012-09-13 Jakub Jelinek <jakub@redhat.com>
* configure.ac (CXXFLAGS): Remove -O2 when not bootstrapping.
* configure: Regenerated.
--- gcc/configure.ac.jj 2012-09-13 07:54:41.000000000 +0200
+++ gcc/configure.ac 2012-09-13 14:19:54.016741197 +0200
@@ -296,9 +296,11 @@ AC_SUBST(OUTPUT_OPTION)
# optimizations to be activated explicitly by the toplevel.
case "$CC" in
*/prev-gcc/xgcc*) ;;
- *) CFLAGS=`echo $CFLAGS | sed "s/-O[[s0-9]]* *//" ` ;;
+ *) CFLAGS=`echo $CFLAGS | sed "s/-O[[s0-9]]* *//" `
+ CXXFLAGS=`echo $CXXFLAGS | sed "s/-O[[s0-9]]* *//" ` ;;
esac
AC_SUBST(CFLAGS)
+AC_SUBST(CXXFLAGS)
# Determine PICFLAG for target gnatlib.
GCC_PICFLAG_FOR_TARGET
--- gcc/configure.jj 2012-09-13 07:54:39.000000000 +0200
+++ gcc/configure 2012-09-13 14:34:40.429269215 +0200
@@ -4863,10 +4863,12 @@ fi
# optimizations to be activated explicitly by the toplevel.
case "$CC" in
*/prev-gcc/xgcc*) ;;
- *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;;
+ *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" `
+ CXXFLAGS=`echo $CXXFLAGS | sed "s/-O[s0-9]* *//" ` ;;
esac
+
# Determine PICFLAG for target gnatlib.
@@ -17782,7 +17784,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 17785 "configure"
+#line 17787 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -17888,7 +17890,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 17891 "configure"
+#line 17893 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
Jakub