ARM: tidy compilation flags

This commit is contained in:
Philippe Teuwen committed 2026-04-28 13:00:42 +02:00
1 parent 294b656af1
commit 6efff9a6ae
3 files changed
+12 -10

No files matched your search

+7 -3
View File
@@ -48,7 +48,6 @@ VPATH = . ../common_arm ../common ../common/crapto1 ../common/mbedtls ../common/
INCLUDES = ../include/proxmark3_arm.h ../include/at91sam7s512.h ../include/config_gpio.h ../include/pm3_cmd.h
ARMCFLAGS = -mthumb-interwork -fno-builtin
DEFCFLAGS = -Wall -Werror -Os -pedantic -fstrict-aliasing -pipe
# Some more warnings we want as errors:
@@ -99,9 +98,14 @@ ifeq ($(NOERROR),1)
endif
CROSS_CFLAGS ?= $(DEFCFLAGS)
CROSS_CFLAGS += $(ARMCFLAGS) -c $(INCLUDE) -std=c99 -DON_DEVICE $(APP_CFLAGS)
CROSS_CFLAGS += -c -std=c99 -mthumb-interwork -fno-builtin -ffunction-sections -fdata-sections
# stack-protect, no-pie reduces size on Gentoo Hardened 8.2 gcc
CROSS_CFLAGS += -fno-stack-protector -fno-pie
CROSS_CFLAGS += -DON_DEVICE $(INCLUDE) $(APP_CFLAGS)
CROSS_LDFLAGS += -nostartfiles -nodefaultlibs -Wl,--gc-sections -Wl,--build-id=none -Wl,--nmagic
#CROSS_LDFLAGS += -Wl,--print-gc-sections
CROSS_LDFLAGS += -nostartfiles -nodefaultlibs -Wl,-gc-sections -Wl,--build-id=none -n
LIBS = -lgcc
# Flags to generate temporary dependency files