@@ -115,7 +115,7 @@ endif
%: %.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
%: %.S
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -Wa,--noexecstack $< -o $@ $(LDFLAGS)
else
# For system targets we include a different Makefile fragment as the
# build options for bare programs are usually pretty different. They
@@ -28,7 +28,7 @@ config-cc.mak: Makefile
.PRECIOUS: $(CRT_OBJS)
%.o: $(CRT_PATH)/%.S
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -c $< -o $@
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -Wa,--noexecstack -c $< -o $@
# Build and link the tests
%: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
@@ -22,7 +22,7 @@ LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc
.PRECIOUS: $(CRT_OBJS)
%.o: $(CRT_PATH)/%.S
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -c $< -o $@
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -Wa,--noexecstack -c $< -o $@
# Build and link the tests
%: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
@@ -36,7 +36,7 @@ LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc
.PRECIOUS: $(CRT_OBJS)
%.o: $(ARM_SRC)/%.S
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -c $< -o $@
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -Wa,--noexecstack -c $< -o $@
# Build and link the tests
%: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
@@ -25,7 +25,7 @@ ARM_TESTS += test-arm-iwmmxt
# Clang assembler does not support IWMXT, so use the external assembler.
test-arm-iwmmxt: CFLAGS += -marm -march=iwmmxt -mabi=aapcs -mfpu=fpv4-sp-d16 $(CROSS_CC_HAS_FNIA)
test-arm-iwmmxt: test-arm-iwmmxt.S
- $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
+ $(CC) $(CFLAGS) -Wa,--noexecstack $< -o $@ $(LDFLAGS)
# Float-convert Tests
ARM_TESTS += fcvt
@@ -25,7 +25,7 @@ EXTRA_RUNS+=$(MULTIARCH_RUNS)
.PRECIOUS: $(CRT_OBJS)
%.o: $(CRT_PATH)/%.S
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -Wa,--noexecstack -c $< -o $@
# Build and link the tests
%: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
@@ -22,7 +22,7 @@ LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc
.PRECIOUS: $(CRT_OBJS)
%.o: $(CRT_PATH)/%.S
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -c $< -o $@
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -Wa,--noexecstack -c $< -o $@
# Build and link the tests
%: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
@@ -10,7 +10,7 @@ LDFLAGS = -T $(LINK_SCRIPT)
CFLAGS += -g -Og
%.o: %.S
- $(CC) $(CFLAGS) $< -c -o $@
+ $(CC) $(CFLAGS) $< -Wa,--noexecstack -c -o $@
%: %.o $(LINK_SCRIPT)
$(LD) $(LDFLAGS) $< -o $@
@@ -6,7 +6,7 @@ CFLAGS+=-ggdb -O0
LDFLAGS=-nostdlib -static
%.o: %.S
- $(CC) -march=z13 -m64 -c $< -o $@
+ $(CC) -march=z13 -m64 -Wa,--noexecstack -c $< -o $@
%.o: %.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -march=z13 -m64 -c $< -o $@
@@ -25,7 +25,7 @@ EXTRA_RUNS+=$(MULTIARCH_RUNS)
.PRECIOUS: $(CRT_OBJS)
%.o: $(CRT_PATH)/%.S
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -Wa,--noexecstack -c $< -o $@
# Build and link the tests
%: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)