From e85fb580c88d5423702272ecc93856ed86c1eef6 Mon Sep 17 00:00:00 2001 From: Dmitriy Ivanov Date: Wed, 28 Oct 2015 17:24:43 -0700 Subject: [PATCH] Fix LDFLAGS for arm and x86 Change-Id: I5366f4499cb4da3a51b8484ab3e4ff785f0888ab --- libc/Android.mk | 20 ++++++++++---------- libc/libc.arm.map | 3 --- libc/libc.arm64.map | 3 --- libc/libc.mips.map | 3 --- libc/libc.mips64.map | 3 --- libc/libc.x86.map | 3 --- libc/libc.x86_64.map | 3 --- libm/Android.mk | 12 ++++++------ 8 files changed, 16 insertions(+), 34 deletions(-) diff --git a/libc/Android.mk b/libc/Android.mk index 3d06ea7c4..2ea96d44b 100644 --- a/libc/Android.mk +++ b/libc/Android.mk @@ -1417,13 +1417,17 @@ endif LOCAL_CXX_STL := none LOCAL_SYSTEM_SHARED_LIBRARIES := +# TODO: This is to work around b/24465209. Remove after root cause is fixed +LOCAL_LDFLAGS_arm := -Wl,--hash-style=both +LOCAL_LDFLAGS_x86 := -Wl,--hash-style=both + # Don't re-export new/delete and friends, even if the compiler really wants to. -LOCAL_LDFLAGS_arm := -Wl,--version-script,$(LOCAL_PATH)/libc.arm.map -LOCAL_LDFLAGS_arm64 := -Wl,--version-script,$(LOCAL_PATH)/libc.arm64.map -LOCAL_LDFLAGS_mips := -Wl,--version-script,$(LOCAL_PATH)/libc.mips.map -LOCAL_LDFLAGS_mips64 := -Wl,--version-script,$(LOCAL_PATH)/libc.mips64.map -LOCAL_LDFLAGS_x86 := -Wl,--version-script,$(LOCAL_PATH)/libc.x86.map -LOCAL_LDFLAGS_x86_64 := -Wl,--version-script,$(LOCAL_PATH)/libc.x86_64.map +LOCAL_LDFLAGS_arm += -Wl,--version-script,$(LOCAL_PATH)/libc.arm.map +LOCAL_LDFLAGS_arm64 += -Wl,--version-script,$(LOCAL_PATH)/libc.arm64.map +LOCAL_LDFLAGS_mips += -Wl,--version-script,$(LOCAL_PATH)/libc.mips.map +LOCAL_LDFLAGS_mips64 += -Wl,--version-script,$(LOCAL_PATH)/libc.mips64.map +LOCAL_LDFLAGS_x86 += -Wl,--version-script,$(LOCAL_PATH)/libc.x86.map +LOCAL_LDFLAGS_x86_64 += -Wl,--version-script,$(LOCAL_PATH)/libc.x86_64.map # We'd really like to do this for all architectures, but since this wasn't done # before, these symbols must continue to be exported on LP32 for binary @@ -1434,10 +1438,6 @@ LOCAL_LDFLAGS_64 := -Wl,--exclude-libs,libgcc.a # prevent the build system from using this flag. LOCAL_NO_EXCLUDE_LIBS := true -# TODO: This is to work around b/24465209. Remove after root cause is fixed -LOCAL_LDFLAGS_arm := -Wl,--hash-style=both -LOCAL_LDFLAGS_x86 := -Wl,--hash-style=both - $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_dynamic_src_files)) diff --git a/libc/libc.arm.map b/libc/libc.arm.map index ae9dc3d2d..fce04ee1e 100644 --- a/libc/libc.arm.map +++ b/libc/libc.arm.map @@ -385,7 +385,6 @@ LIBC { endmntent; endpwent; endservent; - endusershell; endutent; environ; epoll_create; @@ -576,7 +575,6 @@ LIBC { gettid; gettimeofday; getuid; - getusershell; getutent; getwc; getwchar; @@ -1024,7 +1022,6 @@ LIBC { setstate; settimeofday; setuid; - setusershell; setutent; setvbuf; setxattr; diff --git a/libc/libc.arm64.map b/libc/libc.arm64.map index a36a57f79..a58b757a6 100644 --- a/libc/libc.arm64.map +++ b/libc/libc.arm64.map @@ -243,7 +243,6 @@ LIBC { endmntent; endpwent; endservent; - endusershell; endutent; environ; epoll_create; @@ -428,7 +427,6 @@ LIBC { gettid; gettimeofday; getuid; - getusershell; getutent; getwc; getwchar; @@ -881,7 +879,6 @@ LIBC { setstate; settimeofday; setuid; - setusershell; setutent; setvbuf; setxattr; diff --git a/libc/libc.mips.map b/libc/libc.mips.map index 01309ccb7..e71d5ec36 100644 --- a/libc/libc.mips.map +++ b/libc/libc.mips.map @@ -349,7 +349,6 @@ LIBC { endmntent; endpwent; endservent; - endusershell; endutent; environ; epoll_create; @@ -540,7 +539,6 @@ LIBC { gettid; gettimeofday; getuid; - getusershell; getutent; getwc; getwchar; @@ -987,7 +985,6 @@ LIBC { setstate; settimeofday; setuid; - setusershell; setutent; setvbuf; setxattr; diff --git a/libc/libc.mips64.map b/libc/libc.mips64.map index a36a57f79..a58b757a6 100644 --- a/libc/libc.mips64.map +++ b/libc/libc.mips64.map @@ -243,7 +243,6 @@ LIBC { endmntent; endpwent; endservent; - endusershell; endutent; environ; epoll_create; @@ -428,7 +427,6 @@ LIBC { gettid; gettimeofday; getuid; - getusershell; getutent; getwc; getwchar; @@ -881,7 +879,6 @@ LIBC { setstate; settimeofday; setuid; - setusershell; setutent; setvbuf; setxattr; diff --git a/libc/libc.x86.map b/libc/libc.x86.map index 624a18bbe..6f6052474 100644 --- a/libc/libc.x86.map +++ b/libc/libc.x86.map @@ -347,7 +347,6 @@ LIBC { endmntent; endpwent; endservent; - endusershell; endutent; environ; epoll_create; @@ -538,7 +537,6 @@ LIBC { gettid; gettimeofday; getuid; - getusershell; getutent; getwc; getwchar; @@ -985,7 +983,6 @@ LIBC { setstate; settimeofday; setuid; - setusershell; setutent; setvbuf; setxattr; diff --git a/libc/libc.x86_64.map b/libc/libc.x86_64.map index a36a57f79..a58b757a6 100644 --- a/libc/libc.x86_64.map +++ b/libc/libc.x86_64.map @@ -243,7 +243,6 @@ LIBC { endmntent; endpwent; endservent; - endusershell; endutent; environ; epoll_create; @@ -428,7 +427,6 @@ LIBC { gettid; gettimeofday; getuid; - getusershell; getutent; getwc; getwchar; @@ -881,7 +879,6 @@ LIBC { setstate; settimeofday; setuid; - setusershell; setutent; setvbuf; setxattr; diff --git a/libm/Android.mk b/libm/Android.mk index e9ed523fe..bd51e7cbf 100644 --- a/libm/Android.mk +++ b/libm/Android.mk @@ -525,12 +525,12 @@ LOCAL_ADDITIONAL_DEPENDENCIES := \ LOCAL_LDFLAGS_arm := -Wl,--hash-style=both LOCAL_LDFLAGS_x86 := -Wl,--hash-style=both -LOCAL_LDFLAGS_arm := -Wl,--version-script,$(LOCAL_PATH)/libm.arm.map -LOCAL_LDFLAGS_arm64 := -Wl,--version-script,$(LOCAL_PATH)/libm.arm64.map -LOCAL_LDFLAGS_mips := -Wl,--version-script,$(LOCAL_PATH)/libm.mips.map -LOCAL_LDFLAGS_mips64 := -Wl,--version-script,$(LOCAL_PATH)/libm.mips64.map -LOCAL_LDFLAGS_x86 := -Wl,--version-script,$(LOCAL_PATH)/libm.x86.map -LOCAL_LDFLAGS_x86_64 := -Wl,--version-script,$(LOCAL_PATH)/libm.x86_64.map +LOCAL_LDFLAGS_arm += -Wl,--version-script,$(LOCAL_PATH)/libm.arm.map +LOCAL_LDFLAGS_arm64 += -Wl,--version-script,$(LOCAL_PATH)/libm.arm64.map +LOCAL_LDFLAGS_mips += -Wl,--version-script,$(LOCAL_PATH)/libm.mips.map +LOCAL_LDFLAGS_mips64 += -Wl,--version-script,$(LOCAL_PATH)/libm.mips64.map +LOCAL_LDFLAGS_x86 += -Wl,--version-script,$(LOCAL_PATH)/libm.x86.map +LOCAL_LDFLAGS_x86_64 += -Wl,--version-script,$(LOCAL_PATH)/libm.x86_64.map LOCAL_MODULE := libm -- 2.11.0