Re: Intel Makefile Suggestion

Horst von Brand (vonbrand@sleipnir.valparaiso.cl)
Thu, 31 Dec 1998 10:48:50 -0400


Matthias Andree <mandree@sx1.HRZ.Uni-Dortmund.DE> said:
> On Wed, Dec 30, 1998 at 09:06:35AM +0100, Jakub Jelinek wrote:
> > Alternatively, do this in arch/i386/Makefile:

> > IS_EGCS := $(shell if $(CC) --version 2>&1 | grep 'egcs' /dev/null;
> > then echo y; else echo n; fi)

> This does not help for pgcc, gcc 2.8 and other variants the kernel
> might encounter.

> > ifdef CONFIG_M586
> > ifneq ($(IS_EGCS),y)
> > CPUFLAGS := -m486
> > else
> > CPUFLAGS := -mpentium -march=pentium

> -mpentium is -mcpu=pentium and as such is included in -march=pentium,
> so -march=pentium would suffice. You would need to switch from -O2 to
> -O6, too (see pgcc FAQ at http://www.goof.com/pcg/)

The -O6 might be adequate for pgcc, it is murder for egcs: -O3 and up
enables automatic inlining, and you *don't* want that: The kernel hackers
have been very careful to inline exactly those functions that benefit, and
keep out of line those that benefit from being out of line.

This is _not_ simple, there are many compiler variants around:

- gcc-2.7.2.3 is standard on ia32
- there seem to be some gcc-2.7.2.x previous still around (witness
-fno-strength-reduce on ia32)
- gcc-2.8.0, gcc-2.8.1 (I hear 2.8.0 is very broken, so you might count it
out or trap on it)
- various egcs variants (1.0.2, 1.0.3 with RedHat-5.x, 1.1, 1.1.1 are
latest stable distributions; there has been much change in the snapshots
lately). I understand egcs-1.1.1 is standard on non-intel...
- pgcc's of various vintages (I know next to nothing about them), only
useful on ia32 variants

I'd say keep it as now until the dust about the matter settles. Better have
the user be quite concicious that they are doing something nonstandard.
AFAIU, the gcc effort is now in the EGCS project's capable hands, and the
Pentium specific pgcc optimizations are also being (slowly!) absorbed into
egcs.

-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viņa del Mar, Chile                               +56 32 672616

- 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/