Print this page
9420 need GCC options to disable function cloning

Split Close
Expand all
Collapse all
          --- old/usr/src/Makefile.master
          +++ new/usr/src/Makefile.master
↓ open down ↓ 324 lines elided ↑ open up ↑
 325  325  #
 326  326  # generate v9 code which tolerates callers using the v7 ABI, for the sake of
 327  327  # system calls.
 328  328  CC32BITCALLERS=         -_gcc=-massume-32bit-callers
 329  329  
 330  330  # GCC, especially, is increasingly beginning to auto-inline functions and
 331  331  # sadly does so separately not under the general -fno-inline-functions
 332  332  # Additionally, we wish to prevent optimisations which cause GCC to clone
 333  333  # functions -- in particular, these may cause unhelpful symbols to be
 334  334  # emitted instead of function names
 335      -CCNOAUTOINLINE= -_gcc=-fno-inline-small-functions \
      335 +CCNOAUTOINLINE= \
      336 +        -_gcc=-fno-inline-small-functions \
 336  337          -_gcc=-fno-inline-functions-called-once \
 337      -        -_gcc=-fno-ipa-cp
      338 +        -_gcc=-fno-ipa-cp \
      339 +        -_gcc6=-fno-ipa-icf \
      340 +        -_gcc7=-fno-ipa-icf \
      341 +        -_gcc8=-fno-ipa-icf \
      342 +        -_gcc6=-fno-clone-functions \
      343 +        -_gcc7=-fno-clone-functions \
      344 +        -_gcc8=-fno-clone-functions
 338  345  
 339  346  # One optimization the compiler might perform is to turn this:
 340  347  #       #pragma weak foo
 341  348  #       extern int foo;
 342  349  #       if (&foo)
 343  350  #               foo = 5;
 344  351  # into
 345  352  #       foo = 5;
 346  353  # Since we do some of this (foo might be referenced in common kernel code
 347  354  # but provided only for some cpu modules or platforms), we disable this
↓ open down ↓ 832 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX