From 7065b7cb6223a3b661c02abe752188540646ca1c Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Mon, 11 Jul 2016 15:16:56 +0200 Subject: [PATCH] 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 | 5 +++-- old-configure.in | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/build/autoconf/android.m4 b/build/autoconf/android.m4 index e4c0ec84c74f..de8ed83b7a23 100644 --- a/build/autoconf/android.m4 +++ b/build/autoconf/android.m4 @@ -69,11 +69,12 @@ case "$target" in 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) diff --git a/old-configure.in b/old-configure.in index f5ae8d3d4b74..8b2cbdd22e1d 100644 --- a/old-configure.in +++ b/old-configure.in @@ -171,8 +171,6 @@ if test -n "$gonkdir"; then 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)