Re: Intel Makefile Suggestion

Jakub Jelinek (jj@sunsite.ms.mff.cuni.cz)
Wed, 30 Dec 1998 09:06:35 +0100 (CET)


> It would be convenient for me to put the "-mpentium
> -march=pentium" flags in the 586 config (and likewise for
> 686), but I recognize that older versions of GCC might balk
> at this. That's fine. I would like to suggest that the
> -m486 be taken out of those blocks, though. Is this a bad
> idea?

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)

ifdef CONFIG_M586
ifneq ($(IS_EGCS),y)
CPUFLAGS := -m486
else
CPUFLAGS := -mpentium -march=pentium
endif
CFLAGS := $(CFLAGS) $(CPUFLAGS) -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=586
endif

ifdef CONFIG_M686
ifneq ($(IS_EGCS),y)
CPUFLAGS := -m486
else
CPUFLAGS := -mpentium -march=pentiumpro
endif
CFLAGS := $(CFLAGS) $(CPUFLAGS) -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686
endif

Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
UltraLinux | http://ultra.linux.cz/ | http://ultra.penguin.cz/
Linux version 2.1.130 on a sparc64 machine (3958.37 BogoMips)
___________________________________________________________________

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