]> code.ossystems Code Review - openembedded-core.git/commit
gcc: Update default Power GCC settings to use secure-plt
authorMark Hatle <mark.hatle@windriver.com>
Mon, 2 Nov 2015 14:52:28 +0000 (08:52 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Nov 2015 11:32:51 +0000 (11:32 +0000)
commit70c55aada1101a5c687cdaa79f370fa4530b39d9
tree2f1222c03d9ca6c02a8c8090247359a434b07cf7
parent12c86bdcc60c54e587a896b0dceb8bb6cc9ff7e3
gcc: Update default Power GCC settings to use secure-plt

The gcc default, bss-plt, will cause errors when using the prelinker.  All
other distributions that I am aware of are using the the secure-plt.  For an
explanation of the differences, the gcc docs:

  Current PowerPC GCC accepts a `-msecure-plt' option that generates code
  capable of using a newer PLT and GOT layout that has the security
  advantage of no executable section ever needing to be writable and no
  writable section ever being executable. PowerPC ld will generate this
  layout, including stubs to access the PLT, if all input files (including
  startup and static libraries) were compiled with `-msecure-plt'.
  `--bss-plt' forces the old BSS PLT (and GOT layout) which can give
  slightly better performance.

The security of the new PLT and ability to run the prelinker outweigh
any performance penalty.

The secure-plt is enabled by default.  The old bss-plt can be enabled by
selecting 'bssplt' in the DISTRO_FEATURES.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-devtools/gcc/gcc-common.inc
meta/recipes-devtools/gcc/gcc-configure-common.inc
meta/recipes-devtools/gcc/gcc-cross-initial.inc