diff --git a/README b/README index a0e49e3460..584b08a050 100644 --- a/README +++ b/README @@ -67,6 +67,30 @@ A. Creating the proper directory structure. headers for your configured kernel can be found. See the system-specific Notes sections below for 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 diff --git a/acinclude.m4 b/acinclude.m4 index 64f41a7581..4cd7715af5 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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" ) diff --git a/src/afsmonitor/Makefile.in b/src/afsmonitor/Makefile.in index 45d8ff8ea2..70661ae7fe 100644 --- a/src/afsmonitor/Makefile.in +++ b/src/afsmonitor/Makefile.in @@ -56,11 +56,11 @@ afsmon-parselog: afsmon-parselog.o ${LIBS} install: afsmonitor ${INSTALL} -d ${DESTDIR}${bindir} - ${INSTALL} afsmonitor ${DESTDIR}${bindir}/afsmonitor + ${INSTALL_PROGRAM} afsmonitor ${DESTDIR}${bindir}/afsmonitor dest: afsmonitor ${INSTALL} -d ${DEST}/bin - ${INSTALL} afsmonitor ${DEST}/bin/afsmonitor + ${INSTALL_PROGRAM} afsmonitor ${DEST}/bin/afsmonitor clean: $(RM) -f *.o afsmonitor AFS_component_version_number.c diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index c873c0d2bb..8407a2670f 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -18,6 +18,7 @@ KERN_OPTMZ=-O DBG=-g OPTMZ=-O LWP_DBG=-g +NO_STRIP_BIN= LWP_OPTMZ=-O PAM_DBG=-g PAM_OPTMZ= @@ -1029,6 +1030,7 @@ fi if test "x$enable_debug" = "xno"; then DBG= + NO_STRIP_BIN=-s fi if test "x$enable_optimize" = "xno"; then @@ -1043,6 +1045,18 @@ 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= + else + NO_STRIP_BIN=-s + fi +else + NO_STRIP_BIN= +fi + +INSTALL_PROGRAM="${INSTALL_PROGRAM} ${NO_STRIP_BIN}" + AC_SUBST(CCXPG2) AC_SUBST(CCOBJ) AC_SUBST(AFSD_LIBS) @@ -1063,6 +1077,7 @@ AC_SUBST(MT_CC) AC_SUBST(MT_CFLAGS) AC_SUBST(MT_LIBS) AC_SUBST(MV) +AC_SUBST(NO_STRIP_BIN) AC_SUBST(OPTMZ) AC_SUBST(PAM_CFLAGS) AC_SUBST(PAM_LIBS) diff --git a/src/config/Makefile.config.in b/src/config/Makefile.config.in index d1514d11f4..81e6198507 100644 --- a/src/config/Makefile.config.in +++ b/src/config/Makefile.config.in @@ -59,6 +59,7 @@ MT_CC = @MT_CC@ MT_CFLAGS = @MT_CFLAGS@ MT_LIBS = @MT_LIBS@ MV = @MV@ +NO_STRIP_BIN = @NO_STRIP_BIN@ OPTMZ = @OPTMZ@ PAM_CFLAGS = @PAM_CFLAGS@ PAM_LIBS = @PAM_LIBS@ diff --git a/src/platform/DARWIN/Makefile.in b/src/platform/DARWIN/Makefile.in index 36d9be4726..cbd60b2ecb 100644 --- a/src/platform/DARWIN/Makefile.in +++ b/src/platform/DARWIN/Makefile.in @@ -25,10 +25,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 diff --git a/src/ptserver/Makefile.in b/src/ptserver/Makefile.in index c74b665622..10c71c1d4f 100644 --- a/src/ptserver/Makefile.in +++ b/src/ptserver/Makefile.in @@ -201,11 +201,11 @@ install: ptserver pts pt_util db_verify libprot.a ptclient.h pterror.h \ ${INSTALL} -d ${DESTDIR}${bindir} ${INSTALL} -d ${DESTDIR}${libdir}/afs ${INSTALL} -d ${DESTDIR}${includedir}/afs - ${INSTALL} ptserver ${DESTDIR}${afssrvlibexecdir}/ptserver - ${INSTALL} pts ${DESTDIR}${afssrvbindir}/pts - ${INSTALL} pts ${DESTDIR}${bindir}/pts - ${INSTALL} pt_util ${DESTDIR}${afssrvsbindir}/pt_util - ${INSTALL} db_verify ${DESTDIR}${afssrvsbindir}/prdb_check + ${INSTALL_PROGRAM} ptserver ${DESTDIR}${afssrvlibexecdir}/ptserver + ${INSTALL_PROGRAM} pts ${DESTDIR}${afssrvbindir}/pts + ${INSTALL_PROGRAM} pts ${DESTDIR}${bindir}/pts + ${INSTALL_PROGRAM} pt_util ${DESTDIR}${afssrvsbindir}/pt_util + ${INSTALL_PROGRAM} db_verify ${DESTDIR}${afssrvsbindir}/prdb_check ${INSTALL_DATA} libprot.a ${DESTDIR}${libdir}/afs/libprot.a ${INSTALL_DATA} ptclient.h ${DESTDIR}${includedir}/afs/prclient.h ${INSTALL_DATA} pterror.h ${DESTDIR}${includedir}/afs/prerror.h @@ -224,11 +224,11 @@ dest: ptserver pts pt_util db_verify libprot.a ptclient.h pterror.h \ ${INSTALL} -d ${DEST}/etc ${INSTALL} -d ${DEST}/lib/afs ${INSTALL} -d ${DEST}/include/afs - ${INSTALL} ptserver ${DEST}/root.server/usr/afs/bin/ptserver - ${INSTALL} pts ${DEST}/root.server/usr/afs/bin/pts - ${INSTALL} pts ${DEST}/bin/pts - ${INSTALL} pt_util ${DEST}/root.server/usr/afs/bin/pt_util - ${INSTALL} db_verify ${DEST}/etc/prdb_check + ${INSTALL_PROGRAM} ptserver ${DEST}/root.server/usr/afs/bin/ptserver + ${INSTALL_PROGRAM} pts ${DEST}/root.server/usr/afs/bin/pts + ${INSTALL_PROGRAM} pts ${DEST}/bin/pts + ${INSTALL_PROGRAM} pt_util ${DEST}/root.server/usr/afs/bin/pt_util + ${INSTALL_PROGRAM} db_verify ${DEST}/etc/prdb_check ${INSTALL_DATA} libprot.a ${DEST}/lib/afs/libprot.a ${INSTALL_DATA} ptclient.h ${DEST}/include/afs/prclient.h ${INSTALL_DATA} pterror.h ${DEST}/include/afs/prerror.h diff --git a/src/tviced/Makefile.in b/src/tviced/Makefile.in index d79e112bdd..b749078ead 100644 --- a/src/tviced/Makefile.in +++ b/src/tviced/Makefile.in @@ -212,14 +212,14 @@ state_analyzer: ${SDBGOBJS} install: fileserver state_analyzer ${INSTALL} -d ${DESTDIR}${afssrvlibexecdir} ${INSTALL} -d ${DESTDIR}${afssrvsbindir} - ${INSTALL_PROGRAM} fileserver \ + ${INSTALL} fileserver \ ${DESTDIR}${afssrvlibexecdir}/fileserver ${INSTALL_PROGRAM} state_analyzer \ ${DESTDIR}${afssrvsbindir}/state_analyzer dest: fileserver state_analyzer ${INSTALL} -d ${DEST}/root.server/usr/afs/bin - ${INSTALL_PROGRAM} fileserver \ + ${INSTALL} fileserver \ ${DEST}/root.server/usr/afs/bin/fileserver ${INSTALL_PROGRAM} state_analyzer \ ${DEST}/root.server/usr/afs/bin/state_analyzer diff --git a/src/tvolser/Makefile.in b/src/tvolser/Makefile.in index c5c80a47d1..0838de1b66 100644 --- a/src/tvolser/Makefile.in +++ b/src/tvolser/Makefile.in @@ -204,11 +204,11 @@ volserver: ${objects} ${LIBS} install: volserver ${INSTALL} -d ${DESTDIR}${afssrvlibexecdir} - ${INSTALL_PROGRAM} volserver ${DESTDIR}${afssrvlibexecdir}/volserver + ${INSTALL} volserver ${DESTDIR}${afssrvlibexecdir}/volserver dest: volserver ${INSTALL} -d ${DEST}/root.server/usr/afs/bin - ${INSTALL_PROGRAM} volserver ${DEST}/root.server/usr/afs/bin/volserver + ${INSTALL} volserver ${DEST}/root.server/usr/afs/bin/volserver clean: $(RM) -f *.o volserver core AFS_component_version_number.c diff --git a/src/viced/Makefile.in b/src/viced/Makefile.in index 5f2d010f09..202701b0f3 100644 --- a/src/viced/Makefile.in +++ b/src/viced/Makefile.in @@ -106,13 +106,13 @@ install: fileserver fs_stats.h alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*|sunx86*) \ echo "Don't install fileserver for ${SYS_NAME}" ;; \ *_darwin_[1-6][0-9]) \ - echo ${INSTALL_PROGRAM} fileserver ${DESTDIR}${afssrvlibexecdir}/fileserver ; \ - ${INSTALL_PROGRAM} fileserver ${DESTDIR}${afssrvlibexecdir}/fileserver ;; \ + echo ${INSTALL} fileserver ${DESTDIR}${afssrvlibexecdir}/fileserver ; \ + ${INSTALL} fileserver ${DESTDIR}${afssrvlibexecdir}/fileserver ;; \ *_darwin_*) \ echo "Don't install fileserver for ${SYS_NAME}" ;; \ *) \ - echo ${INSTALL_PROGRAM} fileserver ${DESTDIR}${afssrvlibexecdir}/fileserver ; \ - ${INSTALL_PROGRAM} fileserver ${DESTDIR}${afssrvlibexecdir}/fileserver ;; \ + echo ${INSTALL} fileserver ${DESTDIR}${afssrvlibexecdir}/fileserver ; \ + ${INSTALL} fileserver ${DESTDIR}${afssrvlibexecdir}/fileserver ;; \ esac dest: fileserver fs_stats.h @@ -123,13 +123,13 @@ dest: fileserver fs_stats.h alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*|sunx86*) \ echo "Don't install fileserver for ${SYS_NAME}" ;; \ *_darwin_[1-6][0-9]) \ - echo ${INSTALL_PROGRAM} fileserver ${DEST}/root.server/usr/afs/bin/fileserver ; \ - ${INSTALL_PROGRAM} fileserver ${DEST}/root.server/usr/afs/bin/fileserver ;; \ + echo ${INSTALL} fileserver ${DEST}/root.server/usr/afs/bin/fileserver ; \ + ${INSTALL} fileserver ${DEST}/root.server/usr/afs/bin/fileserver ;; \ *_darwin_*) \ echo "Don't install fileserver for ${SYS_NAME}" ;; \ *) \ - echo ${INSTALL_PROGRAM} fileserver ${DEST}/root.server/usr/afs/bin/fileserver ; \ - ${INSTALL_PROGRAM} fileserver ${DEST}/root.server/usr/afs/bin/fileserver ;; \ + echo ${INSTALL} fileserver ${DEST}/root.server/usr/afs/bin/fileserver ; \ + ${INSTALL} fileserver ${DEST}/root.server/usr/afs/bin/fileserver ;; \ esac clean: diff --git a/src/volser/Makefile.in b/src/volser/Makefile.in index cff8182d1c..ef6c5baa93 100644 --- a/src/volser/Makefile.in +++ b/src/volser/Makefile.in @@ -148,16 +148,16 @@ install: restorevol voldump volser.h volint.h vos volserver libvolser.a alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*|sunx86*) \ echo "Don't install volserver for ${SYS_NAME}" ;; \ *_darwin_[1-6][0-9]) \ - echo ${INSTALL_PROGRAM} volserver \ + echo ${INSTALL} volserver \ ${DESTDIR}${afssrvlibexecdir}/volserver ; \ - ${INSTALL_PROGRAM} volserver \ + ${INSTALL} volserver \ ${DESTDIR}${afssrvlibexecdir}/volserver ;; \ *_darwin_*) \ echo "Don't install volserver for ${SYS_NAME}" ;; \ *) \ echo ${INSTALL_PRORAM} volserver \ ${DESTDIR}${afssrvlibexecdir}/volserver ; \ - ${INSTALL_PROGRAM} volserver \ + ${INSTALL} volserver \ ${DESTDIR}${afssrvlibexecdir}/volserver ;; \ esac @@ -177,16 +177,16 @@ dest: restorevol voldump volser.h volint.h vos volserver libvolser.a alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun4x*|sunx86*) \ echo "Don't install volserver for ${SYS_NAME}" ;; \ *_darwin_[1-6][0-9]) \ - echo ${INSTALL_PROGRAM} volserver \ + echo ${INSTALL} volserver \ ${DEST}/root.server/usr/afs/bin/volserver ; \ - ${INSTALL_PROGRAM} -ns volserver \ + ${INSTALL} -ns volserver \ ${DEST}/root.server/usr/afs/bin/volserver ;; \ *_darwin_*) \ echo "Don't install volserver for ${SYS_NAME}" ;; \ *) \ - echo ${INSTALL_PROGRAM} volserver \ + echo ${INSTALL} volserver \ ${DEST}/root.server/usr/afs/bin/volserver ; \ - ${INSTALL_PROGRAM} volserver \ + ${INSTALL} volserver \ ${DEST}/root.server/usr/afs/bin/volserver ;; \ esac