From 8308f506ceb48ec9c877307975b51c24664a5e42 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Wed, 18 May 2016 12:50:53 -0700 Subject: [PATCH] Remove (TARGET|HOST)_NO_UNDEFINED_LDFLAGS We never use it for host modules, and all the target configurations use the same linker argument. This matches Soong. Change-Id: Ibcba9a4ce340c7a12306d1fee620a04027c0e292 --- core/binary.mk | 2 +- core/combo/HOST_darwin-x86.mk | 1 - core/combo/HOST_darwin-x86_64.mk | 1 - core/combo/HOST_linux-x86.mk | 2 -- core/combo/HOST_linux-x86_64.mk | 2 -- core/combo/TARGET_linux-arm.mk | 2 -- core/combo/TARGET_linux-arm64.mk | 2 -- core/combo/TARGET_linux-mips.mk | 2 -- core/combo/TARGET_linux-mips64.mk | 2 -- core/combo/TARGET_linux-x86.mk | 2 -- core/combo/TARGET_linux-x86_64.mk | 2 -- 11 files changed, 1 insertion(+), 19 deletions(-) diff --git a/core/binary.mk b/core/binary.mk index ca589bf90..1ef55b3a6 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -493,7 +493,7 @@ endif # up if --no-undefined is passed to the linker. ifeq ($(strip $(LOCAL_NO_DEFAULT_COMPILER_FLAGS)),) ifeq ($(my_allow_undefined_symbols),) - my_ldflags += $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)NO_UNDEFINED_LDFLAGS) + my_ldflags += -Wl,--no-undefined endif endif diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk index 575a45557..f6200436d 100644 --- a/core/combo/HOST_darwin-x86.mk +++ b/core/combo/HOST_darwin-x86.mk @@ -39,7 +39,6 @@ $(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -isysroot $(mac_sdk_root) -mmacosx $(combo_2nd_arch_prefix)HOST_GLOBAL_LDFLAGS += -isysroot $(mac_sdk_root) -Wl,-syslibroot,$(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version) $(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -fPIC -funwind-tables -$(combo_2nd_arch_prefix)HOST_NO_UNDEFINED_LDFLAGS := -Wl,-undefined,error $(combo_2nd_arch_prefix)HOST_SHLIB_SUFFIX := .dylib $(combo_2nd_arch_prefix)HOST_JNILIB_SUFFIX := .jnilib diff --git a/core/combo/HOST_darwin-x86_64.mk b/core/combo/HOST_darwin-x86_64.mk index 6531e38af..f2d47be2b 100644 --- a/core/combo/HOST_darwin-x86_64.mk +++ b/core/combo/HOST_darwin-x86_64.mk @@ -39,7 +39,6 @@ HOST_GLOBAL_CFLAGS += -isysroot $(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_v HOST_GLOBAL_LDFLAGS += -isysroot $(mac_sdk_root) -Wl,-syslibroot,$(mac_sdk_root) -mmacosx-version-min=$(mac_sdk_version) HOST_GLOBAL_CFLAGS += -fPIC -funwind-tables -HOST_NO_UNDEFINED_LDFLAGS := -Wl,-undefined,error HOST_SHLIB_SUFFIX := .dylib HOST_JNILIB_SUFFIX := .jnilib diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk index 48ed0ba4c..2213cd34b 100644 --- a/core/combo/HOST_linux-x86.mk +++ b/core/combo/HOST_linux-x86.mk @@ -46,8 +46,6 @@ $(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -D__STDC_FORMAT_MACROS -D__STDC_CO # both 32- and 64-bit (whether art uses them or not --- 9d59f417767991246848c3e101cb27d2dfea5988). $(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -$(combo_2nd_arch_prefix)HOST_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined - ############################################################ ## Macros after this line are shared by the 64-bit config. diff --git a/core/combo/HOST_linux-x86_64.mk b/core/combo/HOST_linux-x86_64.mk index faa723805..ccd2239c4 100644 --- a/core/combo/HOST_linux-x86_64.mk +++ b/core/combo/HOST_linux-x86_64.mk @@ -40,5 +40,3 @@ HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector # Workaround differences in inttypes.h between host and target. # See bug 12708004. HOST_GLOBAL_CFLAGS += -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS - -HOST_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk index dee04e0ae..0233cc4e3 100644 --- a/core/combo/TARGET_linux-arm.mk +++ b/core/combo/TARGET_linux-arm.mk @@ -52,8 +52,6 @@ define $(combo_var_prefix)transform-shared-lib-to-toc $(call _gen_toc_command_for_elf,$(1),$(2)) endef -$(combo_2nd_arch_prefix)TARGET_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined - $(combo_2nd_arch_prefix)TARGET_arm_CFLAGS := -O2 \ -fomit-frame-pointer \ -fstrict-aliasing \ diff --git a/core/combo/TARGET_linux-arm64.mk b/core/combo/TARGET_linux-arm64.mk index 4ff921b60..f3b297962 100644 --- a/core/combo/TARGET_linux-arm64.mk +++ b/core/combo/TARGET_linux-arm64.mk @@ -52,8 +52,6 @@ define $(combo_var_prefix)transform-shared-lib-to-toc $(call _gen_toc_command_for_elf,$(1),$(2)) endef -TARGET_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined - TARGET_GLOBAL_CFLAGS += \ -fno-strict-aliasing \ diff --git a/core/combo/TARGET_linux-mips.mk b/core/combo/TARGET_linux-mips.mk index 4ce6b8188..017dcaa39 100644 --- a/core/combo/TARGET_linux-mips.mk +++ b/core/combo/TARGET_linux-mips.mk @@ -52,8 +52,6 @@ define $(combo_var_prefix)transform-shared-lib-to-toc $(call _gen_toc_command_for_elf,$(1),$(2)) endef -$(combo_2nd_arch_prefix)TARGET_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined - TARGET_mips_CFLAGS := -O2 \ -fomit-frame-pointer \ -fno-strict-aliasing \ diff --git a/core/combo/TARGET_linux-mips64.mk b/core/combo/TARGET_linux-mips64.mk index 6683b5d98..94380f3b3 100644 --- a/core/combo/TARGET_linux-mips64.mk +++ b/core/combo/TARGET_linux-mips64.mk @@ -52,8 +52,6 @@ define $(combo_var_prefix)transform-shared-lib-to-toc $(call _gen_toc_command_for_elf,$(1),$(2)) endef -TARGET_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined - TARGET_mips_CFLAGS := -O2 \ -fomit-frame-pointer \ -fno-strict-aliasing \ diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk index aaa39b721..aa92198a8 100644 --- a/core/combo/TARGET_linux-x86.mk +++ b/core/combo/TARGET_linux-x86.mk @@ -45,8 +45,6 @@ define $(combo_var_prefix)transform-shared-lib-to-toc $(call _gen_toc_command_for_elf,$(1),$(2)) endef -$(combo_2nd_arch_prefix)TARGET_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined - libc_root := bionic/libc KERNEL_HEADERS_COMMON := $(libc_root)/kernel/uapi diff --git a/core/combo/TARGET_linux-x86_64.mk b/core/combo/TARGET_linux-x86_64.mk index b26a0ab18..3f204528c 100644 --- a/core/combo/TARGET_linux-x86_64.mk +++ b/core/combo/TARGET_linux-x86_64.mk @@ -45,8 +45,6 @@ define $(combo_var_prefix)transform-shared-lib-to-toc $(call _gen_toc_command_for_elf,$(1),$(2)) endef -TARGET_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined - libc_root := bionic/libc KERNEL_HEADERS_COMMON := $(libc_root)/kernel/uapi