changeset 654:fa2498e3b3c9

Make a config option for the cross compiler smoke test. The problem is that recent kernel upgrades broke qemu-arm (application emulation, not system emulation), so it can't run anything unless you "echo 0 > /proc/sys/vm/mmap_min_addr" as root. Fun.
author Rob Landley <rob@landley.net>
date Thu, 26 Mar 2009 15:32:31 -0500
parents 0071f3c72d4c
children 62a727f52a18
files config cross-compiler.sh
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/config	Thu Mar 26 04:37:56 2009 -0500
+++ b/config	Thu Mar 26 15:32:31 2009 -0500
@@ -56,6 +56,12 @@
 
 # export HOST_BUILD_EXTRA=1
 
+# Use qemu to run "hello world" built by the cross compiler.  Note that
+# you need a working qemu application emulation to do this.  Specifically,
+# to unbreak arm you need to "echo 0 > /proc/sys/vm/mmap_min_addr" as root.
+
+# export CROSS_SMOKE_TEST=1
+
 # If this is set, try downloading packages from this location first.
 
 # export PREFERRED_MIRROR=http://impactlinux.com/fml/mirror
--- a/cross-compiler.sh	Thu Mar 26 04:37:56 2009 -0500
+++ b/cross-compiler.sh	Thu Mar 26 15:32:31 2009 -0500
@@ -150,7 +150,7 @@
 
 "${ARCH}-gcc" -Os "${SOURCES}/toys/hello.c" -o "$WORK"/hello &&
 "${ARCH}-gcc" -Os -static "${SOURCES}/toys/hello.c" -o "$WORK"/hello &&
-if which qemu-"${QEMU_TEST}" > /dev/null
+if [ ! -z "$CROSS_SMOKE_TEST" ] && which qemu-"${QEMU_TEST}" > /dev/null
 then
   [ x"$(qemu-"${QEMU_TEST}" "${WORK}"/hello)" == x"Hello world!" ] &&
   echo Cross-toolchain seems to work.