summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2019-06-20 13:00:37 +0000
committerJoe Orton <jorton@apache.org>2019-06-20 13:00:37 +0000
commit50bbfb3de58e82514f50a34f2ec24d147112b7f5 (patch)
tree8b983073a3f756f57b81d724d0d44fe35d56d8eb /Makefile.in
parent314fb18f15ceb32589e40224257faeac6c8768b2 (diff)
downloadhttpd-50bbfb3de58e82514f50a34f2ec24d147112b7f5.tar.gz
Add an --enable-reduced-exports configure option to link libmain.a
using ld's --whole-archive mode and avoid building exports.c entirely. This reduces the size of a minimal httpd binary by 18% on Linux/x86_64 (687K to 560K) with no difference to the set of symbols available to modules. This option is only appropriate to use if using a shared libapr* build, hence is non-default. * configure.in: Add --enable-reduced-exports; disable httpdunit build if used. Define AP_FORCE_EXPORTS if not enabled (default) in place of AP_USING_AUTOCONF. * server/main.c (ap_suck_in_APR): Only build if AP_FORCE_EXPORTS is defined. * Makefile.in: Link libmain.la using LIBMAIN_LIB. * server/Makefile.in: Conditionally build exports.c into libmain. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1861685 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in
index ab137d1b67..40c025a94c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -4,8 +4,13 @@ CLEAN_SUBDIRS = test
PROGRAM_NAME = $(progname)
PROGRAM_SOURCES = modules.c
-PROGRAM_LDADD = buildmark.o $(HTTPD_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(HTTPD_LIBS) $(EXTRA_LIBS) $(AP_LIBS) $(LIBS)
+PROGRAM_LDADD = buildmark.o $(HTTPD_LDFLAGS) $(PROGRAM_LDDEPS) $(HTTPD_LIBS) $(EXTRA_LIBS) $(AP_LIBS) $(LIBS)
PROGRAM_PRELINK = $(COMPILE) -c $(top_srcdir)/server/buildmark.c
+PROGRAM_LDDEPS = \
+ $(BUILTIN_LIBS) \
+ $(MPM_LIB) \
+ $(LIBMAIN_LIB) \
+ os/$(OS_DIR)/libos.la
PROGRAM_DEPENDENCIES = \
$(BUILTIN_LIBS) \
$(MPM_LIB) \