bug 577531 - Fix non-thumb2 builds on Android, cleanup CFLAGS r=ted a=dougt

This commit is contained in:
Brad Lassey 2010-08-24 02:10:12 -04:00
parent f2351c161e
commit 3be078fd8a
2 changed files with 22 additions and 2 deletions

View File

@ -301,8 +301,8 @@ if test "$target" = "arm-android-eabi" ; then
STRIP="$android_toolchain"/bin/arm-eabi-strip STRIP="$android_toolchain"/bin/arm-eabi-strip
CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS" CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS"
CFLAGS="-mandroid -I$android_platform/usr/include -msoft-float -fno-short-enums -fno-exceptions -march=armv5te -mthumb-interwork $CFLAGS" CFLAGS="-mandroid -I$android_platform/usr/include -msoft-float -fno-short-enums -fno-exceptions $CFLAGS"
CXXFLAGS="-mandroid -I$android_platform/usr/include -msoft-float -fno-short-enums -fno-exceptions -march=armv5te -mthumb-interwork $CXXFLAGS" CXXFLAGS="-mandroid -I$android_platform/usr/include -msoft-float -fno-short-enums -fno-exceptions $CXXFLAGS"
dnl Add -llog by default, since we use it all over the place. dnl Add -llog by default, since we use it all over the place.
dnl Add --allow-shlib-undefined, because libGLESv2 links to an dnl Add --allow-shlib-undefined, because libGLESv2 links to an
@ -7114,6 +7114,16 @@ if test -n "$MOZ_THUMB2"; then
AC_MSG_ERROR([--enable-thumb2 is not supported for non-ARM CPU architectures]) AC_MSG_ERROR([--enable-thumb2 is not supported for non-ARM CPU architectures])
;; ;;
esac esac
else
case "$target_cpu" in
arm*)
if test "$GNU_CC"; then
CFLAGS="$CFLAGS -march=armv5te -mthumb-interwork -Wa, -march=armv5te -Wa, -mthumb-interwork"
CXXFLAGS="$CXXFLAGS -march=armv5te -mthumb-interwork -Wa, -march=armv5te -Wa, -mthumb-interwork"
ASFLAGS="$ASFLAGS -march=armv5te -mthumb-interwork"
fi
;;
esac
fi fi
AC_SUBST(MOZ_THUMB2) AC_SUBST(MOZ_THUMB2)

View File

@ -4649,6 +4649,16 @@ if test -n "$MOZ_THUMB2"; then
AC_MSG_ERROR([--enable-thumb2 is not supported for non-ARM CPU architectures]) AC_MSG_ERROR([--enable-thumb2 is not supported for non-ARM CPU architectures])
;; ;;
esac esac
else
case "$target_cpu" in
arm*)
if test "$GNU_CC"; then
CFLAGS="$CFLAGS -march=armv5te -mthumb-interwork -Wa, -march=armv5te -Wa, -mthumb-interwork"
CXXFLAGS="$CXXFLAGS -march=armv5te -mthumb-interwork -Wa, -march=armv5te -Wa, -mthumb-interwork"
ASFLAGS="$ASFLAGS -march=armv5te -mthumb-interwork"
fi
;;
esac
fi fi
AC_SUBST(MOZ_THUMB2) AC_SUBST(MOZ_THUMB2)