Re: [PATCH] Support new egcs/pgcc -mpentium(pro) options

Andi Kleen (ak@muc.de)
Sun, 13 Dec 1998 13:44:24 +0100


On Sun, Dec 13, 1998 at 01:36:51PM +0100, Matthias Andree wrote:
>
> > and remove the -malign-* options, because egcs does now a better job
> > at that. -fno-gcse is needed to prevent code bloat and excessive spill
> > code on x86 (the global CSE pass does not seem to be well tuned for
> > register starved machines like the x86 yet). Also it is less risky, because
> > GCSE does a lot of code movement, which might uncover locking bugs (this
> > applies if you want a working kernel, if you want to uncover bugs it looks
> > different ;)
>
> Besides the -fno-gcse, you should really have a closer look at my patch.
> These -malign/-m options are only used if enabled in the config and
> should default to off...

I don't think the user should care about such details.

>
> > The problem is that gcc 2.7.2 does not understand these new options,
> > so the Makefiles have to know which compiler version is being used.
>
> ...to circumvent this.
>
> > Now using a CONFIG_* option to select the kernel compiler is rather
> > ugly, because the kernel makefile could just check for that itself. For
>
> That would prevent the user from deciding for himself IF he wants to use
> these new options.

Linux already has far too many options, the goal should be less options,
not more option. If the user really has a good reason to use other
option he can edit the Makefile.

> > Alternatives are cheap hacks like:
> >
> > Makefile.pre
> >
> > #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
>
> Am I missing something here? How can a Makefile know about the compiler?

Read further. This Makefile is preprocessed by gcc -E.

> I am just wondering if this construct can be used to pass the compiler
> version to the *config scripts which then could disable the new -m
> directives in turn.
>
> > ifdef CONFIG_M686
> > # the bug of -fno-strength-reduce is fixed in 2.7.x minor releases,
> > # so in theory we could test for that too.
>
> I don't care for 2.6 and older gcc any more. 2.7.2.x are stable.

It was not refering to 2.6. 2.7.2 has a a strength reduce bug, that was
worked around by -fno-strength-reduce. That was fixed by a patch release
(2.7.2.2 I believe)

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/