From 633b76b0d08aa4c1a9b6a9aba8a19e392d94c3ec Mon Sep 17 00:00:00 2001 From: midipix Date: Jan 10 2019 03:43:15 +0000 Subject: project: added assembler cflags. --- diff --git a/project/common.mk b/project/common.mk index e414247..c271e2e 100644 --- a/project/common.mk +++ b/project/common.mk @@ -84,7 +84,7 @@ src/%.o:$(PORT_DIR)/src/%.c $(CC) -c -o $@ $< $(CFLAGS_STATIC) src/%.o:$(PORT_DIR)/src/%.s - $(AS) -o $@ $< + $(AS) -o $@ $< $(CFLAGS_ASM) src/%.o:$(PORT_DIR)/src/%.S $(CC) -c -o $@ $< $(CFLAGS_STATIC) @@ -93,7 +93,7 @@ src/%.lo:$(PORT_DIR)/src/%.c $(CC) -c -o $@ $< $(CFLAGS_SHARED) src/%.lo:$(PORT_DIR)/src/%.s - $(AS) -o $@ $< + $(AS) -o $@ $< $(CFLAGS_ASM) src/%.lo:$(PORT_DIR)/src/%.S $(CC) -c -o $@ $< $(CFLAGS_SHARED) @@ -114,7 +114,7 @@ crt/%.o:$(PORT_DIR)/crt/%.c $(CC) -c -o $@ $< $(CFLAGS_STATIC) crt/%.o:$(PORT_DIR)/crt/%.s - $(AS) -o $@ $< + $(AS) -o $@ $< $(CFLAGS_ASM) crt/%.o:$(PORT_DIR)/crt/%.S $(CC) -c -o $@ $< $(CFLAGS_STATIC) @@ -147,7 +147,7 @@ ldso/%.lo:$(PORT_DIR)/ldso/%.c $(CC) -c -o $@ $< $(CFLAGS_SHARED) ldso/%.lo:$(PORT_DIR)/ldso/%.s - $(AS) -o $@ $< + $(AS) -o $@ $< $(CFLAGS_ASM) ldso/%.lo:$(PORT_DIR)/ldso/%.S $(CC) -c -o $@ $< $(CFLAGS_SHARED) diff --git a/project/extras.mk b/project/extras.mk index 1fb17fb..112b8b0 100644 --- a/project/extras.mk +++ b/project/extras.mk @@ -25,6 +25,12 @@ CFLAGS_COMMON += -fno-asynchronous-unwind-tables CFLAGS_COMMON += -frounding-math CFLAGS_COMMON += -fexcess-precision=standard +# assembler cflags +ifeq ($(CC_BINFMT),ELF) +CFLAGS_ASM += -Wa,--noexecstack +CFLAGS_CONFIG += $(CFLAGS_ASM) +endif + # memory modules libc_mem_modules = \ ./src/string/memcpy.c \