forked from openkylin/platform_build
Merge "Don't set -pie for windows modules"
This commit is contained in:
commit
a70669e4a5
|
@ -281,13 +281,18 @@ endif
|
|||
# all code is position independent, and then those warnings get promoted to
|
||||
# errors.
|
||||
ifneq ($(LOCAL_NO_PIC),true)
|
||||
ifneq ($($(my_prefix)OS),windows)
|
||||
ifneq ($(filter EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
|
||||
my_cflags += -fPIE
|
||||
else
|
||||
my_cflags += -fPIC
|
||||
endif
|
||||
endif
|
||||
ifneq ($($(my_prefix)OS),windows)
|
||||
ifneq ($(filter EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
|
||||
my_cflags += -fPIE
|
||||
ifndef BUILD_HOST_static
|
||||
ifneq ($(LOCAL_FORCE_STATIC_EXECUTABLE),true)
|
||||
my_ldflags += -pie
|
||||
endif
|
||||
endif
|
||||
else
|
||||
my_cflags += -fPIC
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef LOCAL_IS_HOST_MODULE
|
||||
|
|
|
@ -1879,11 +1879,6 @@ endef
|
|||
###########################################################
|
||||
## Commands for running gcc to link a host executable
|
||||
###########################################################
|
||||
ifdef BUILD_HOST_static
|
||||
HOST_FPIE_FLAGS :=
|
||||
else
|
||||
HOST_FPIE_FLAGS := -pie
|
||||
endif
|
||||
|
||||
ifneq ($(HOST_CUSTOM_LD_COMMAND),true)
|
||||
define transform-host-o-to-executable-inner
|
||||
|
|
|
@ -11,10 +11,6 @@ my_module_multilib := first
|
|||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(LOCAL_NO_FPIE),)
|
||||
LOCAL_LDFLAGS += $(HOST_FPIE_FLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(my_module_multilib),both)
|
||||
ifneq ($(LOCAL_MODULE_CLASS),NATIVE_TESTS)
|
||||
ifeq ($(LOCAL_MODULE_PATH_32)$(LOCAL_MODULE_STEM_32),)
|
||||
|
@ -63,10 +59,6 @@ LOCAL_BUILT_MODULE :=
|
|||
LOCAL_INSTALLED_MODULE :=
|
||||
LOCAL_INTERMEDIATE_TARGETS :=
|
||||
|
||||
ifeq ($(LOCAL_NO_FPIE),)
|
||||
LOCAL_LDFLAGS += $(HOST_CROSS_FPIE_FLAGS)
|
||||
endif
|
||||
|
||||
include $(BUILD_SYSTEM)/host_executable_internal.mk
|
||||
LOCAL_LDFLAGS := $(saved_LOCAL_LDFLAGS)
|
||||
LOCAL_BUILT_MODULE := $(saved_LOCAL_BUILT_MODULE)
|
||||
|
@ -85,10 +77,6 @@ LOCAL_BUILT_MODULE :=
|
|||
LOCAL_INSTALLED_MODULE :=
|
||||
LOCAL_INTERMEDIATE_TARGETS :=
|
||||
|
||||
ifeq ($(LOCAL_NO_FPIE),)
|
||||
LOCAL_LDFLAGS += $(HOST_CROSS_FPIE_FLAGS)
|
||||
endif
|
||||
|
||||
include $(BUILD_SYSTEM)/host_executable_internal.mk
|
||||
LOCAL_LDFLAGS := $(saved_LOCAL_LDFLAGS)
|
||||
LOCAL_BUILT_MODULE := $(saved_LOCAL_BUILT_MODULE)
|
||||
|
|
Loading…
Reference in New Issue