STABLE14-autoconf-strip-debug-options-sanity-20071112

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 8593c52c27)
This commit is contained in:
Kevin McBride 2007-11-12 18:31:17 +00:00 committed by Derrick Brashear
parent cc24da5669
commit 4c23bb5984
11 changed files with 113 additions and 65 deletions

View File

@ -396,7 +396,7 @@ ptserver_depinstall: pinstall rxgen comerr
${COMPILE_PART1} ptserver ${COMPILE_DEPINSTALL}
${DEST}/bin/dedebug: dedebug
${INSTALL} -s $? $@
${INSTALL} $? $@
#

24
README
View File

@ -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

View 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"
)

View 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)

View 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

View 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} $? $@

View 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} $? $@

View 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

View 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

View 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: \

View 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} $? $@