diff options
author | Nick Brassel <[email protected]> | 2023-11-14 09:41:12 +1100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-11-13 22:41:12 +0000 |
commit | 4c625d8286daba3540ce421cbb8100fac8d9e2c8 (patch) | |
tree | 85b7b5edbdb990535eb0428512796f5b1b71e697 /builddefs | |
parent | 1efc79063c5bc5fae6766f7555738b122ef8988d (diff) | |
download | qmk_firmware-4c625d8286daba3540ce421cbb8100fac8d9e2c8.tar.gz qmk_firmware-4c625d8286daba3540ce421cbb8100fac8d9e2c8.zip |
Revert "chibios: disable RWX segment warning on newer GNU lds (#22007)" (#22469)
This reverts commit de3c42125b661f62757f8ee4f6184c089340d3a0.
Diffstat (limited to 'builddefs')
-rw-r--r-- | builddefs/common_rules.mk | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/builddefs/common_rules.mk b/builddefs/common_rules.mk index ddd36409a7..52dccbe475 100644 --- a/builddefs/common_rules.mk +++ b/builddefs/common_rules.mk @@ -15,13 +15,6 @@ VPATH := # Helper to return the distinct elements of a list uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))) -cc-option = $(shell \ - if $(CC) $(1) -shared -o /dev/null -xc /dev/null > /dev/null 2>&1; \ - then echo "$(1)"; else echo "$(2)"; fi) - -# helper to pass comma character to make functions -, := , - # Convert all SRC to OBJ define OBJ_FROM_SRC $(patsubst %.c,$1/%.o,$(patsubst %.cpp,$1/%.o,$(patsubst %.cc,$1/%.o,$(patsubst %.S,$1/%.o,$(patsubst %.clib,$1/%.a,$($1_SRC)))))) @@ -73,7 +66,9 @@ CFLAGS += $(CDEFS) CFLAGS += -O$(OPT) # add color ifeq ($(COLOR),true) - CFLAGS+= $(call cc-option, -fdiagnostics-color) +ifeq ("$(shell echo "int main(){}" | $(CC) -fdiagnostics-color -x c - -o /dev/null 2>&1)", "") + CFLAGS+= -fdiagnostics-color +endif endif CFLAGS += -Wall CFLAGS += -Wstrict-prototypes |