diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-10-26 11:52:38 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-10-26 11:52:38 +0000 |
commit | 8d1ad133e773d6ee96cb381215abc434057d8a36 (patch) | |
tree | 39c62fa133bac91ec273bd0ada2ae563b94b095f | |
parent | e22fb2e074beeea18dc34c1070d0aefdfac01443 (diff) | |
download | s6-dns-8d1ad133e773d6ee96cb381215abc434057d8a36.tar.xz |
Separate sections for smaller static binaries (thanks Denys Vlasenko)
-rwxr-xr-x | configure | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -297,6 +297,11 @@ tryflag CPPFLAGS_AUTO -Werror=implicit-function-declaration tryflag CPPFLAGS_AUTO -Werror=implicit-int tryflag CPPFLAGS_AUTO -Werror=pointer-sign tryflag CPPFLAGS_AUTO -Werror=pointer-arith +tryflag CFLAGS_AUTO -ffunction-sections +tryflag CFLAGS_AUTO -fdata-sections + +tryldflag LDFLAGS_AUTO -Wl,--sort-section=alignment +tryldflag LDFLAGS_AUTO -Wl,--sort-common if $evenmorestatic ; then LDFLAGS_NOSHARED=-static @@ -310,6 +315,7 @@ LDFLAGS_SHARED="${LDFLAGS_SHARED}${addlibdpath}" if $allstatic ; then LDFLAGS_NOSHARED="${LDFLAGS_NOSHARED}${addlibspath}" + tryldflag LDFLAGS_NOSHARED -Wl,--gc-sections else LDFLAGS_NOSHARED="${LDFLAGS_NOSHARED}${addlibdpath}" fi |