arm: move mthumb-interwork to CFLAGS for clang compatibility

This commit is contained in:
Philippe Teuwen 2019-10-27 01:28:07 +02:00
commit 2a0bc9c07b

View file

@ -39,7 +39,7 @@ 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
CFLAGS ?= -Wall -Werror -pedantic -Wunused -Os
CFLAGS ?= -Wall -Werror -pedantic -Wunused -Os -mthumb-interwork
CFLAGS += -c $(INCLUDE) -std=c99 $(APP_CFLAGS)
LDFLAGS += -nostartfiles -nodefaultlibs -Wl,-gc-sections -n
@ -57,21 +57,21 @@ VERSIONOBJ = $(patsubst %.c,$(OBJDIR)/%.o,$(notdir $(VERSIONSRC)))
$(THUMBOBJ): $(OBJDIR)/%.o: %.c $(INCLUDES)
$(info [-] CC $<)
$(Q)$(CC) $(CFLAGS) $(DEPFLAGS) -mthumb -mthumb-interwork -o $@ $<
$(Q)$(CC) $(CFLAGS) $(DEPFLAGS) -mthumb -o $@ $<
$(Q)$(POSTCOMPILE)
$(ARMOBJ): $(OBJDIR)/%.o: %.c $(INCLUDES)
$(info [-] CC $<)
$(Q)$(CC) $(CFLAGS) $(DEPFLAGS) -mthumb-interwork -o $@ $<
$(Q)$(CC) $(CFLAGS) $(DEPFLAGS) -o $@ $<
$(Q)$(POSTCOMPILE)
$(ASMOBJ): $(OBJDIR)/%.o: %.s
$(info [-] CC $<)
$(Q)$(CC) $(CFLAGS) -mthumb-interwork -o $@ $<
$(Q)$(CC) $(CFLAGS) -o $@ $<
$(VERSIONOBJ): $(OBJDIR)/%.o: %.c $(INCLUDES)
$(info [-] CC $<)
$(Q)$(CC) $(CFLAGS) -mthumb -mthumb-interwork -o $@ $<
$(Q)$(CC) $(CFLAGS) -mthumb -o $@ $<
# This objcopy call translates physical flash addresses to logical addresses
# without touching start address or RAM addresses (.bss and .data sections)