scripts,native: pass LDFLAGS to g++

This commit is contained in:
Zihao Yu 2023-06-04 16:24:40 +08:00
parent ea17990531
commit e8943b31fc

View file

@ -13,10 +13,12 @@ AM_SRCS := native/trm.c \
CFLAGS += -fpie
ASFLAGS += -fpie -pie
comma = ,
LDFLAGS_CXX = $(addprefix -Wl$(comma), $(LDFLAGS))
image:
@echo + LD "->" $(IMAGE_REL)
@g++ -pie -o $(IMAGE) -Wl,--whole-archive $(LINKAGE) -Wl,-no-whole-archive -Wl,-z -Wl,noexecstack -lSDL2 -ldl
@g++ -pie -o $(IMAGE) -Wl,--whole-archive $(LINKAGE) -Wl,-no-whole-archive $(LDFLAGS_CXX) -lSDL2 -ldl
run: image
$(IMAGE)