From 4b64f7af1e737754a87e70f6aa8e41b72043a8b3 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 13 Nov 2023 23:45:40 +0000 Subject: [PATCH] chibios: disable RWX segment warning on newer GNU lds (#22471) --- platforms/chibios/platform.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platforms/chibios/platform.mk b/platforms/chibios/platform.mk index 081b001e6da9..e42ecebdc544 100644 --- a/platforms/chibios/platform.mk +++ b/platforms/chibios/platform.mk @@ -476,6 +476,11 @@ HEX = $(OBJCOPY) -O $(FORMAT) EEP = BIN = $(OBJCOPY) -O binary +# disable warning about RWX triggered by ChibiOS linker scripts +ifeq ("$(shell echo "int main(){}" | $(CC) -shared -Wl,--no-warn-rwx-segments -x c - -o /dev/null 2>&1)", "") + SHARED_LDFLAGS += -Wl,--no-warn-rwx-segments +endif + ############################################################################## # Make targets #