hi there, any thoughts regarding this patch? it makes sure -frename-registers doesn't get used, when the compiler is clang. nothing spectacular, but it cleans up stdout a bit.
it also makes sure that when debugging was enabled, amd64 gets compiled with -O instead of -O2, just like all the other archs. i'm not sure, if this is really the right thing to do, but i don't really understand the current behavior. why should -O2 be set, when the users indicated that he wants to compile a kernel for debugging? sure amd64 supports debugging with -O2, as noted in the svn history of kern.pre.mk. however even on amd64 a -O2 kernel and a -O kernel aren't the same when it comes to debugging capabilities. however, i'm not really sure about this. bde@ probably has an opinion regarding this matter. cheers. alex
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 2320b89..badf7ef 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -33,8 +33,8 @@ _MINUS_O= -O # gcc miscompiles some code at -O2 _MINUS_O= -O2 .endif .endif -.if ${MACHINE_CPUARCH} == "amd64" -COPTFLAGS?=-O2 -frename-registers -pipe +.if ${MACHINE_CPUARCH} == "amd64" && ${CC:T:Mclang} != "clang" +COPTFLAGS?=${_MINUS_O} -frename-registers -pipe .else COPTFLAGS?=${_MINUS_O} -pipe .endif
_______________________________________________ freebsd-toolchain@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"