[arch][arm-m] disable -mthumb-interwork for cortex-m targets

If the cpu is always in thumb mode there's really no reason to pass
this switch and it can and does foul up libgcc selection.

Possible it can be removed entirely since the build system doesn't
really support anything prior to armv7 or armv6 where thumb interwork
became implicit. Unclear if it'll cause linking issues to not have it
set, however.
This commit is contained in:
Travis Geiselbrecht
2021-02-06 17:32:13 -08:00
parent 7c43f66169
commit e231864e12

View File

@@ -214,8 +214,12 @@ THUMBCFLAGS :=
THUMBINTERWORK :=
ifeq ($(ENABLE_THUMB),true)
THUMBCFLAGS := -mthumb -D__thumb__
ifneq ($(SUBARCH),arm-m)
# Only enable thumb interworking switch if we're compiling in a mixed
# arm/thumb environment. Also possible this switch is not needed anymore.
THUMBINTERWORK := -mthumb-interwork
endif
endif
GLOBAL_INCLUDES += \
$(LOCAL_DIR)/$(SUBARCH)/include