From bf7e07b35c9b52e12c5a295d5ca290b99fd02f2c Mon Sep 17 00:00:00 2001 From: Rene Rebe Date: Thu, 14 Aug 2003 18:12:55 +0000 Subject: [PATCH] renamed ROCKCFG_STRIP to ROCKCFG_OPT to support non-stripped and non-optimized binaries for debugging. also removed some -O and -strip hardcodings in package .conf files ..._ git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1061 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/alessandro/postfix/postfix.conf | 3 --- package/base/gcc3/gcc3.conf | 2 +- package/base/gcc3/parse-config | 23 ++++++++-------- package/base/ncompress/ncompress.conf | 2 -- package/base/whois/whois.conf | 3 +-- .../subversion-static/subversion-static.conf | 27 +++++++++---------- package/x11/mozilla/mozilla.conf | 4 --- scripts/Build-Tools | 2 +- scripts/config.hlp | 13 ++++----- scripts/config.in | 6 +++-- scripts/functions | 2 +- 11 files changed, 39 insertions(+), 48 deletions(-) diff --git a/package/alessandro/postfix/postfix.conf b/package/alessandro/postfix/postfix.conf index 6f106ae3e..fa13627c6 100644 --- a/package/alessandro/postfix/postfix.conf +++ b/package/alessandro/postfix/postfix.conf @@ -21,9 +21,6 @@ # --- ROCK-COPYRIGHT-NOTE-END --- pkg_postfix_inmake() { - if [ $ROCKCFG_STRIP = 1 ] ; then - strip bin/* libexec/* - fi chmod +x postfix-install } diff --git a/package/base/gcc3/gcc3.conf b/package/base/gcc3/gcc3.conf index e0e34988b..3056e6d30 100644 --- a/package/base/gcc3/gcc3.conf +++ b/package/base/gcc3/gcc3.conf @@ -50,7 +50,7 @@ custmain() { mv Makefile.in Makefile.in.orig sed -e 's/LANGUAGES="[^"]*"/LANGUAGES="c"/g' \ < Makefile.in.orig > Makefile.in - elif [ "$ROCKCFG_STRIP" != 0 ] ; then + elif [ "$ROCKCFG_OPT" = 0 ] ; then if [ -f libstdc++*/configure ] ; then echo "Setting DEBUG_FLAGS='-s' in libstdc++ configure." ( cd libstdc++* ; mv configure configure.orig diff --git a/package/base/gcc3/parse-config b/package/base/gcc3/parse-config index e0c27c24e..9f127b5d8 100644 --- a/package/base/gcc3/parse-config +++ b/package/base/gcc3/parse-config @@ -70,20 +70,19 @@ for x in CC CXX F77 ; do done # Add the usual gcc optimazation options -# -if [ "$ROCKCFG_OPTSIZE" = 1 ] ; then - var_insert GCC_WRAPPER_REMOVE " " "-O -O[0-9] -m*" - var_insert GCC_WRAPPER_INSERT " " "-Os -pipe" -else - var_insert GCC_WRAPPER_REMOVE " " "-O -O[01s] -m*" - var_insert GCC_WRAPPER_INSERT " " "-O2 -pipe" -fi - # Strip or add debug information # -if [ "$ROCKCFG_STRIP" != 0 ] ; then +if [ "$ROCKCFG_OPT" = 1 ] ; then var_append GCC_WRAPPER_APPEND " " "-s" var_insert GCC_WRAPPER_REMOVE " " "-g*" + + var_insert GCC_WRAPPER_REMOVE " " "-O -O[0-9s] -m*" + + if [ "$ROCKCFG_OPTSIZE" = 1 ] ; then + var_insert GCC_WRAPPER_INSERT " " "-Os -pipe" + else + var_insert GCC_WRAPPER_INSERT " " "-O2 -pipe" + fi else if [[ $pkg != glibc* ]] ; then var_append GCC_WRAPPER_APPEND " " "-ggdb" @@ -91,7 +90,7 @@ else fi fi -# Compile with no exceptions or rtti; gcc itself must support both +# Compile with no exceptions or rtti, gcc itself must support both # if [ "$ROCKCFG_LIMITCXX" = 1 ] && [[ $pkg != gcc* ]] ; then var_append CXX_WRAPPER_APPEND " " "-fno-exceptions -fno-rtti" @@ -103,7 +102,7 @@ fi var_insert GCC3_WRAPPER_REMOVE " " "-I/usr/include" var_insert GCC3_WRAPPER_REMOVE " " "-I/usr/local/include" -# Add the architecture gcc optimazation options +# Add the architecture gcc optimisation options # if [ -f architecture/$arch/gcc-options ] ; then . architecture/$arch/gcc-options diff --git a/package/base/ncompress/ncompress.conf b/package/base/ncompress/ncompress.conf index 504598887..73e9001fc 100644 --- a/package/base/ncompress/ncompress.conf +++ b/package/base/ncompress/ncompress.conf @@ -20,13 +20,11 @@ # # --- ROCK-COPYRIGHT-NOTE-END --- - nc_main() { echo -en 'genmake\nq\n' | ./build eval $MAKE compress rm -f /usr/bin/compress /usr/bin/uncompress cp compress /usr/bin/compress - strip /usr/bin/compress ln -s /usr/bin/compress /usr/bin/uncompress cp compress.1 /usr/share/man/man1/ } diff --git a/package/base/whois/whois.conf b/package/base/whois/whois.conf index b408d05bf..9ddc08b9b 100644 --- a/package/base/whois/whois.conf +++ b/package/base/whois/whois.conf @@ -20,10 +20,9 @@ # # --- ROCK-COPYRIGHT-NOTE-END --- - whois_main() { $MAKE - install --strip -m 0755 whois $root/usr/bin + install -m 0755 whois $root/usr/bin install -m 0644 whois.1 $root/usr/man/man1 } diff --git a/package/rene/subversion-static/subversion-static.conf b/package/rene/subversion-static/subversion-static.conf index fa9d2026a..a311cc861 100644 --- a/package/rene/subversion-static/subversion-static.conf +++ b/package/rene/subversion-static/subversion-static.conf @@ -20,21 +20,20 @@ # # --- ROCK-COPYRIGHT-NOTE-END --- -# use the apache prefix -. $base/package/*/apache/apache.conf +svn_static_pm() +{ + for prg in svnadmin/svnadmin svnlook/svnlook svnversion/svnversion \ + svndumpfilter/ svndumpfilter clients/cmdline/svn ; do + xprg=$(basename $prg) -# all this is to build the apache server-side module -# and to make sure no locally included APR stuff get's installed -# as well as no modification to httpd.conf is done ... -if pkgcheck apache X ; then - var_append extraconfopt " " "--with-apxs=/$prefix/sbin/apxs \ ---with-apr=/$prefix/bin/apr-config --with-apr-util=/$prefix \ ---with-berkeley-db=/usr/include/db40:/usr/lib --disable-mod-activation" -fi + cp -v subversion/$prg $prefix/bin/$xprg-static-$ver + ln -sfv $xprg-static-$ver $prefix/bin/$xprg-static + done +} -# use system wide neon -var_append extraconfopt " " "--with-neon=$root/usr" +createdoc=0 +makeinstopt="" -hook_add postmake 3 "install_init svnserve $confdir/svnserve.init" -hook_add postinstall 3 "cp -vrf tools $docdir" +var_append extraconfopt " " "--enable-all-static" +hook_add postmake 3 svn_static_pm diff --git a/package/x11/mozilla/mozilla.conf b/package/x11/mozilla/mozilla.conf index 57cb8ec0b..a839fc3a4 100644 --- a/package/x11/mozilla/mozilla.conf +++ b/package/x11/mozilla/mozilla.conf @@ -45,9 +45,6 @@ ac_add_options --localstatedir=/var ac_add_options --host=$arch_target ac_add_options --disable-debug ac_add_options --disable-dtd-debug -ac_add_options --enable-optimize='-O2' -ac_add_options --enable-strip -ac_add_options --enable-strip-libs ac_add_options --disable-pedantic ac_add_options --with-extensions ac_add_options --enable-extensions=default,venkman,inspector @@ -56,7 +53,6 @@ ac_add_options --enable-mathml ac_add_options --enable-svg ac_add_options --enable-crypto ac_add_options --enable-module=psm - ac_add_options --enable-xft ac_add_options --enable-default-toolkit=gtk2 EOP diff --git a/scripts/Build-Tools b/scripts/Build-Tools index b0e6de073..48720b582 100755 --- a/scripts/Build-Tools +++ b/scripts/Build-Tools @@ -181,7 +181,7 @@ if [ "$STRIP_WRAPPER_NOLOOP" = 1 ] ; then echo "Aaaaaeik! Strip wrapper is looping!" >&2 exit 1 fi -if [ "$ROCKCFG_STRIP" != 0 ] ; then +if [ "$ROCKCFG_OPT" = 0 ] ; then PATH=${PATH//$STRIP_WRAPPER_MYPATH:/} export STRIP_WRAPPER_NOLOOP=1 exec "`basename $0`" "$@" diff --git a/scripts/config.hlp b/scripts/config.hlp index 2dd7e3562..812c312cd 100644 --- a/scripts/config.hlp +++ b/scripts/config.hlp @@ -236,14 +236,15 @@ ROCKCFG_DO_REBUILD_STAGE In former times this was recommended - but nowadays this is only a paranoia thing. -ROCKCFG_STRIP - If this option is enabled debugging information are not build into - the binaries and additionally stripped - that is non-vital - information are removed from binaries. See `man strip` for details. - If disabled debugging informations are included into the binaries. +ROCKCFG_OPT + If this option is enabled binaries and libraries are optimised and + debugging information are not build into those binaries and + additionally stripped. That is non-vital information are removed from + binaries. See `man strip` for details. If disabled debugging + informations are included into the binaries. ROCKCFG_OPTSIZE - Please check here if you want to optimise binaries for file-size + Enable this option if you want to optimise binaries for file-size instead of performance. This is useful for embedded devices and other low-memory systems. (But on the other hand is also the best performance setting, too). diff --git a/scripts/config.in b/scripts/config.in index 22cadd465..371f05483 100644 --- a/scripts/config.in +++ b/scripts/config.in @@ -339,8 +339,10 @@ break packages!' pkgfilter sed 's,^\([XO] [0-8-]*\)9 ,\1- ,' fi - bool 'Stripping all binaries and libraries' ROCKCFG_STRIP 1 - bool 'Optimize for size and not for speed' ROCKCFG_OPTSIZE 0 + bool 'Optimise all binaries and libraries' ROCKCFG_OPT 1 + if [ $ROCKCFG_OPT = 1 ] ; then + bool 'Optimise for size and not for speed' ROCKCFG_OPTSIZE 0 + fi bool 'Disable exceptions and rtti in C++' ROCKCFG_LIMITCXX 0 bool 'Enable c-compiler multilib support' ROCKCFG_MULTILIB 0 diff --git a/scripts/functions b/scripts/functions index 07f1b4d03..ccf589ad6 100644 --- a/scripts/functions +++ b/scripts/functions @@ -171,7 +171,7 @@ set_confopt() { confopt="$confopt $ROCKCFG_CONFIGURE_OPTS" fi - if [ "$ROCKCFG_STRIP" = 1 ] ; then + if [ "$ROCKCFG_OPT" = 1 ] ; then confopt="$confopt --disable-debug" fi