You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Wilfredo Sanchez <ws...@apple.com> on 1999/01/14 01:50:16 UTC

PATCH: Add strip flags variables in Makefile.tmpl

  This patch adds variables for strip options to pass to install for  
the httpd binary, other binaries, and DSO modules.

  The default for binaries is "-s", as is the case presently.

  The default for httpd is the same as for other binaries. The  
reason this is separate is that if you are building Apache with DSO  
support, but not using the shared core, you need to preserve the  
globals in httpd, else the modules will not be able to bind to the  
symbols in the httpd binary. The strip program on Mac OS X Server  
accepts special flags to remove only certain types of symbols.

  The default for DSO modules is no args, as is the case presently,  
but we'd like to pass the same special args as to httpd, because we'd  
like to remove debugging symbols while preserving the globals.

  The patch to install.sh makes it accept a -S argument which passes  
the next argument to strip (as opposed to -s). This is consistant  
with /usr/bin/install on Mac OS X Server and NetBSD.

  I can, of course work around this by using shared core, but this  
should work without it, and this change is pretty nominal, and  
building with shared core using Apache's current makefiles is not  
presently straightforward on Mac OS X Server because we need  
different linker flags for the modules than for httpd. I do hope to  
do that later, as noted in a prior email.

	-Fred


Index: CoreOS/Services/apache/apache/Makefile.tmpl
diff -u CoreOS/Services/apache/apache/Makefile.tmpl:1.1.1.4  
CoreOS/Services/apache/apache/Makefile.tmpl:1.15
--- CoreOS/Services/apache/apache/Makefile.tmpl:1.1.1.4	Tue Jan 12  
13:48:39 1999
+++ CoreOS/Services/apache/apache/Makefile.tmpl	Wed Jan 13 16:12:57 1999
@@ -75,6 +75,10 @@
 MKF             = @MKF@
 AUX             = @AUX@

+STRIPFLAGS        = -s
+TARGET_STRIPFLAGS = $(STRIPFLAGS)
+DSO_STRIPFLAGS    =
+
 #   build tools
 CP              = cp
 LN              = ln
@@ -82,8 +86,9 @@
 TAR             = tar
 MKDIR           = $(TOP)/$(AUX)/mkdir.sh
 INSTALL         = $(TOP)/$(AUX)/install.sh -c
-INSTALL_PROGRAM = $(INSTALL) -s -m 755
-INSTALL_DSO     = $(INSTALL) -m 755
+INSTALL_PROGRAM = $(INSTALL) -m 755 $(STRIPFLAGS)
+INSTALL_TARGET  = $(INSTALL) -m 755 $(TARGET_STRIPFLAGS)
+INSTALL_DSO     = $(INSTALL) -m 755 $(DSO_STRIPFLAGS)
 INSTALL_SCRIPT  = $(INSTALL) -m 755
 INSTALL_DATA    = $(INSTALL) -m 644
 PERL            = @PERL@
@@ -252,7 +260,7 @@
 #   shared object files.
 install-programs:
 	@echo "===> [programs: Installing Apache $(TARGET) program  
and shared objects]"
-	$(INSTALL_PROGRAM) $(TOP)/$(SRC)/$(TARGET)  
$(root)$(sbindir)/$(TARGET)
+	$(INSTALL_TARGET) $(TOP)/$(SRC)/$(TARGET)  
$(root)$(sbindir)/$(TARGET)
 	-@if [ ".`grep 'SUBTARGET=target_shared'  
$(TOP)/$(SRC)/Makefile`" != . ]; then \
 		SHLIB_SUFFIX_NAME="`grep '^SHLIB_SUFFIX_NAME='  
$(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`"; \
 		SHLIB_SUFFIX_LIST="`grep '^SHLIB_SUFFIX_LIST='  
$(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`"; \
Index: CoreOS/Services/apache/apache/src/helpers/install.sh
diff -u CoreOS/Services/apache/apache/src/helpers/install.sh:1.1.1.2  
CoreOS/Services/apache/apache/src/helpers/install.sh:1.3
--- CoreOS/Services/apache/apache/src/helpers/install.sh:1.1.1.2	 
Thu Oct  1 16:00:20 1998
+++ CoreOS/Services/apache/apache/src/helpers/install.sh	Thu  
Oct  1 17:41:51 1998
@@ -51,7 +51,11 @@
             shift; shift; continue
             ;;
         -s) stripcmd="$stripprog"
-            shift; continue;;
+            shift; continue
+	    ;;
+	-S) stripcmd="$stripprog $2"
+            shift; shift; continue
+	    ;;
         *)  if [ ".$src" = . ]; then
                 src=$1
             else