From: Richard Guenther <richard.guenther@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Paolo Bonzini <bonzini@gnu.org>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix up CFLAGS/CXXFLAGS gcc/configure adjustment (PR other/54692)
Date: Tue, 25 Sep 2012 11:57:00 -0000 [thread overview]
Message-ID: <CAFiYyc16yaZc_k+WXOX0JAgYo7gKAMpFuAUf7YrXSGmcVmbFRA@mail.gmail.com> (raw)
In-Reply-To: <20120925111948.GJ1787@tucnak.redhat.com>
On Tue, Sep 25, 2012 at 1:19 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> On Thu, Sep 13, 2012 at 06:24:14PM +0200, Paolo Bonzini wrote:
>> Il 13/09/2012 17:57, Jakub Jelinek ha scritto:
>> >>> > > 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.
>
> Seems the sed command was using " *" at the end, so it happily changed
> e.g. "-Og " into just "g " instead of either keeping "-Og " in, or
> removing it altogether. This patches fixes it, now
> -Ofast, -Og, -Os, -O, -O[0-9]* are removed when followed by whitespace
> and not otherwise. Bootstrapped/regtested on x86_64-linux and i686-linux,
> ok for trunk?
Looks good to me.
Thanks,
Richard.
> 2012-09-25 Jakub Jelinek <jakub@redhat.com>
>
> PR other/54692
> * configure.ac (CFLAGS, CXXFLAGS): Remove -Ofast or -Og
> properly.
> * configure: Regenerated.
>
> --- gcc/configure.ac.jj 2012-09-13 18:29:46.000000000 +0200
> +++ gcc/configure.ac 2012-09-24 21:47:41.606278259 +0200
> @@ -296,8 +296,8 @@ 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]]* *//" `
> - CXXFLAGS=`echo $CXXFLAGS | sed "s/-O[[s0-9]]* *//" ` ;;
> + *) CFLAGS=`echo "$CFLAGS " | sed -e "s/-Ofast[[ ]]//" -e "s/-O[[gs]][[ ]]//" -e "s/-O[[0-9]]*[[ ]]//" `
> + CXXFLAGS=`echo "$CXXFLAGS " | sed -e "s/-Ofast[[ ]]//" -e "s/-O[[gs]][[ ]]//" -e "s/-O[[0-9]]*[[ ]]//" ` ;;
> esac
> AC_SUBST(CFLAGS)
> AC_SUBST(CXXFLAGS)
> --- gcc/configure.jj 2012-09-17 11:13:13.119075354 +0200
> +++ gcc/configure 2012-09-24 21:49:02.900837573 +0200
> @@ -4863,8 +4863,8 @@ fi
> # optimizations to be activated explicitly by the toplevel.
> case "$CC" in
> */prev-gcc/xgcc*) ;;
> - *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" `
> - CXXFLAGS=`echo $CXXFLAGS | sed "s/-O[s0-9]* *//" ` ;;
> + *) CFLAGS=`echo "$CFLAGS " | sed -e "s/-Ofast[ ]//" -e "s/-O[gs][ ]//" -e "s/-O[0-9]*[ ]//" `
> + CXXFLAGS=`echo "$CXXFLAGS " | sed -e "s/-Ofast[ ]//" -e "s/-O[gs][ ]//" -e "s/-O[0-9]*[ ]//" ` ;;
> esac
>
>
>
>
> Jakub
next prev parent reply other threads:[~2012-09-25 11:27 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-12 20:04 Merge C++ conversion into trunk (0/6 - Overview) Diego Novillo
2012-08-12 20:57 ` Marc Glisse
2012-08-13 0:32 ` Diego Novillo
2012-08-12 22:34 ` H.J. Lu
2012-08-12 22:38 ` H.J. Lu
2012-08-13 0:28 ` Diego Novillo
2012-08-13 2:44 ` H.J. Lu
2012-08-13 9:37 ` Richard Guenther
2012-08-13 11:43 ` Diego Novillo
2012-08-14 13:49 ` Diego Novillo
2012-08-14 18:59 ` Diego Novillo
2012-08-16 16:50 ` Merge C++ conversion into trunk Iain Sandoe
2012-08-16 16:51 ` Diego Novillo
2012-08-20 20:58 ` Merge C++ conversion into trunk (0/6 - Overview) H.J. Lu
2012-08-21 1:31 ` Lawrence Crowl
2012-08-21 3:00 ` H.J. Lu
2012-08-21 6:33 ` Richard Guenther
2012-08-15 12:01 ` Richard Guenther
2012-08-15 12:19 ` Diego Novillo
2012-08-15 12:21 ` Richard Guenther
2012-08-15 12:23 ` Diego Novillo
2012-08-15 15:12 ` Jan Kratochvil
2012-08-15 15:44 ` Michael Matz
2012-08-15 15:50 ` Jan Kratochvil
2012-08-15 16:39 ` Jakub Jelinek
2012-08-15 16:00 ` Diego Novillo
2012-08-15 20:12 ` Toon Moene
2012-08-15 17:53 ` Tom Tromey
2012-08-15 18:02 ` Gabriel Dos Reis
2012-08-15 18:21 ` Tom Tromey
2012-08-15 18:26 ` Gabriel Dos Reis
2012-08-17 17:45 ` Keith Seitz
2012-08-17 17:56 ` H.J. Lu
2012-08-15 14:25 ` Mike Stump
2012-08-23 20:54 ` Mike Stump
2012-08-24 7:25 ` Paolo Bonzini
2012-08-24 9:13 ` Mike Stump
2012-08-24 12:30 ` Diego Novillo
2012-08-24 12:39 ` Jakub Jelinek
2012-08-24 12:44 ` Diego Novillo
2012-08-24 20:04 ` Mike Stump
2012-09-13 8:49 ` Jakub Jelinek
2012-09-13 8:53 ` Paolo Bonzini
2012-09-13 15:59 ` Jakub Jelinek
2012-09-13 16:24 ` Paolo Bonzini
2012-09-25 11:27 ` [PATCH] Fix up CFLAGS/CXXFLAGS gcc/configure adjustment (PR other/54692) Jakub Jelinek
2012-09-25 11:57 ` Richard Guenther [this message]
2012-09-25 16:32 ` Paolo Bonzini
2012-09-25 17:38 ` Jakub Jelinek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFiYyc16yaZc_k+WXOX0JAgYo7gKAMpFuAUf7YrXSGmcVmbFRA@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=bonzini@gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).