scripts/rebuild.sh: Fix Darwin remote build. This fix the Darwin remote build in two ways: - Pass the proper target list as a parameter to the remote build script. - Use proper compiler flags to ensure the build targets OS X 10.8. Otherwise, the i386 QEMU build fails at link time, due to missing __stret_sincos().
diff --git a/scripts/rebuild.sh b/scripts/rebuild.sh index 3e1e33d..75c32ac 100755 --- a/scripts/rebuild.sh +++ b/scripts/rebuild.sh
@@ -788,11 +788,17 @@ if [ "$GNU_CONFIG_HOST_PREFIX" ]; then CROSS_PREFIX_FLAG="--cross-prefix=$GNU_CONFIG_HOST_PREFIX" fi + EXTRA_CFLAGS="-I$PREFIX/include" + case $1 in + darwin-*) + EXTRA_CFLAGS="$EXTRA_CFLAGS -mmacosx-version-min=10.8" + ;; + esac run $QEMU_ANDROID/configure \ $CROSS_PREFIX_FLAG \ --target-list="$QEMU_TARGET_LIST" \ --prefix=$PREFIX \ - --extra-cflags="-I$PREFIX/include" \ + --extra-cflags="$EXTRA_CFLAGS" \ --extra-ldflags="$EXTRA_LDFLAGS" \ --disable-attr \ --disable-blobs \ @@ -902,6 +908,7 @@ \$PROGDIR/scripts/rebuild.sh \\ --build-dir=/tmp/$PKG_SUFFIX/build \\ --system=$(spaces_to_commas "$DARWIN_SYSTEMS") \\ + --target=$(spaces_to_commas "$TARGETS") \\ $EXTRA_FLAGS \\ /tmp/$PKG_SUFFIX/qemu-android \\ /tmp/$PKG_SUFFIX/aosp