toolchain: allow PIC/PIE without RELRO
authorYann E. MORIN <yann.morin@orange.com>
Tue, 12 Mar 2019 12:09:36 +0000 (13:09 +0100)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sat, 3 Aug 2019 21:19:36 +0000 (23:19 +0200)
commit814f6e19e72ec7124dddb91d065d427daf2bd42f
tree1e1ee1caa351d5c4360388e82ebbc7a983d6d015
parent51db8974f72bcefa912a5fea547311df1c1657ae
toolchain: allow PIC/PIE without RELRO

In commit 7484c1c3b806 (toolchain/toolchain-wrapper: add BR2_RELRO_),
we added the PIC/PIE flags, but based on the RELRO_FULL condition.

It is however totally possible to do a PIC/PIE executable without
RELRO_FULL, as it is also valid to do a PIC/PIE build with RELRO_PARTIAL.

Add a new option that now governs the PIC/PIE flags.

Note: it is unknown if RELRO_FULL really needs PIC/PIE or not, so we
keep the current situation, where RELRO-FULL forces PIC/PIE compilation.
Decoupling can come later from an interested party.

Signed-off-by: "Yann E. MORIN" <yann.morin@orange.com>
Cc: Matt Weber <matthew.weber@rockwellcollins.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Reviewed-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Config.in
toolchain/toolchain-wrapper.c
toolchain/toolchain-wrapper.mk