summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure6
-rw-r--r--package/targets.mak2
2 files changed, 7 insertions, 1 deletions
diff --git a/configure b/configure
index 3ddb7e5..ab6a070 100755
--- a/configure
+++ b/configure
@@ -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
diff --git a/package/targets.mak b/package/targets.mak
index e28b327..e0600cc 100644
--- a/package/targets.mak
+++ b/package/targets.mak
@@ -24,7 +24,7 @@ LIB_DEFS := S6NET=s6net
EXTRA_TARGETS := src/minidentd/mgetuid.c
src/minidentd/mgetuid.c: src/minidentd/mgetuid-linux.c src/minidentd/mgetuid-default.c
- @if grep -q -iF -- -linux- $(sysdeps)/target 2>/dev/null ; then \
+ @if grep -q -iF -- -linux $(sysdeps)/target 2>/dev/null ; then \
ln -sf mgetuid-linux.c src/minidentd/mgetuid.c ; \
else \
ln -sf mgetuid-default.c src/minidentd/mgetuid.c ; \