------- Comment #11 from bdubbs at linuxfromscratch dot org 2010-05-24 06:32 ------- Updated to gcc (GCC) 4.5.1 20100524 (prerelease) but still have the problem.
There is something about -Os that triggers the kernel panic in arch/x86/kernel/tsc.c I tried to disable all -O2 options after -Os and the kernel still fails. gcc -Wp,-MD,arch/x86/kernel/.tsc.o.d -nostdinc -isystem \ /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/include \ -I/sources/linux-2.6.33.4-gcc45/arch/x86/include -Iinclude -include \ include/generated/autoconf.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes \ -Wno-trigraphs -fno-strict-aliasing -fno-common \ -Werror-implicit-function-declaration -Wno-format-security \ -fno-delete-null-pointer-checks -Os \ -fno-thread-jumps \ -fno-caller-saves \ -fno-crossjumping \ -fno-cse-follow-jumps \ -fno-cse-skip-blocks \ -fno-delete-null-pointer-checks \ -fno-expensive-optimizations \ -fno-gcse \ -fno-gcse-lm \ -fno-inline-small-functions \ -fno-indirect-inlining \ -fno-ipa-sra \ -fno-optimize-sibling-calls \ -fno-peephole2 \ -fno-regmove \ -fno-rerun-cse-after-loop \ -fno-sched-interblock \ -fno-sched-spec \ -fno-schedule-insns \ -fno-schedule-insns2 \ -fno-strict-overflow \ -fno-tree-switch-conversion \ -fno-tree-pre \ -fno-tree-vrp \ -fno-align-functions \ -fno-align-jumps \ -fno-align-loops \ -fno-align-labels \ -fno-reorder-blocks \ -fno-strict-aliasing \ -fno-reorder-blocks \ -m64 -march=core2 -mno-red-zone \ -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 \ -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare \ -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow \ -Wframe-larger-than=2048 -fno-stack-protector -fno-omit-frame-pointer \ -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign \ -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack -fno-stack-protector \ -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(tsc)" \ -D"KBUILD_MODNAME=KBUILD_STR(tsc)" -c -o arch/x86/kernel/tsc.o \ arch/x86/kernel/tsc.c Changing -Os to -O2 does *not* fail, even with the -fno options in the single column above removed. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44129