Bug 1280600: Cleanup Android linker flags and libraries, r=glandium
authorThomas Zimmermann <tdz@users.sourceforge.net>
Mon, 11 Jul 2016 15:16:56 +0200
changeset 304465 ee3287e048f40405410d9faf136a94a87b2a6dae
parent 304464 abb6ae66b2be5f470839f89e4db81cc2620ac455
child 304466 fea9d890076e475d715c041deee14e51c1f3238d
push id79332
push usertdz@users.sourceforge.net
push dateMon, 11 Jul 2016 13:17:13 +0000
treeherdermozilla-inbound@67352c9ced46 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1280600
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1280600: Cleanup Android linker flags and libraries, r=glandium Android and b2g have duplicated linker flags and libraries. This patch removes the duplicates from b2g scripts. The library 'log' is now listed in the correct variable 'LIBS'. MozReview-Commit-ID: EtVzZpoXkdK
build/autoconf/android.m4
old-configure.in
--- a/build/autoconf/android.m4
+++ b/build/autoconf/android.m4
@@ -64,21 +64,22 @@ case "$target" in
         AC_MSG_ERROR([not found. Please check your NDK. With the current configuration, it should be in $android_platform])
     fi
 
     CPPFLAGS="-idirafter $android_platform/usr/include $CPPFLAGS"
     CFLAGS="-fno-short-enums -fno-exceptions $CFLAGS"
     CXXFLAGS="-fno-short-enums -fno-exceptions $CXXFLAGS"
     ASFLAGS="-idirafter $android_platform/usr/include -DANDROID $ASFLAGS"
 
-    dnl Add -llog by default, since we use it all over the place.
     dnl Add --allow-shlib-undefined, because libGLESv2 links to an
     dnl undefined symbol (present on the hardware, just not in the
     dnl NDK.)
-    LDFLAGS="-L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform -llog -Wl,--allow-shlib-undefined $LDFLAGS"
+    LDFLAGS="-L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform -Wl,--allow-shlib-undefined $LDFLAGS"
+    dnl Add -llog by default, since we use it all over the place.
+    LIBS="-llog $LIBS"
     ANDROID_PLATFORM="${android_platform}"
 
     AC_DEFINE(ANDROID)
     AC_SUBST(ANDROID_PLATFORM)
 
     ;;
 esac
 
--- a/old-configure.in
+++ b/old-configure.in
@@ -166,18 +166,16 @@ if test -n "$gonkdir"; then
     fi
     if test -d "$gonkdir/external/bluetooth/bluez"; then
         MOZ_B2G_BT=1
         MOZ_B2G_BT_BLUEZ=1
     fi
 
     CPPFLAGS="-I$gonkdir/system -I$gonkdir/system/core/include -I$gonkdir/hardware/libhardware/include -I$gonkdir/external/valgrind/fxos-include $CPPFLAGS"
     LDFLAGS="-L$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib -Wl,-rpath-link=$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib $LDFLAGS"
-    dnl Add -llog by default, since we use it all over the place.
-    LIBS="$LIBS -llog"
 
     AC_DEFINE(ANDROID)
     AC_DEFINE_UNQUOTED(ANDROID_VERSION, $android_version)
     AC_DEFINE(HAVE_SYS_UIO_H)
     AC_DEFINE(HAVE_PTHREADS)
 
     dnl ANDROID_VERSION is only required for the AC_SUBST below
     ANDROID_VERSION=$android_version