Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8311d57e authored by Dan Albert's avatar Dan Albert Committed by Android (Google) Code Review
Browse files

Merge "Fix uses of -fPIC and -fPIE." into lmp-dev

parents ec02094d 908ab54f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -113,6 +113,12 @@ my_cxx := $(LOCAL_CXX)
my_c_includes := $(LOCAL_C_INCLUDES)
my_generated_sources := $(LOCAL_GENERATED_SOURCES)

ifeq ($(LOCAL_MODULE_CLASS),EXECUTABLES)
my_cflags += -fpie
else
my_cflags += -fPIC
endif

my_src_files += $(LOCAL_SRC_FILES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_SRC_FILES_$(my_32_64_bit_suffix))
my_shared_libraries += $(LOCAL_SHARED_LIBRARIES_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_SHARED_LIBRARIES_$(my_32_64_bit_suffix))
my_cflags += $(LOCAL_CFLAGS_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_CFLAGS_$(my_32_64_bit_suffix))
+2 −2
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ endif
android_config_h := $(call select-android-config-h,linux-arm)

$(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += \
			-msoft-float -fpic -fPIE \
			-msoft-float \
			-ffunction-sections \
			-fdata-sections \
			-funwind-tables \
@@ -218,7 +218,7 @@ $(hide) $(PRIVATE_CXX) \
endef

define $(combo_2nd_arch_prefix)transform-o-to-executable-inner
$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -fPIE -pie \
$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -pie \
	-Wl,-dynamic-linker,/system/bin/linker \
	-Wl,--gc-sections \
	-Wl,-z,nocopyreloc \
+1 −2
Original line number Diff line number Diff line
@@ -73,7 +73,6 @@ TARGET_GLOBAL_CFLAGS += \
android_config_h := $(call select-android-config-h,linux-arm64)

TARGET_GLOBAL_CFLAGS += \
			-fpic -fPIE \
			-fstack-protector \
			-ffunction-sections \
			-fdata-sections \
@@ -185,7 +184,7 @@ $(hide) $(PRIVATE_CXX) \
endef

define transform-o-to-executable-inner
$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -fPIE -pie \
$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -pie \
	-Wl,-dynamic-linker,/system/bin/linker64 \
	-Wl,--gc-sections \
	-Wl,-z,nocopyreloc \
+1 −2
Original line number Diff line number Diff line
@@ -84,7 +84,6 @@ android_config_h := $(call select-android-config-h,linux-mips)
$(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += \
			$(TARGET_mips_CFLAGS) \
			-U__unix -U__unix__ -Umips \
			-fpic -fPIE\
			-ffunction-sections \
			-fdata-sections \
			-funwind-tables \
@@ -191,7 +190,7 @@ $(hide) $(PRIVATE_CXX) \
endef

define $(combo_2nd_arch_prefix)transform-o-to-executable-inner
$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -fPIE -pie \
$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -pie \
	-Wl,-dynamic-linker,/system/bin/linker \
	-Wl,--gc-sections \
	-Wl,-z,nocopyreloc \
+1 −2
Original line number Diff line number Diff line
@@ -84,7 +84,6 @@ android_config_h := $(call select-android-config-h,linux-mips64)
TARGET_GLOBAL_CFLAGS += \
			$(TARGET_mips_CFLAGS) \
			-U__unix -U__unix__ -Umips \
			-fpic -fPIE\
			-ffunction-sections \
			-fdata-sections \
			-funwind-tables \
@@ -195,7 +194,7 @@ $(hide) $(PRIVATE_CXX) \
endef

define transform-o-to-executable-inner
$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -fPIE -pie \
$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -pie \
	-Wl,-dynamic-linker,/system/bin/linker64 \
	-Wl,--gc-sections \
	-Wl,-z,nocopyreloc \
Loading