This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Linux kernel patch
- To: Michael Meissner <meissner at cygnus dot com>
- Subject: Re: Linux kernel patch
- From: Richard Henderson <rth at cygnus dot com>
- Date: Wed, 26 Nov 1997 11:57:55 -0800
- Cc: egcs at cygnus dot com
- References: <199711261718.MAA00820@tiktok.cygnus.com>
- Reply-To: Richard Henderson <rth at cygnus dot com>
On Wed, Nov 26, 1997 at 12:18:54PM -0500, Michael Meissner wrote:
> + Compiler supports -mcpu=pentiumpro and -march=pentiumpro
> + CONFIG_GCC_PENTIUMPRO
> + This enables support to use the -mcpu=pentiumpro and -march=pentiumpro
> + switches that are available on newer GCC compilers. If you use this
> + switch, then your kernel will not run on a Pentium, 486, or 386
> + processor.
Better to simply have the makefile detect if these options are
available. It is already the case that if you configure for 586
that you cannot run the kernel on a 386.
Something like
ifdef CONFIG_M686
CFLAGS := $(CFLAGS) -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686 \
$(shell if $(CC) -mcpu=pentiumpro -march=pentiumpro -xc /dev/null -c -o /dev/null > /dev/null 2>&1 ; then echo -mcpu=pentiumpro -march=pentiumpro ; else echo -m486 ; fi)
endif
r~