# HG changeset patch # User Joshua M. Clulow # Date 1348102084 0 # Node ID f56bf3fb65f4994e98700bd2a1a665b119c13640 # Parent e9ad0a945d45fa505084dae395b047d7dfbc5a08 3202 prevent compiler function cloning Reviewed by: Richard Lowe Approved by: Robert Mustacchi diff -r e9ad0a945d45 -r f56bf3fb65f4 usr/src/Makefile.master --- a/usr/src/Makefile.master Wed Sep 19 15:53:16 2012 -0400 +++ b/usr/src/Makefile.master Thu Sep 20 00:48:04 2012 +0000 @@ -344,8 +344,12 @@ # GCC, especially, is increasingly beginning to auto-inline functions and # sadly does so separately not under the general -fno-inline-functions +# Additionally, we wish to prevent optimisations which cause GCC to clone +# functions -- in particular, these may cause unhelpful symbols to be +# emitted instead of function names $(__GNUC4)CCNOAUTOINLINE= -_gcc=-fno-inline-small-functions \ - -_gcc=-fno-inline-functions-called-once + -_gcc=-fno-inline-functions-called-once \ + -_gcc=-fno-ipa-cp # One optimization the compiler might perform is to turn this: # #pragma weak foo