Messages in this thread Patch in this message | | | Date | Thu, 14 May 1998 13:36:29 +0200 (CEST) | From | Niels Kristian Bech Jensen <> | Subject | [PATCH] Using '-mpentium' or '-mpentiumpro' with the new compilers. |
| |
Hi, This small patch detects if you use a compiler that supports the '-mpentium' and '-mpentiumpro' compiler flags and use the relevant flag for building the kernel. I haven't tested it with gcc-2.7.* compilers, so please let me know if it works.
All comments are welcome.
diff -urN linux-pre-2.1.102-1/arch/i386/Makefile linux/arch/i386/Makefile --- linux-pre-2.1.102-1/arch/i386/Makefile Sat May 9 05:32:37 1998 +++ linux/arch/i386/Makefile Thu May 14 13:15:49 1998 @@ -13,6 +13,8 @@ # Copyright (C) 1994 by Linus Torvalds # +CC_MAJOR_VERSION := $(shell $(CC) -v 2>&1 | tail -1 | cut -b 13-15) + AS86 =$(CROSS_COMPILE)as86 -0 -a AS386 =$(CROSS_COMPILE)as86 -3 LD86 =$(CROSS_COMPILE)ld86 -0 @@ -36,11 +38,19 @@ endif ifdef CONFIG_M586 +ifeq ($(CC_MAJOR_VERSION),2.7) CFLAGS := $(CFLAGS) -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=586 +else +CFLAGS := $(CFLAGS) -mpentium -DCPU=586 +endif endif ifdef CONFIG_M686 +ifeq ($(CC_MAJOR_VERSION),2.7) CFLAGS := $(CFLAGS) -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686 +else +CFLAGS := $(CFLAGS) -mpentiumpro -DCPU=686 +endif endif ifdef SMP -- Med venlig hilsen / Best regards nkbj@image.dk Niels Kristian Bech Jensen http://www.image.dk/~nkbj/
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |