summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2015-11-04 21:39:13 -0500
committerRich Felker <dalias@aerifal.cx>2015-11-04 21:39:13 -0500
commit2efd38e8c70f00ca6bbc1eb5199aa507d45436cf (patch)
treedf276a39ddc6c88abbfcdd425beb20474020aae7 /configure
parent27c1eccf33ce5cb7508ef5e541daa9b6441b4a51 (diff)
downloadmusl-2efd38e8c70f00ca6bbc1eb5199aa507d45436cf.tar.gz
musl-2efd38e8c70f00ca6bbc1eb5199aa507d45436cf.tar.bz2
musl-2efd38e8c70f00ca6bbc1eb5199aa507d45436cf.tar.xz
musl-2efd38e8c70f00ca6bbc1eb5199aa507d45436cf.zip
have configure check/add linker options to reduce size lost to padding
based on patch by Denys Vlasenko. sorting sections and common data symbols by alignment acts as an approximation for optimal packing, which the linker does not actually support.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure b/configure
index 1e5c4b32..d04c860a 100755
--- a/configure
+++ b/configure
@@ -515,6 +515,12 @@ CFLAGS_AUTO="$CFLAGS_AUTO -include vis.h"
CFLAGS_AUTO="${CFLAGS_AUTO# }"
fi
+# Reduce space lost to padding for alignment purposes by sorting data
+# objects according to their alignment reqirements. This approximates
+# optimal packing.
+tryldflag LDFLAGS_AUTO -Wl,--sort-section,alignment
+tryldflag LDFLAGS_AUTO -Wl,--sort-common
+
# Some patched GCC builds have these defaults messed up...
tryldflag LDFLAGS_AUTO -Wl,--hash-style=both