]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-autoconf-strip-debug-options-sanity-20071112
authorKevin McBride <klm@endpoint.com>
Mon, 12 Nov 2007 18:31:17 +0000 (18:31 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 12 Nov 2007 18:31:17 +0000 (18:31 +0000)
To prevent stripping, specify the '--disable-strip-binaries' option on
the ./configure command line. fileserver and volserver are never stripped.

When --enable-debug is specified, binaries will not be stripped by default.

(cherry picked from commit 8593c52c2787587110865287937750e51c48afa5)

Makefile.in
README
acinclude.m4
src/cf/osconf.m4
src/config/Makefile.config.in
src/kauth/Makefile.in
src/log/Makefile.in
src/platform/DARWIN/Makefile.in
src/sys/Makefile.in
src/venus/Makefile.in
src/vol/Makefile.in

index 7ccd9fcd0876365377276db09ab015c27f6dcd9a..428acb903587de2c41a46a0324ad22f7012ee21a 100644 (file)
@@ -396,7 +396,7 @@ ptserver_depinstall: pinstall rxgen comerr
        ${COMPILE_PART1} ptserver ${COMPILE_DEPINSTALL}
 
 ${DEST}/bin/dedebug: dedebug
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 
 #
diff --git a/README b/README
index c7fdff82df21973f0e01ccd244189389aef1a00b..5c263db1d205b66fdf68d87c9e1eae8c8c7a962e 100644 (file)
--- a/README
+++ b/README
@@ -68,6 +68,30 @@ A. Creating the proper directory structure.
       or insecure software included with OpenAFS. See README.obsolete and
       README.insecure for more details.
 
+      There is an option to control whether or not binaries are stripped
+      of their symbol table information.  All binaries, except for the
+      'fileserver' and 'volserver' executables, are stripped by default.
+
+      To prevent stripping, specify the '--disable-strip-binaries' option on
+      the ./configure command line.
+
+      This option works alongside the existing --enable-debug option to
+      control how binaries are produced.  When --enable-debug is specified,
+      binaries will not be stripped.  This behavior can be modified by
+      using different combinations of --enable-debug and --enable (or
+      --disable)-strip-binaries.  One can, for example, compile binaries for
+      debug and strip them anyway.  Alternatively, one can compile without
+      debug and force the binaries to not be stripped.  Note that these
+      combinations are not necessarily useful.
+
+      If neither of these options is specified, the default will be to build
+      non-debug binaries that are stripped (with the exceptions noted above,
+      which are never stripped at present).  Specifying --enable-debug also
+      turns on --disable-strip-binaries.  These are the most useful settings.
+
+      The two binaries noted above, 'fileserver' and 'volserver' will never
+      be stripped, regardless of any options given to configure.
+
   There are two modes for directory path handling: "Transarc mode" and "default mode":
   - In Transarc mode, we retain compatibility with Transarc/IBM AFS tools
     by putting client configuaration files in /usr/vice/etc, and server
index 7789cbc1ac4bdb1af8a69c5609a4715ff0aad711..83346e95c76e48c1f09c8402324c0074dde4b2ab 100644 (file)
@@ -70,6 +70,9 @@ AC_ARG_ENABLE(optimize-kernel,
 AC_ARG_ENABLE(debug,
 [  --enable-debug                      enable compilation of the user space code with debugging information (defaults to disabled)],, enable_debug="no"
 )
+AC_ARG_ENABLE(strip-binaries,
+[  --disable-strip-binaries             disable stripping of symbol information from binaries (defaults to enabled)],, enable_strip_binaries="maybe"
+)
 AC_ARG_ENABLE(optimize,
 [  --disable-optimize                  disable optimization for compilation of the user space code (defaults to enabled)],, enable_optimize="yes"
 )
index a21bb52b25ae5e786df69176abda7f1764a41e2f..4e52e2307d295e35dfe14e80ac574c8857884fbc 100644 (file)
@@ -18,6 +18,8 @@ DBG=-g
 OPTMZ=-O
 LWP_DBG=-g
 LWP_OPTMZ=-O
+NO_STRIP_BIN=-ns
+NO_STRIP_KRB=-ns
 
 dnl standard programs
 AC_PROG_RANLIB
@@ -1013,6 +1015,8 @@ fi
 
 if test "x$enable_debug" = "xno"; then
   DBG=
+  NO_STRIP_BIN=
+  NO_STRIP_KRB=-s
 fi
 
 if test "x$enable_optimize" = "xno"; then
@@ -1027,6 +1031,19 @@ if test "x$enable_optimize_lwp" = "xno"; then
   LWP_OPTMZ=
 fi
 
+if test "x$enable_strip_binaries" != "xno"; then
+  if test "x$enable_strip_binaries" = "xmaybe" -a "x$enable_debug" = "xyes"; then
+    NO_STRIP_BIN=-ns
+    NO_STRIP_KRB=-ns
+  else
+    NO_STRIP_BIN=
+    NO_STRIP_KRB=-s
+  fi
+else
+  NO_STRIP_BIN=-ns
+  NO_STRIP_KRB=-ns
+fi
+
 AC_SUBST(CCXPG2)
 AC_SUBST(CCOBJ)
 AC_SUBST(AFSD_LIBS)
@@ -1047,6 +1064,8 @@ AC_SUBST(MT_CC)
 AC_SUBST(MT_CFLAGS)
 AC_SUBST(MT_LIBS)
 AC_SUBST(MV)
+AC_SUBST(NO_STRIP_BIN)
+AC_SUBST(NO_STRIP_KRB)
 AC_SUBST(OPTMZ)
 AC_SUBST(PAM_CFLAGS)
 AC_SUBST(PAM_LIBS)
index 13d6e9849e2a45c1a9ae561518f5da928d597516..5d7c32fc2d6be86338eac132e7265ce047cb060f 100644 (file)
@@ -57,6 +57,8 @@ MT_CC = @MT_CC@
 MT_CFLAGS = @MT_CFLAGS@
 MT_LIBS = @MT_LIBS@
 MV = @MV@
+NO_STRIP_BIN = @NO_STRIP_BIN@
+NO_STRIP_KRB = @NO_STRIP_KRB@
 OPTMZ = @OPTMZ@
 PAM_CFLAGS = @PAM_CFLAGS@
 PAM_LIBS = @PAM_LIBS@
@@ -113,7 +115,7 @@ KERNELDIR = ../libafs
 # Build helper apps
 #
 COMPILE_ET = ${TOP_OBJDIR}/src/comerr/compile_et
-INSTALL = ${TOP_OBJDIR}/src/pinstall/pinstall
+INSTALL = ${TOP_OBJDIR}/src/pinstall/pinstall ${NO_STRIP_BIN}
 INSTALLex = ${INSTALL} -m 755
 RXGEN = ${TOP_OBJDIR}/src/rxgen/rxgen
 SHELL = /bin/sh
index e244a04c86ecad538ea45d76a5e4c220ea7c0c07..773251fdd3ec5836194a4688ce688a9f10bfe963 100644 (file)
@@ -249,37 +249,37 @@ install: \
        ${DESTDIR}${includedir}/afs/kaport.h
 
 ${DESTDIR}${afssrvlibexecdir}/kaserver: kaserver
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${sbindir}/kas: kas
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${sbindir}/kpwvalid: kpwvalid
        ${INSTALL} $? $@
 
 ${DESTDIR}${afssrvsbindir}/kas: kas
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${afssrvsbindir}/kpwvalid: kpwvalid
        ${INSTALL} $? $@
 
 ${DESTDIR}${bindir}/klog: klog
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${bindir}/klog.krb: klog.krb
-       ${INSTALL} -s $? $@
+       ${INSTALL} ${NO_STRIP_KRB} $? $@
 
 ${DESTDIR}${afssrvbindir}/klog: klog
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${afssrvbindir}/klog.krb: klog.krb
-       ${INSTALL} -s $? $@
+       ${INSTALL} ${NO_STRIP_KRB} $? $@
 
 ${DESTDIR}${bindir}/knfs: knfs
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${bindir}/kpasswd: kpasswd
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${bindir}/kpwvalid: kpwvalid
        ${INSTALL} $? $@
@@ -294,7 +294,7 @@ ${DESTDIR}${afssrvsbindir}/kadb_check: rebuild
        ${INSTALL} -f $? $@
 
 ${DESTDIR}${afssrvsbindir}/kdb: kdb
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${afssrvsbindir}/ka-forwarder: ka-forwarder
        ${INSTALL} $? $@
@@ -331,25 +331,25 @@ dest: \
        ${DEST}/include/afs/kaport.h
 
 ${DEST}/root.server/usr/afs/bin/kaserver: kaserver
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DEST}/etc/kas ${DEST}/root.server/usr/afs/bin/kas: kas 
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DEST}/bin/kpwvalid ${DEST}/etc/kpwvalid ${DEST}/root.server/usr/afs/bin/kpwvalid: kpwvalid 
        ${INSTALL} $? $@
 
 ${DEST}/bin/klog ${DEST}/root.server/usr/afs/bin/klog: klog 
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DEST}/bin/klog.krb ${DEST}/root.server/usr/afs/bin/klog.krb: klog.krb 
-       ${INSTALL} -s $? $@
+       ${INSTALL} ${NO_STRIP_KRB} $? $@
 
 ${DEST}/bin/knfs: knfs 
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DEST}/bin/kpasswd: kpasswd 
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DEST}/lib/afs/libkauth.a: libkauth.a 
        ${INSTALL} $? $@
@@ -361,7 +361,7 @@ ${DEST}/etc/kadb_check: rebuild
        ${INSTALL} -f $? $@
 
 ${DEST}/etc/kdb: kdb 
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DEST}/root.server/usr/afs/bin/ka-forwarder: ka-forwarder
        ${INSTALL} $? $@
index f649caf6e3fb15f1fa7ba00323131e229d9d9f12..92b6692d74ddb7f24e4ab54a077824824919e324 100644 (file)
@@ -76,13 +76,13 @@ ${DEST}/bin/tokens: tokens
        ${INSTALL} $? $@
 
 ${DEST}/bin/tokens.krb: tokens.krb
-       ${INSTALL} $? $@
+       ${INSTALL} ${NO_STRIP_KRB} $? $@
 
 ${DEST}/root.server/usr/afs/bin/tokens: tokens
        ${INSTALL} $? $@
 
 ${DEST}/root.server/usr/afs/bin/tokens.krb: tokens.krb
-       ${INSTALL} $? $@
+       ${INSTALL} ${NO_STRIP_KRB} $? $@
 
 ${DEST}/etc/kseal: kseal
        ${INSTALL} $? $@
@@ -105,13 +105,13 @@ ${DESTDIR}${bindir}/tokens: tokens
        ${INSTALL} $? $@
 
 ${DESTDIR}${bindir}/tokens.krb: tokens.krb
-       ${INSTALL} $? $@
+       ${INSTALL} ${NO_STRIP_KRB} $? $@
 
 ${DESTDIR}${afssrvbindir}/tokens: tokens
        ${INSTALL} $? $@
 
 ${DESTDIR}${afssrvbindir}/tokens.krb: tokens.krb
-       ${INSTALL} $? $@
+       ${INSTALL} ${NO_STRIP_KRB} $? $@
 
 ${DESTDIR}${sbindir}/kseal: kseal
        ${INSTALL} $? $@
index 66af0801fa6a774123883a624930af9357eb1574..0212714b28b812cc9d34bd94a8046e50879bea6f 100644 (file)
@@ -21,10 +21,10 @@ dest: \
        ${DEST}/etc/afssettings
 
 ${DESTDIR}${sbindir}/afssettings: afssettings
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DEST}/etc/afssettings: afssettings
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 clean:
        $(RM) -f *.o core afssettings AFS_component_version_number.c 
index 1e1a86ccb988a3bc9e8b3c9371424ffda7cc73e1..3c7b25848a5cbb518f224accdae739c12ee7cbf5 100644 (file)
@@ -232,16 +232,16 @@ ${DESTDIR}${libdir}/afs/libsys.a: libsys.a
        ${INSTALL} $? $@
 
 ${DESTDIR}${sbindir}/rmtsysd: rmtsysd
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${includedir}/afs/afssyscalls.h: afssyscalls.h
        ${INSTALL} $? $@
 
 ${DESTDIR}${bindir}/pagsh: pagsh
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${bindir}/pagsh.krb: pagsh.krb
-       ${INSTALL} -s $? $@
+       ${INSTALL} ${NO_STRIP_KRB} $? $@
 
 ${DESTDIR}${includedir}/afs/afs.exp: afs.exp
        @set -x; case ${SYS_NAME} in \
@@ -277,13 +277,13 @@ ${DEST}/include/afs/afssyscalls.h: afssyscalls.h
        ${INSTALL} $? $@
 
 ${DEST}/etc/rmtsysd: rmtsysd
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DEST}/bin/pagsh: pagsh
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DEST}/bin/pagsh.krb: pagsh.krb
-       ${INSTALL} -s $? $@
+       ${INSTALL} ${NO_STRIP_KRB} $? $@
 
 #
 # Misc targets
index edb9133fc435e625ab2a2220fd986cbc9712031a..2a59d1faea15b7736943bfa1868a2ac481e3c80b 100644 (file)
@@ -52,19 +52,19 @@ cacheout: cacheout.o
 cacheout.o: cacheout.c
 
 ${DEST}/bin/fs ${DEST}/root.server/usr/afs/bin/fs: fs
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DEST}/bin/livesys: livesys
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DEST}/bin/up: up
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DEST}/etc/fstrace: fstrace
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DEST}/bin/cmdebug: cmdebug
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 
 
@@ -276,29 +276,29 @@ ${DEST}/etc/kdump: kdump-build
                ln -fs kdump.IP20 ${DEST}/etc/kdump.IP22; \
                ln -fs kdump.IP20 ${DEST}/etc/kdump.IP32; \
                for f in kdump.IP??; \
-                       do ${INSTALL} -s $$f ${DEST}/etc/$$f || exit $$? ; \
+                       do ${INSTALL} $$f ${DEST}/etc/$$f || exit $$? ; \
                done ;; \
        sun*_5[789] | sun*_510 ) \
                ${INSTALLex} -f ${srcdir}/kdump.sh.solaris7 ${DEST}/etc/kdump; \
-               ${INSTALL} -s -f ${srcdir}/kdump ${DEST}/etc/kdump32;; \
+               ${INSTALL} -f ${srcdir}/kdump ${DEST}/etc/kdump32;; \
        *alpha_linux* ) \
                ${INSTALLex} -f ${srcdir}/kdump.sh.linux ${DEST}/etc/kdump; \
-               ${INSTALL} -s kdump-alpha_linux-${LINUX_VERSION} $@ ;; \
+               ${INSTALL} kdump-alpha_linux-${LINUX_VERSION} $@ ;; \
        *linux* ) \
                ${INSTALLex} -f ${srcdir}/kdump.sh.linux ${DEST}/etc/kdump; \
-               ${INSTALL} -s kdump-linux-${LINUX_VERSION} $@-${LINUX_VERSION} ;; \
+               ${INSTALL} kdump-linux-${LINUX_VERSION} $@-${LINUX_VERSION} ;; \
        hp_ux11* ) \
                ${INSTALLex} -f ${srcdir}/kdump.sh.hp_ux11 ${DEST}/etc/kdump; \
-               ${INSTALL} -s -f $? $@;; \
+               ${INSTALL} -f $? $@;; \
        *nbsd*) \
                ;; \
        *) \
-               ${INSTALL} -s $? $@ ;; \
+               ${INSTALL} $? $@ ;; \
        esac
 
 ${DEST}/etc/kdump64: kdump-build
        if [ -f kdump64 ]; then \
-               ${INSTALL} -s kdump64 $@; \
+               ${INSTALL} kdump64 $@; \
        fi
 
 
@@ -328,22 +328,22 @@ test:
 include ../config/Makefile.version
 
 ${DESTDIR}${bindir}/fs: fs
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${bindir}/livesys: livesys
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${afssrvbindir}/fs: fs
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${bindir}/up: up
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${sbindir}/fstrace: fstrace
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${bindir}/cmdebug: cmdebug
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${sbindir}/kdump: kdump-build
        -set -x; \
@@ -354,24 +354,24 @@ ${DESTDIR}${sbindir}/kdump: kdump-build
                ln -fs kdump.IP20 ${DESTDIR}${sbindir}/kdump.IP22; \
                ln -fs kdump.IP20 ${DESTDIR}${sbindir}/kdump.IP32; \
                for f in kdump.IP??; \
-                       do ${INSTALL} -s $$f ${DESTDIR}${sbindir}/$$f || exit $$? ; \
+                       do ${INSTALL} $$f ${DESTDIR}${sbindir}/$$f || exit $$? ; \
                done ;; \
        sun*_5[789] | sun*_510 ) \
                ${INSTALLex} -f kdump.sh.solaris7 ${DESTDIR}${sbindir}/kdump32; \
-               ${INSTALL} -s -f $? $@;; \
+               ${INSTALL} -f $? $@;; \
        *linux* ) \
                ${INSTALLex} -f kdump.sh.linux ${DESTDIR}${sbindir}/kdump; \
-               ${INSTALL} -s $? $@ ;; \
+               ${INSTALL} $? $@ ;; \
        hp_ux11* ) \
                ${INSTALLex} -f kdump.sh.hp_ux11 ${DESTDIR}${sbindir}/kdump; \
-               ${INSTALL} -s -f $? $@;; \
+               ${INSTALL} -f $? $@;; \
        *) \
-               ${INSTALL} -s $? $@ ;; \
+               ${INSTALL} $? $@ ;; \
        esac
 
 ${DESTDIR}${sbindir}/kdump64: kdump-build
        if [ -f kdump64 ]; then \
-               ${INSTALL} -s kdump64 $@; \
+               ${INSTALL} kdump64 $@; \
        fi
 
 dest: \
index 081c646d55d0a21bca003014aac592d7b6feaf4e..a7ebc8f38bd584dcb13f0d60f4561d4d30e0e287 100644 (file)
@@ -67,10 +67,10 @@ install: \
        ${DESTDIR}${includedir}/afs/namei_ops.h
 
 ${DEST}/root.server/usr/afs/bin/salvager: salvager 
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DEST}/root.server/usr/afs/bin/volinfo: volinfo
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DEST}/lib/afs/vlib.a: vlib.a
        ${INSTALL} $? $@
@@ -79,22 +79,22 @@ ${DEST}/lib/afs/libvlib.a: vlib.a
        ${INSTALL} $? $@
 
 ${DESTDIR}${afssrvsbindir}/fs_conv_dux40D:  fs_conv_dux40D
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${afssrvsbindir}/xfs_size_check:  xfs_size_check
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${afssrvsbindir}/fs_conv_sol26:  fs_conv_sol26
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 $(DEST)/root.server/usr/afs/bin/fs_conv_dux40D:  fs_conv_dux40D
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 $(DEST)/root.server/usr/afs/bin/xfs_size_check:  xfs_size_check
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 $(DEST)/root.server/usr/afs/bin/fs_conv_sol26:  fs_conv_sol26
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DEST}/include/afs/nfs.h: nfs.h
        ${INSTALL} $? $@
@@ -209,10 +209,10 @@ ${TOP_LIBDIR}/libvlib.a: vlib.a
        ${INSTALL} $? $@
 
 ${DESTDIR}${afssrvlibexecdir}/salvager: salvager
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${afssrvsbindir}/volinfo: volinfo
-       ${INSTALL} -s $? $@
+       ${INSTALL} $? $@
 
 ${DESTDIR}${includedir}/afs/nfs.h: nfs.h
        ${INSTALL} $? $@