Skip to content

Commit 3387d9c

Browse files
apaillier-ledgeriartemov-ledger
authored andcommitted
Enables the use of clang rt builtins instead of libgcc
1 parent 29fea71 commit 3387d9c

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

Makefile.standard_app

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,19 @@ APP_FLAGS_APP_LOAD_PARAMS = $(shell printf '0x%x' $$(( $(STANDARD_APP_FLAGS) + $
222222
#####################################################################
223223
# COMPILER SETTINGS #
224224
#####################################################################
225-
CC := $(CLANGPATH)clang
226-
AS := $(CLANGPATH)clang
227-
LD := $(CLANGPATH)clang
228-
ifeq ($(AS),$(CLANGPATH)clang)
229-
AFLAGS += --target=arm-arm-none-eabi
225+
CC = $(CLANGPATH)clang
226+
AS = $(CLANGPATH)clang
227+
ifeq ($(TARGET_NAME),TARGET_NANOS)
228+
LD = $(GCCPATH)arm-none-eabi-gcc
229+
LDLIBS += -lgcc
230+
else
231+
LD = $(CLANGPATH)clang
232+
LDLIBS += -lclang_rt.builtins
230233
endif
231-
LDLIBS += -lm -lgcc -lc
234+
235+
AFLAGS += --target=arm-none-eabi
236+
237+
LDLIBS += -lm -lc
232238

233239
#####################################################################
234240
# MISC #

0 commit comments

Comments
 (0)