[SerialICE] New patch to review for serialice: d362bbc Do not build without compatible LUA
Kyösti Mälkki (kyosti.malkki@gmail.com)
gerrit at coreboot.org
Sat Mar 16 12:51:08 CET 2013
Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2772
-gerrit
commit d362bbceedc33c5895840977149546703279f5aa
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date: Sat Mar 16 13:12:01 2013 +0200
Do not build without compatible LUA
The pre-built LUA library for 32-bit distro is most likely built
with the type of LUA_INTEGER having essentially range of signed
32 bit integer. SerialICE requires range of 32bit unsigned, so
do not even begin the build if that is not satisfied.
Change-Id: Icb93d0126aac5e6e6aaa49cb04a2ebb6077389f1
Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
qemu-0.15.x/build.sh | 5 ++++-
qemu-0.15.x/configure | 19 ++++++++++++++++++-
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/qemu-0.15.x/build.sh b/qemu-0.15.x/build.sh
index 34b564c..2d8ec98 100644
--- a/qemu-0.15.x/build.sh
+++ b/qemu-0.15.x/build.sh
@@ -2,4 +2,7 @@
./configure --disable-kvm --disable-sdl --enable-serialice \
--target-list="x86_64-softmmu, i386-softmmu"
-make
+if [ $? -eq 0 ]; then
+ make
+fi
+
diff --git a/qemu-0.15.x/configure b/qemu-0.15.x/configure
index 5eed581..5bb082f 100755
--- a/qemu-0.15.x/configure
+++ b/qemu-0.15.x/configure
@@ -1763,7 +1763,24 @@ EOF
echo
exit 1
fi
- serialice=yes
+
+# Test if lua-5.2.x-intsize.patch has been applied. On a 32-bit host system
+# LUA_INTEGER is a signed 32 bit integer and not enough for our needs.
+ cat > $TMPC << EOF
+#include <lua.h>
+int main(void) { LUA_INTEGER a = (unsigned long int)1<<31; if (a<0) return -1; else return 0; }
+EOF
+
+ if compile_prog "$lua_cflags" "$lua_ldflags" && $TMPE > /dev/null 2> /dev/null ; then
+ serialice=yes
+ else
+ echo
+ echo "Error Found LUA but it needs patch to handle 32 bit unsigned integers"
+ echo "correctly. Can't build with SerialICE support."
+ echo
+ exit 1
+ fi
+
libs_softmmu="$lua_ldflags $libs_softmmu"
fi # test "$serialice"
More information about the SerialICE
mailing list