r15434 - gnucash/trunk/packaging/win32 - Install.sh: Add DISABLE_OPTIMIZATIONS and --disable-static's.

Andreas Köhler andi5 at cvs.gnucash.org
Sat Jan 27 07:53:53 EST 2007


Author: andi5
Date: 2007-01-27 07:53:51 -0500 (Sat, 27 Jan 2007)
New Revision: 15434
Trac: http://svn.gnucash.org/trac/changeset/15434

Modified:
   gnucash/trunk/packaging/win32/custom.sh
   gnucash/trunk/packaging/win32/install.sh
Log:
Install.sh: Add DISABLE_OPTIMIZATIONS and --disable-static's.

If DISABLE_OPTIMIZATIONS is "yes", add "-O0" to CFLAGS. This will make the
binaries slower, smaller and easier to debug. Also add
"--disable-static" to the configuration of libtool, guile and libgsf.


Modified: gnucash/trunk/packaging/win32/custom.sh
===================================================================
--- gnucash/trunk/packaging/win32/custom.sh	2007-01-27 04:33:37 UTC (rev 15433)
+++ gnucash/trunk/packaging/win32/custom.sh	2007-01-27 12:53:51 UTC (rev 15434)
@@ -39,6 +39,9 @@
 fi
 ####
 
+# If "yes", build without optimizations (-O0) and ease debugging
+DISABLE_OPTIMIZATIONS=no
+
 MSYS_DIR=$GLOBAL_DIR\\msys
 
 WGET_DIR=$GLOBAL_DIR\\wget

Modified: gnucash/trunk/packaging/win32/install.sh
===================================================================
--- gnucash/trunk/packaging/win32/install.sh	2007-01-27 04:33:37 UTC (rev 15433)
+++ gnucash/trunk/packaging/win32/install.sh	2007-01-27 12:53:51 UTC (rev 15434)
@@ -59,6 +59,10 @@
     TMP_UDIR=`unix_path $TMP_DIR`
     mkdir -p $TMP_UDIR
     mkdir -p $DOWNLOAD_UDIR
+
+    if [ "$DISABLE_OPTIMIZATIONS" = "yes" ]; then
+        export CFLAGS="$CFLAGS -O0"
+    fi
 }
 
 function inst_wget() {
@@ -228,7 +232,7 @@
         wget_unpacked $LIBTOOL_URL $DOWNLOAD_DIR $TMP_DIR
         qpushd $TMP_UDIR/libtool-*
             echo "building libtool..."
-            ./configure ${HOST_XCOMPILE} --prefix=$_AUTOTOOLS_UDIR
+            ./configure ${HOST_XCOMPILE} --prefix=$_AUTOTOOLS_UDIR --disable-static
             make
             make install
         qpopd
@@ -275,6 +279,7 @@
                 touch upstream/ltdl.c.diff
             qpopd
             ./configure ${HOST_XCOMPILE} \
+                --disable-static \
 	        --disable-elisp \
 	        --disable-networking \
 	        --disable-dependency-tracking \
@@ -549,6 +554,7 @@
 	qpushd $TMP_UDIR/libgsf-*
 	    ./configure ${HOST_XCOMPILE} \
 	        --prefix=$_LIBGSF_UDIR \
+                --disable-static \
 	        --without-python \
 	        CPPFLAGS="${GNOME_CPPFLAGS}" \
 	        LDFLAGS="${GNOME_LDFLAGS}"



More information about the gnucash-changes mailing list