abstract-machine/scripts/native.mk
Zihao Yu 024441cbed Makefile: supress warning about executable stack from ld 2.39
* `missing .note.GNU-stack section implies executable stack`
2022-11-09 16:45:41 +08:00

25 lines
634 B
Makefile

AM_SRCS := native/trm.c \
native/ioe.c \
native/cte.c \
native/trap.S \
native/vme.c \
native/mpe.c \
native/platform.c \
native/ioe/input.c \
native/ioe/timer.c \
native/ioe/gpu.c \
native/ioe/audio.c \
native/ioe/disk.c \
CFLAGS += -fpie
ASFLAGS += -fpie -pie
image:
@echo + LD "->" $(IMAGE_REL)
@g++ -pie -o $(IMAGE) -Wl,--whole-archive $(LINKAGE) -Wl,-no-whole-archive -Wl,-z -Wl,noexecstack -lSDL2 -ldl
run: image
$(IMAGE)
gdb: image
gdb -ex "handle SIGUSR1 SIGUSR2 SIGSEGV noprint nostop" $(IMAGE)