aboutsummaryrefslogtreecommitdiffstats
path: root/android-configure.sh
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2010-03-08 18:33:50 -0800
committerDavid 'Digit' Turner <digit@google.com>2010-03-08 18:33:50 -0800
commitab873b750621bca7eef41869c685dec8c363333a (patch)
tree94ea3d5e4634e4346280be35cd8ed80414a1b614 /android-configure.sh
parent9a0f1fba0cacee05513653a553052e97e475b51c (diff)
downloadexternal_qemu-ab873b750621bca7eef41869c685dec8c363333a.zip
external_qemu-ab873b750621bca7eef41869c685dec8c363333a.tar.gz
external_qemu-ab873b750621bca7eef41869c685dec8c363333a.tar.bz2
Add --static option to android-configure.sh in order to build static emulator executable.
This is needed to run the emulator in restricted environment where libX11.so and even libstdc++.so are not available. Only tested on Linux. The resulting binary will not start unless you use -no-window. Also don't expect any audio output working. Change-Id: Ia736898cd3ae6eb928614a00a1a3e18cc8086a5c
Diffstat (limited to 'android-configure.sh')
-rwxr-xr-xandroid-configure.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/android-configure.sh b/android-configure.sh
index 742fe21..045e56d 100755
--- a/android-configure.sh
+++ b/android-configure.sh
@@ -28,6 +28,7 @@ OPTION_NO_PREBUILTS=no
OPTION_TRY_64=no
OPTION_HELP=no
OPTION_DEBUG=no
+OPTION_STATIC=no
if [ -z "$CC" ] ; then
CC=gcc
@@ -63,6 +64,8 @@ for opt do
;;
--try-64) OPTION_TRY_64=yes
;;
+ --static) OPTION_STATIC=yes
+ ;;
*)
echo "unknown option '$opt', use --help"
exit 1
@@ -87,6 +90,7 @@ EOF
echo " --ignore-audio ignore audio messages (may build sound-less emulator)"
echo " --no-prebuilts do not use prebuilt libraries and compiler"
echo " --try-64 try to build a 64-bit executable (may crash)"
+ echo " --static build a completely static executable"
echo " --verbose verbose configuration"
echo " --debug build debug version of the emulator"
echo ""
@@ -394,6 +398,10 @@ echo "BUILD_STANDALONE_EMULATOR := true" >> $config_mk
if [ $OPTION_DEBUG = yes ] ; then
echo "BUILD_DEBUG_EMULATOR := true" >> $config_mk
fi
+if [ $OPTION_STATIC = yes ] ; then
+ echo "CONFIG_STATIC_EXECUTABLE := true" >> $config_mk
+fi
+
if [ -n "$ANDROID_SDK_TOOLS_REVISION" ] ; then
echo "ANDROID_SDK_TOOLS_REVISION := $ANDROID_SDK_TOOLS_REVISION" >> $config_mk
fi
@@ -443,6 +451,11 @@ case "$OS" in
*) CONFIG_OS=$OS
esac
+if [ "$OPTION_STATIC" = "yes" ] ; then
+ echo "CONFIG_STATIC_EXECUTABLE := true" >> $config_mk
+ echo "#define CONFIG_STATIC_EXECUTABLE 1" >> $config_h
+fi
+
case $OS in
linux-*|darwin-*)
echo "#define HAVE_IOVEC 1" >> $config_h