--- trunk/mage/usr/lib/mage/smage2.sh 2011/07/25 11:59:49 1436 +++ trunk/mage/usr/lib/mage/smage2.sh 2011/12/20 16:06:13 1543 @@ -583,7 +583,7 @@ local stripdir="$@" [ -z "${stripdir}" ] && stripdir=${BINDIR} - find ${stripdir} | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find ${stripdir} | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip ${STRIP_DYN_LIB} 2> /dev/null } mstripbins() @@ -591,7 +591,15 @@ local stripdir="$@" [ -z "${stripdir}" ] && stripdir=${BINDIR} - find ${stripdir} | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find ${stripdir} | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip ${STRIP_DYN_BIN} 2> /dev/null +} + +mstripstatic() +{ + local stripdir="$@" + + [ -z "${stripdir}" ] && stripdir=${BINDIR} + find ${stripdir} | xargs file | grep "ar archive" | cut -f 1 -d : | xargs strip ${STRIP_STATIC_LIB} 2> /dev/null } mcompressdocs() @@ -1595,14 +1603,18 @@ do echo -e "${COLBLUE}===${COLGREEN} stripping binaries for '${subpackage}' ...${COLDEFAULT}" mstripbins ${BINDIR}_${subpackage} - echo -e "${COLBLUE}===${COLGREEN} stripping libraries for '${subpackage}' ...${COLDEFAULT}" + echo -e "${COLBLUE}===${COLGREEN} stripping dynamic libraries for '${subpackage}' ...${COLDEFAULT}" mstriplibs ${BINDIR}_${subpackage} + echo -e "${COLBLUE}===${COLGREEN} stripping static libraries for '${subpackage}' ...${COLDEFAULT}" + mstripstatic ${BINDIR}_${subpackage} done else echo -e "${COLBLUE}===${COLGREEN} stripping binaries ...${COLDEFAULT}" mstripbins ${BINDIR} - echo -e "${COLBLUE}===${COLGREEN} stripping libraries ...${COLDEFAULT}" + echo -e "${COLBLUE}===${COLGREEN} stripping dynamic libraries ...${COLDEFAULT}" mstriplibs ${BINDIR} + echo -e "${COLBLUE}===${COLGREEN} stripping static libraries ...${COLDEFAULT}" + mstripstatic ${BINDIR} fi ;; esac