Commit 514cfe78 authored by alex@thinkpad's avatar alex@thinkpad
Browse files

QEMU install: python2 still required for compiling QEMU

Ubuntu: available as "python2" on newer distros, or "python" on older ones...
Mac: not available in Brew, but already installed by Apple
Some systems no longer have "python" pointing to "python2" (fixed in configure_eos.sh)

--HG--
branch : qemu
parent 677dfe399ac8
......@@ -273,6 +273,12 @@ if [ -n "$(lsb_release -i 2>/dev/null | grep Ubuntu)" ]; then
libgtk2.0-dev xz-utils mtools netcat-openbsd
python3 python3-pip python3-docutils"
if [ -n $(apt-cache search --names-only '^python2$') ]; then
packages="$packages python2"
else
packages="$packages python"
fi
# if a valid arm-none-eabi-gcc/gdb is already in PATH, try to use that
# otherwise, we'll try to install something
if ! valid_arm_gdb || ! valid_arm_gcc; then
......
......@@ -2,11 +2,17 @@
SYSTEM=`uname`
echo "Setting up QEMU on $SYSTEM..."
OPTIONS="--target-list=arm-softmmu --disable-docs --enable-vnc"
if python2 -V; then
OPTIONS="$OPTIONS --python=python2"
fi
if [[ $SYSTEM == "Darwin" ]]; then
# Mac uses clang and Cocoa by default; it doesn't like SDL
export CC=${CC:=clang}
GUI_FLAGS="--disable-sdl"
OPTIONS="$OPTIONS --disable-sdl"
else
# gcc 4 uses gnu90 by default, but we use C99 code
# passing C99 to g++ gives warning, but QEMU treats all warnings as errors
......@@ -15,7 +21,7 @@ else
if [[ $DISPLAY != "" ]]; then
# gtk is recommended, but sdl works too
GUI_FLAGS="--enable-gtk"
OPTIONS="$OPTIONS --enable-gtk"
fi
fi
......@@ -61,7 +67,6 @@ if [[ $CC == gcc* ]]; then
fi
echo "Using $CC $GCC_VERSION / $CXX $GPP_VERSION with flags: $EXTRA_CFLAGS"
echo "Options: $GUI_FLAGS $@"
echo "Options: $OPTIONS $@"
./configure --target-list=arm-softmmu --disable-docs --enable-vnc $GUI_FLAGS \
--extra-cflags="$EXTRA_CFLAGS" "$@"
./configure $OPTIONS --extra-cflags="$EXTRA_CFLAGS" "$@"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment