Messages in this thread | | | Date | Thu, 25 Jun 1998 18:37:27 -0400 (EDT) | From | Phil Rosenthal <> | Subject | nonoptimized kernel compilation (an idea) |
| |
I noticed while compiling my kernel, that it uses the option "-m486" (and I have a pentium200) I have pgcc, and -mpentium makes it optimized for pentium, and m486 makes one optimized for a 486, since I dont have a 486, I wanted to change that... after looking into it, I found that arch/i386/Makefile, had this code:
ifdef CONFIG_M586 CFLAGS := $(CFLAGS) -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=586 endif
ifdef CONFIG_M686 CFLAGS := $(CFLAGS) -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686 endif
I changed it to this (it works with pgcc, probably egcs and gcc 2.8, but not with gcc 2.7)
ifdef CONFIG_M586 CFLAGS := $(CFLAGS) -mpentium -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=586 endif
ifdef CONFIG_M686 CFLAGS := $(CFLAGS) -mpentiumpro -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686 endif
now, since it doesnt work with gcc 2.7, it shouldnt be implemented like this, but maybe someone knows how to make it so that if it supports -mpentium/-mpentiumpro, it uses it, otherwise it will revert back to -m486
Any ideas? Anyone know how to code it properly?
I didn't benchmark a speed difference (too lazy) but it does "feel" more responsive...
--winter
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |