aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl/0009-have-configure-check-add-linker-options-to-reduce-si.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/musl/0009-have-configure-check-add-linker-options-to-reduce-si.patch')
-rw-r--r--main/musl/0009-have-configure-check-add-linker-options-to-reduce-si.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/main/musl/0009-have-configure-check-add-linker-options-to-reduce-si.patch b/main/musl/0009-have-configure-check-add-linker-options-to-reduce-si.patch
new file mode 100644
index 0000000000..a9307e62d9
--- /dev/null
+++ b/main/musl/0009-have-configure-check-add-linker-options-to-reduce-si.patch
@@ -0,0 +1,33 @@
+From 2efd38e8c70f00ca6bbc1eb5199aa507d45436cf Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Wed, 4 Nov 2015 21:39:13 -0500
+Subject: [PATCH] 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.
+---
+ configure | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/configure b/configure
+index 1e5c4b3..d04c860 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
+
+--
+2.7.0
+