RE: nonoptimized kernel compilation (an idea)

Amsden, Zachary (amsdenz@aavid.com)
Fri, 26 Jun 1998 10:06:51 -0400


> 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?
Yes, the section where it asks if it should build an ELF
kernel should also ask which compiler, i.e
gcc-aout, gcc-elf, pgcc, egcs and define CPUFLAGS
based on processor/compiler.
Actually probably don't need gcc-aout, if anyone still
compiles aout kernels then they have misplaced loyalty ;)

Zach Amsden
amsden@andrew.cmu.edu

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu