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

Commit 8b20d5b9 authored by Elliott Hughes's avatar Elliott Hughes Committed by Gerrit Code Review
Browse files

Merge "Turn 64-bit-related warnings into errors on 64-bit builds."

parents efb9603a 18042e19
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -78,6 +78,11 @@ TARGET_GLOBAL_CFLAGS += \


android_config_h := $(call select-android-config-h,linux-arm64)
android_config_h := $(call select-android-config-h,linux-arm64)


# HACK: globally disable -fstack-protector until the toolchain supports it
TARGET_GLOBAL_UNSUPPORTED_CFLAGS := \
    -fstack-protector \
    -fstack-protector-all \

TARGET_GLOBAL_CFLAGS += \
TARGET_GLOBAL_CFLAGS += \
			-fpic -fPIE \
			-fpic -fPIE \
			-ffunction-sections \
			-ffunction-sections \
@@ -91,8 +96,10 @@ TARGET_GLOBAL_CFLAGS += \
			-include $(android_config_h) \
			-include $(android_config_h) \
			-I $(dir $(android_config_h))
			-I $(dir $(android_config_h))


# HACK: globally disable -fstack-protector until the toolchain supports it
# Help catch common 32/64-bit errors.
TARGET_GLOBAL_UNSUPPORTED_CFLAGS := -fstack-protector
TARGET_GLOBAL_CFLAGS += \
    -Werror=pointer-to-int-cast \
    -Werror=int-to-pointer-cast \


# TODO - remove __ANDROID__ after the next aarch64 toolchain refresh
# TODO - remove __ANDROID__ after the next aarch64 toolchain refresh
TARGET_GLOBAL_CFLAGS += -D__ANDROID__=1
TARGET_GLOBAL_CFLAGS += -D__ANDROID__=1
+5 −0
Original line number Original line Diff line number Diff line
@@ -126,6 +126,11 @@ TARGET_GLOBAL_CFLAGS += \
			-fstack-protector \
			-fstack-protector \
			-m64
			-m64


# Help catch common 32/64-bit errors.
TARGET_GLOBAL_CFLAGS += \
    -Werror=pointer-to-int-cast \
    -Werror=int-to-pointer-cast \

android_config_h := $(call select-android-config-h,target_linux-x86)
android_config_h := $(call select-android-config-h,target_linux-x86)
TARGET_ANDROID_CONFIG_CFLAGS := -include $(android_config_h) -I $(dir $(android_config_h))
TARGET_ANDROID_CONFIG_CFLAGS := -include $(android_config_h) -I $(dir $(android_config_h))
TARGET_GLOBAL_CFLAGS += $(TARGET_ANDROID_CONFIG_CFLAGS)
TARGET_GLOBAL_CFLAGS += $(TARGET_ANDROID_CONFIG_CFLAGS)