Index: sys/conf/kern.pre.mk =================================================================== --- sys/conf/kern.pre.mk (revision 228799) +++ sys/conf/kern.pre.mk (working copy) @@ -29,15 +29,13 @@ .else .if ${MACHINE_CPUARCH} == "powerpc" _MINUS_O= -O # gcc miscompiles some code at -O2 +.elif ${MACHINE_CPUARCH} == "amd64" && ${CC:T:Mclang} != "clang" +_MINUS_O= -O2 -frename-registers .else _MINUS_O= -O2 .endif .endif -.if ${MACHINE_CPUARCH} == "amd64" -COPTFLAGS?=-O2 -frename-registers -pipe -.else COPTFLAGS?=${_MINUS_O} -pipe -.endif .if !empty(COPTFLAGS:M-O[23s]) && empty(COPTFLAGS:M-fno-strict-aliasing) COPTFLAGS+= -fno-strict-aliasing .endif