summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--project/common.mk8
-rw-r--r--project/extras.mk6
2 files changed, 10 insertions, 4 deletions
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 \