summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorMartin Matuška <martin@matuska.org>2022-01-03 12:07:13 +0100
committerGitHub <noreply@github.com>2022-01-03 12:07:13 +0100
commitdd733f5c25efcc727c38949811e597d196a003f7 (patch)
tree89f84668ac88e22d9e732b525bcffa16d79c70e7 /Makefile.am
parent38db08b16698e73c22b131cddd68658b80a43845 (diff)
parentfc0758237548328941fa7a9699510d6f357896ed (diff)
downloadlibarchive-dd733f5c25efcc727c38949811e597d196a003f7.tar.gz
Merge pull request #1625 from evelikov/gc-sections
Instrument gcc/clang to discard unused code during link
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index cc8ae29c..9469cf69 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -284,7 +284,7 @@ endif
# -no-undefined marks that libarchive doesn't rely on symbols
# defined in the application. This is mandatory for cygwin.
-libarchive_la_LDFLAGS= -no-undefined -version-info $(ARCHIVE_LIBTOOL_VERSION)
+libarchive_la_LDFLAGS= -no-undefined -version-info $(ARCHIVE_LIBTOOL_VERSION) $(GC_SECTIONS)
libarchive_la_LIBADD= $(LTLIBICONV)
# Manpages to install
@@ -1024,7 +1024,7 @@ endif
bsdtar_LDADD= libarchive.la libarchive_fe.la $(LTLIBICONV)
bsdtar_CPPFLAGS= -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe $(bsdtar_ccstatic) $(PLATFORMCPPFLAGS)
-bsdtar_LDFLAGS= $(bsdtar_ldstatic)
+bsdtar_LDFLAGS= $(bsdtar_ldstatic) $(GC_SECTIONS)
bsdtar_EXTRA_DIST= \
tar/bsdtar.1 \
@@ -1190,7 +1190,7 @@ endif
bsdcpio_LDADD= libarchive_fe.la libarchive.la $(LTLIBICONV)
bsdcpio_CPPFLAGS= -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe $(bsdcpio_ccstatic) $(PLATFORMCPPFLAGS)
-bsdcpio_LDFLAGS= $(bsdcpio_ldstatic)
+bsdcpio_LDFLAGS= $(bsdcpio_ldstatic) $(GC_SECTIONS)
bsdcpio_EXTRA_DIST= \
cpio/bsdcpio.1 \
@@ -1344,7 +1344,7 @@ endif
bsdcat_LDADD= libarchive_fe.la libarchive.la $(LTLIBICONV)
bsdcat_CPPFLAGS= -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe $(bsdcat_ccstatic) $(PLATFORMCPPFLAGS)
-bsdcat_LDFLAGS= $(bsdcat_ldstatic)
+bsdcat_LDFLAGS= $(bsdcat_ldstatic) $(GC_SECTIONS)
bsdcat_EXTRA_DIST= \
cat/bsdcat.1 \