summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2017-04-23 21:42:31 -0700
committerH. Peter Anvin <hpa@zytor.com>2017-04-23 21:42:31 -0700
commit26fad144de7cf0a581b518b86f7608293a2fb2a0 (patch)
treef958ae8235b11a8c0d1f5d9495fc885bddf38cff /configure.ac
parentd2b7aa8edffb425c6c8b6a1804ae154a36f0e78b (diff)
downloadnasm-26fad144de7cf0a581b518b86f7608293a2fb2a0.tar.gz
configure.ac: fix --enable-sections
The --enable-sections option isn't too useful without -Wl,--gc-sections. It's unclear if gcc will provide that option by default. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 3 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 2e8c05a5..bc8a1a2b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -177,8 +177,9 @@ dnl support function sections
dnl
PA_ARG_ENABLED([sections],
[compile with function/data section support],
- [PA_ADD_CFLAGS([-ffunction-sections]),
- PA_ADD_CFLAGS([-fdata-sections])],
+ [PA_ADD_CLDFLAGS([-ffunction-sections])
+ PA_ADD_CLDFLAGS([-fdata-sections])
+ PA_ADD_CLDFLAGS([-Wl,--gc-sections])],
[])
dnl
dnl support LTO