diff -urN --exclude='*.orig' linux-2.6.10-rc3-mm1/arch/i386/Kconfig.debug linux-2.6.10-rc3-no2/arch/i386/Kconfig.debug --- linux-2.6.10-rc3-mm1/arch/i386/Kconfig.debug 2004-12-22 17:08:10.000000000 -0500 +++ linux-2.6.10-rc3-no2/arch/i386/Kconfig.debug 2004-12-22 21:09:45.864449548 -0500 @@ -55,6 +55,47 @@ on the VM subsystem for higher order allocations. This option will also use IRQ stacks to compensate for the reduced stackspace. +config CFLAGS_EDIT + bool "CFLAGS hacking" + default n + help + This allows you to append to or override the CFLAGS set for your + machine. Changing CFLAGS is commonly a very bad idea, because + Kernel Hackers Know Best. However if you wish to mess around + with your CFLAGS anyway, enable this and enter your CFLAGS + string to append below. + + The original intent of this option is to allow for use of flags that + don't really affect the result so much as gcc itself - maybe you + don't want to guess branch probabilities for some reason. That said, + we recognize that there's a nicely sized market for people who just + want to tinker, and this is why this option exists. + + A lot of things may become unpredictable when using aggressive CFLAGS + in the kernel. Don't complain about _anything_ until disabling this + option. + + If you have any doubt, say N. + +config CFLAGS_STRING + string "New CFLAGS" + depends on CFLAGS_EDIT + default "CHANGE ME" + help + Enter your new CFLAGS here, using appropriate syntax for gcc. If you + don't know what this means, flee now. + +config CFLAGS_OVERRIDE + bool "Override existing CFLAGS" + depends on CFLAGS_EDIT + default n + help + This allows you to unset any CFLAGS generated from processor selections + made at the top of the config. + + There is no reason to enable this. You always want the bare minimum for + your processor. Say N. + config X86_FIND_SMP_CONFIG bool depends on X86_LOCAL_APIC || X86_VOYAGER diff -urN --exclude='*.orig' linux-2.6.10-rc3-mm1/arch/i386/Makefile linux-2.6.10-rc3-no2/arch/i386/Makefile --- linux-2.6.10-rc3-mm1/arch/i386/Makefile 2004-12-22 17:08:10.000000000 -0500 +++ linux-2.6.10-rc3-no2/arch/i386/Makefile 2004-12-22 20:47:13.193729144 -0500 @@ -63,6 +63,14 @@ CFLAGS += $(cflags-y) +ifdef CONFIG_CFLAGS_EDIT + ifdef CONFIG_CFLAGS_OVERRIDE + CFLAGS = $(shell echo $(CONFIG_CFLAGS_STRING) | sed -e 's/"//g') + else + CFLAGS += $(shell echo $(CONFIG_CFLAGS_STRING) | sed -e 's/"//g') + endif +endif + # Default subarch .c files mcore-y := mach-default diff -urN --exclude='*.orig' linux-2.6.10-rc3-mm1/arch/i386/kernel/traps.c linux-2.6.10-rc3-no2/arch/i386/kernel/traps.c --- linux-2.6.10-rc3-mm1/arch/i386/kernel/traps.c 2004-12-22 17:08:10.000000000 -0500 +++ linux-2.6.10-rc3-no2/arch/i386/kernel/traps.c 2004-12-22 21:29:29.164710745 -0500 @@ -184,6 +184,9 @@ /* ebp is the last reg pushed by switch_to */ ebp = *(unsigned long *) task->thread.esp; } +#ifdef CONFIG_CFLAGS_EDIT + printk("CFLAGS_EDIT\n"); +#endif while (1) { struct thread_info *context; @@ -360,7 +363,11 @@ nl = 1; #endif #ifdef CONFIG_DEBUG_PAGEALLOC - printk("DEBUG_PAGEALLOC"); + printk("DEBUG_PAGEALLOC "); + nl = 1; +#endif +#ifdef CONFIG_CFLAGS_EDIT + printk("CFLAGS_EDIT"); nl = 1; #endif if (nl) diff -urN --exclude='*.orig' linux-2.6.10-rc3-mm1/arch/x86_64/Kconfig.debug linux-2.6.10-rc3-no2/arch/x86_64/Kconfig.debug --- linux-2.6.10-rc3-mm1/arch/x86_64/Kconfig.debug 2004-12-22 17:08:10.000000000 -0500 +++ linux-2.6.10-rc3-no2/arch/x86_64/Kconfig.debug 2004-12-22 21:33:38.168431138 -0500 @@ -18,6 +18,47 @@ Fill __init and __initdata at the end of boot. This helps debugging illegal uses of __init and __initdata after initialization. +config CFLAGS_EDIT + bool "CFLAGS hacking" + default n + help + This allows you to append to or override the CFLAGS set for your + machine. Changing CFLAGS is commonly a very bad idea, because + Kernel Hackers Know Best. However if you wish to mess around + with your CFLAGS anyway, enable this and enter your CFLAGS + string to append below. + + The original intent of this option is to allow for use of flags that + don't really affect the result so much as gcc itself - maybe you + don't want to guess branch probabilities for some reason. That said, + we recognize that there's a nicely sized market for people who just + want to tinker, and this is why this option exists. + + A lot of things may become unpredictable when using aggressive CFLAGS + in the kernel. Don't complain about _anything_ until disabling this + option. + + If you have any doubt, say N. + +config CFLAGS_STRING + string "New CFLAGS" + depends on CFLAGS_EDIT + default "CHANGE ME" + help + Enter your new CFLAGS here, using appropriate syntax for gcc. If you + don't know what this means, flee now. + +config CFLAGS_OVERRIDE + bool "Override existing CFLAGS" + depends on CFLAGS_EDIT + default n + help + This allows you to unset any CFLAGS generated from processor selections + made at the top of the config. + + There is no reason to enable this. You always want the bare minimum for + your processor. Say N. + config IOMMU_DEBUG depends on GART_IOMMU && DEBUG_KERNEL bool "Enable IOMMU debugging" diff -urN --exclude='*.orig' linux-2.6.10-rc3-mm1/arch/x86_64/Makefile linux-2.6.10-rc3-no2/arch/x86_64/Makefile --- linux-2.6.10-rc3-mm1/arch/x86_64/Makefile 2004-12-22 17:08:10.000000000 -0500 +++ linux-2.6.10-rc3-no2/arch/x86_64/Makefile 2004-12-22 20:47:13.242722398 -0500 @@ -60,6 +60,14 @@ # unfortunately it makes reading oopses harder. CFLAGS += $(call cc-option,-funit-at-a-time) +ifdef CONFIG_CFLAGS_EDIT + ifdef CONFIG_CFLAGS_OVERRIDE + CFLAGS = $(shell echo $(CONFIG_CFLAGS_STRING) | sed -e 's/"//g') + else + CFLAGS += $(shell echo $(CONFIG_CFLAGS_STRING) | sed -e 's/"//g') + endif +endif + head-y := arch/x86_64/kernel/head.o arch/x86_64/kernel/head64.o arch/x86_64/kernel/init_task.o libs-y += arch/x86_64/lib/ diff -urN --exclude='*.orig' linux-2.6.10-rc3-mm1/arch/x86_64/kernel/traps.c linux-2.6.10-rc3-no2/arch/x86_64/kernel/traps.c --- linux-2.6.10-rc3-mm1/arch/x86_64/kernel/traps.c 2004-12-22 17:08:10.000000000 -0500 +++ linux-2.6.10-rc3-no2/arch/x86_64/kernel/traps.c 2004-12-22 20:47:13.259720057 -0500 @@ -152,6 +152,10 @@ printk("\nCall Trace:"); i = 0; + +#ifdef CONFIG_CFLAGS_EDIT + printk("\nCFLAGS_EDIT\n"); +#endif estack_end = in_exception_stack(cpu, (unsigned long)stack); if (estack_end) {