Re: -fno-strength-reduce flag patch

Rob (rglover@ruby.cuhsd.org)
Mon, 15 Sep 1997 19:08:34 -0700 (PDT)


with 2.7.2.1, the -fno-strength-reduce flag simply does nothing at all..
wasn't fixed, just disabled....


I don't know about 2.7.2.2..... haven't been boning up on my GCC ;)

-Rob

On Mon, 15 Sep 1997, Paul Rusty Russell wrote:

> Hi all,
>
> I notice that -fno-strength-reduce is still specified for
> CFLAGS in i386/Makefile. I believe this optimisation bug was fixed in
> gcc 2.7.2.1.
>
> This (ugly) one-line patch to 2.1.55 re-enables strength
> reduction for gcc 2.7.2.x, 2.[89], [3-9], etc - should be futureproof
> enough for a few years: at worst it will enable -fno-strength-reduce
> again when gcc 2.10 is released...
>
> *** linux/arch/i386/Makefile.~1~ Fri May 16 09:48:01 1997
> --- linux/arch/i386/Makefile Sun Sep 14 19:04:31 1997
> ***************
> *** 23,29 ****
> LDFLAGS=-e stext
> LINKFLAGS =-T $(TOPDIR)/arch/i386/vmlinux.lds $(LDFLAGS)
>
> ! CFLAGS := $(CFLAGS) -pipe -fno-strength-reduce
>
> ifdef CONFIG_M386
> CFLAGS := $(CFLAGS) -m386 -DCPU=386
> --- 23,29 ----
> LDFLAGS=-e stext
> LINKFLAGS =-T $(TOPDIR)/arch/i386/vmlinux.lds $(LDFLAGS)
>
> ! CFLAGS := $(CFLAGS) -pipe $(shell $(CC) -v 2>&1|egrep -q 'version (2\.7\.2\.[0-9]|2\.7\.[3-9]|2\.[8-9]|[3-9]\.)' || echo -fno-strength-reduce)
>
> ifdef CONFIG_M386
> CFLAGS := $(CFLAGS) -m386 -DCPU=386
>
>
> Enjoy,
> Paul.
> --
> .sig lost in the mail.
>