aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-01-17 14:31:30 +0000
committerJohn Crispin <john@openwrt.org>2015-01-17 14:31:30 +0000
commit491f3fc048c0a8c1b55019a3f45684cc252408d5 (patch)
tree5b360d52e61518b272b8e1ae19489d388117746e /package/network/services
parent64ccdb98fbb6b4f3cebbc263696dda3a7cf62fdf (diff)
downloadupstream-491f3fc048c0a8c1b55019a3f45684cc252408d5.tar.gz
upstream-491f3fc048c0a8c1b55019a3f45684cc252408d5.tar.bz2
upstream-491f3fc048c0a8c1b55019a3f45684cc252408d5.zip
Support for building an hardened OpenWRT
Introduce configuration options to build an "hardened" OpenWRT. Options to enable Stack-Smashing Protection, FORTIFY_SOURCE and RELRO have been introduced. uClibc makefile now automatically detects if SSP support is necessary. hostapd makefile has been fixed to use "^" as sed separator since using a comma was problematic when using "-Wl,-z,now" and the like in TARGET_CFLAGS. Currently enabling SSP on user space depends on enabling SSP kernel side, this is due to the fact that TARGET_CFLAGS are used to build kernel modules (at least). Suggestions on how to avoid this are welcome. Using "select" instead of "depends on" doesn't seem to work with choice entries. Tested with a lantiq (WBMR) router, GCC 4.8, uClibc and a subset of the available packages. Needs to be tested with GCC 4.9 and the remaining packages. PIE not currently included. Signed-off-by: Alessandro Di Federico <ale+owrt@clearmind.me> SVN-Revision: 44005
Diffstat (limited to 'package/network/services')
-rw-r--r--package/network/services/hostapd/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
index 19d536ecc0..6bdf5341e0 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -294,7 +294,7 @@ define Build/Compile/wpad
echo ` \
$(call Build/RunMake,hostapd,-s MULTICALL=1 dump_cflags); \
$(call Build/RunMake,wpa_supplicant,-s MULTICALL=1 dump_cflags) | \
- sed -e 's,-n ,,g' -e 's,$(TARGET_CFLAGS),,' \
+ sed -e 's,-n ,,g' -e 's^$(TARGET_CFLAGS)^^' \
` > $(PKG_BUILD_DIR)/.cflags
+$(call Build/RunMake,hostapd, \
CFLAGS="$$$$(cat $(PKG_BUILD_DIR)/.cflags)" \