[Vm-dev] [commit] r2527 - Automatically choose -O1 for gcc 3.4.x in
the linux builds.
commits at squeakvm.org
commits at squeakvm.org
Mon Jan 23 19:01:43 UTC 2012
Author: eliot
Date: 2012-01-23 11:01:42 -0800 (Mon, 23 Jan 2012)
New Revision: 2527
Modified:
branches/Cog/nscogbuild/unixbuild/bld/mvm
branches/Cog/unixbuild/bld/mvm
branches/Cog/unixbuild/mtbld/mvm
Log:
Automatically choose -O1 for gcc 3.4.x in the linux builds.
Modified: branches/Cog/nscogbuild/unixbuild/bld/mvm
===================================================================
--- branches/Cog/nscogbuild/unixbuild/bld/mvm 2012-01-20 23:46:37 UTC (rev 2526)
+++ branches/Cog/nscogbuild/unixbuild/bld/mvm 2012-01-23 19:01:42 UTC (rev 2527)
@@ -1,5 +1,11 @@
#!/bin/sh
-test -f config.h || ../../../platforms/unix/config/configure --with-src=nscogsrc CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DDEBUGVM=0" LIBS="-lpthread -luuid"
+# Some gcc versions create a broken VM using -O2
+case `gcc -v 2>&1 | grep version | sed 's/gcc version *//'` in
+3.4.*) OPT=-O1;;
+*) OPT=-O2;;
+esac
+
+test -f config.h || ../../../platforms/unix/config/configure --with-src=nscogsrc CFLAGS="-g $OPT -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DDEBUGVM=0" LIBS="-lpthread -luuid"
../../../scripts/nukeversion
rm -rf ../../../nsvmlinux
# would prefer make install prefix=`readlink -f \`pwd\`/../../../nsvmlinux`
Modified: branches/Cog/unixbuild/bld/mvm
===================================================================
--- branches/Cog/unixbuild/bld/mvm 2012-01-20 23:46:37 UTC (rev 2526)
+++ branches/Cog/unixbuild/bld/mvm 2012-01-23 19:01:42 UTC (rev 2527)
@@ -1,5 +1,11 @@
#!/bin/sh
-test -f config.h || ../../platforms/unix/config/configure --without-vm-display-fbdev --without-npsqueak CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -DDEBUGVM=0" LIBS=-lpthread
+# Some gcc versions create a broken VM using -O2
+case `gcc -v 2>&1 | grep version | sed 's/gcc version *//'` in
+3.4.*) OPT=-O1;;
+*) OPT=-O2;;
+esac
+
+test -f config.h || ../../platforms/unix/config/configure --without-vm-display-fbdev --without-npsqueak CFLAGS="-g $OPT -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -DDEBUGVM=0" LIBS=-lpthread
../../scripts/nukeversion
rm -rf ../../coglinux
make install prefix=`readlink -f \`pwd\`/../../coglinux`
Modified: branches/Cog/unixbuild/mtbld/mvm
===================================================================
--- branches/Cog/unixbuild/mtbld/mvm 2012-01-20 23:46:37 UTC (rev 2526)
+++ branches/Cog/unixbuild/mtbld/mvm 2012-01-23 19:01:42 UTC (rev 2527)
@@ -1,5 +1,11 @@
#!/bin/sh
-test -f config.h || ../../platforms/unix/config/configure INTERP=cointerpmt --without-vm-display-fbdev --without-npsqueak CFLAGS="-g -O2 -msse2 -DNDEBUG -DCOGMTVM=1 -DDEBUGVM=0 -D_GNU_SOURCE -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1" LIBS=-lpthread
+# Some gcc versions create a broken VM using -O2
+case `gcc -v 2>&1 | grep version | sed 's/gcc version *//'` in
+3.4.*) OPT=-O1;;
+*) OPT=-O2;;
+esac
+
+test -f config.h || ../../platforms/unix/config/configure INTERP=cointerpmt --without-vm-display-fbdev --without-npsqueak CFLAGS="-g $OPT -msse2 -DNDEBUG -DCOGMTVM=1 -DDEBUGVM=0 -D_GNU_SOURCE -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1" LIBS=-lpthread
../../scripts/nukeversion
rm -rf ../../cogmtlinux
make install prefix=`readlink -f \`pwd\`/../../cogmtlinux`
More information about the Vm-dev
mailing list