build: fix ASLR for LTO packages
authorJulien Dusser <julien.dusser@free.fr>
Tue, 17 Jul 2018 16:29:34 +0000 (18:29 +0200)
committerJohn Crispin <john@phrozen.org>
Mon, 30 Jul 2018 12:26:16 +0000 (14:26 +0200)
commit4dfa6b7a300188db2d97a291f9c1303286a6bcc5
tree9bb57448164f5abeef7279f57d6787c68b0e01c4
parent84c212da44cf5df210ae166ed7e64adf764ccf3f
build: fix ASLR for LTO packages

Fix building packages with LTO when CONFIG_PKG_ASLR_PIE is enabled.

Despite comment of PR lto/80838, it seems that GCC needs -fPIC on linker
command line, even if all objects are -fPIC. This may change as PR
lto/80838 is merged into 8.1

compile-tested: ar71xx, ath79

Fix commits:
6dac92a42e052f89971762173daabb7fd84742ef
8c11133c9de632dca69c8464f911d8e2716effe2
07940acc341ee9bb2887359f193625e48f36207e
e7397eef69a20fc630148d0e597523e139d21c0c
ef16a394d2b24a363b50b5b4720cb23fe156c9da
ef96d1e34a990871c912938c336f51a510b1e32f
47b42137ce1e931ae5871952b1f98438396f5e07
73fc67b61480a3430d31de33478a1c0c2c364b9c
154c0c4006daf41e2cbb6c8b7ad5557f83dfea3e
804c51e1e661819c5a7532e66fb8a12166eef9a9

Signed-off-by: Julien Dusser <julien.dusser@free.fr>
include/hardening.mk