software/libcompiler_rt: Fix compilation for ARM/Cortex-M1.

This commit is contained in:
Ilia Sergachev 2022-04-22 15:15:30 +02:00 committed by Florent Kermarrec
parent e2bf77b0e3
commit 016e1abcff
1 changed files with 12 additions and 10 deletions

View File

@ -14,14 +14,10 @@ OBJECTS=umodsi3.o udivsi3.o divsi3.o modsi3.o comparesf2.o comparedf2.o negsf2.o
clzsi2.o ctzsi2.o udivdi3.o umoddi3.o moddi3.o ucmpdi2.o
ifeq ($(CPUFAMILY), arm)
OBJECTS += aeabi_div0.o aeabi_uldivmod.o aeabi_uidivmod.o aeabi_idivmod.o \
udivmodsi4.o divmodsi4.o aeabi_ldivmod.o divmoddi4.o
%.o: $(COMPILER_RT_DIRECTORY)/lib/builtins/arm/%.c
$(call compile,-fno-lto)
%.o: $(COMPILER_RT_DIRECTORY)/lib/builtins/arm/%.S
$(call compile,-fno-lto)
OBJECTS += aeabi_uidivmod.o aeabi_idivmod.o udivmodsi4.o divmodsi4.o divmoddi4.o
ifneq ($(CPU), cortex_m1)
OBJECTS += aeabi_div0.o aeabi_uldivmod.o aeabi_ldivmod.o
endif
endif
all: libcompiler_rt.a
@ -32,10 +28,16 @@ libcompiler_rt.a: $(OBJECTS) mulsi3.o
# pull in dependency info for *existing* .o files
-include $(OBJECTS:.o=.d)
mulsi3.o: $(SOC_DIRECTORY)/software/libcompiler_rt/mulsi3.c
VPATH = $(SOC_DIRECTORY)/software/libcompiler_rt:$(COMPILER_RT_DIRECTORY)/lib/builtins
ifeq ($(CPUFAMILY), arm)
VPATH += $(COMPILER_RT_DIRECTORY)/lib/builtins/arm
endif
%.o: %.c
$(call compile,-fno-lto)
%.o: $(COMPILER_RT_DIRECTORY)/lib/builtins/%.c
%.o: %.S
$(call compile,-fno-lto)
.PHONY: all clean