Bugzilla: 51465. strip binaries on optimized builds

This commit is contained in:
larryh%netscape.com 2000-09-28 17:47:22 +00:00
parent 448fea8c67
commit eaca9c4309
5 changed files with 18 additions and 0 deletions

View File

@ -115,6 +115,8 @@ endif
MKSHLIB = $(LD) $(DSO_LDOPTS) -soname $(notdir $@)
ifdef BUILD_OPT
OPTIMIZER = -O2
# invoke 'strip' on *.so files in optimized builds
STRIP = strip
endif
######################################################################

View File

@ -37,6 +37,7 @@ OBJ_SUFFIX = o
LIB_SUFFIX = a
DLL_SUFFIX = so
AR = ar cr $@
STRIP = true
ifdef BUILD_OPT
OPTIMIZER = -O

View File

@ -10,6 +10,8 @@ DLL_SUFFIX = @DLL_SUFFIX@
MOD_VERSION = @NSPR_VERSION@
MOD_NAME = @NSPR_MODNAME@
BUILD_OPT = @MOZ_OPTIMIZE@
USE_CPLUS = @USE_CPLUS@
USE_IPV6 = @USE_IPV6@
USE_N32 = @USE_N32@
@ -32,6 +34,7 @@ PERL = @PERL@
DLLTOOL = @DLLTOOL@
WINDRES = @WINDRES@
RC = $(WINDRES)
STRIP = @STRIP@
OS_CFLAGS = @CFLAGS@ $(DSO_CFLAGS)
OS_CXXFLAGS = @CXXFLAGS@ $(DSO_CFLAGS)

View File

@ -285,6 +285,9 @@ else
$(CC) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS)
endif
endif
ifdef BUILD_OPT
$(STRIP) $@
endif
$(LIBRARY): $(OBJS)
@$(MAKE_OBJDIR)
@ -297,6 +300,9 @@ ifdef USE_AUTOCONF
else
$(AR) $(OBJS) $(AR_EXTRA_ARGS)
endif # USE_AUTOCONF
endif
ifdef BUILD_OPT
$(STRIP) $@
endif
$(RANLIB) $@
@ -371,6 +377,9 @@ endif # OS2
endif # WINNT
endif # AIX 4.1
endif # USE_AUTOCONF
ifdef BUILD_OPT
$(STRIP) $@
endif
ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)))

View File

@ -250,6 +250,7 @@ dnl ========================================================
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PATH_PROGS(PERL, perl5 perl, :)
AC_PATH_PROGS(STRIP, strip, :)
dnl ========================================================
dnl Default platform specific options
@ -1047,6 +1048,8 @@ AC_SUBST(HOST_CFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(GNU_CC)
AC_SUBST(MOZ_OPTIMIZE)
AC_SUBST(USE_CPLUS)
AC_SUBST(USE_IPV6)
AC_SUBST(USE_N32)