From 295f63f37071fc214184703f6fcd131fccba809f Mon Sep 17 00:00:00 2001 From: Zhanglong Xia Date: Fri, 10 Mar 2023 08:55:46 +0800 Subject: [PATCH] [build] fix the `-Wunused-command-line-argument` warning on macOS (#8839) Use the command `make -f src/posix/Makefile-posix` to build the posix platform on macOS, it generates the `-Wunused-command-line-argument` warning (refer to #8828). This commit moves the linker option `-rdynamic` from `COMMONCFLAGS` to the `LDFLAGS` to resolve the warning. --- src/posix/Makefile-posix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/posix/Makefile-posix b/src/posix/Makefile-posix index 98c43caab..5ddc67b4e 100644 --- a/src/posix/Makefile-posix +++ b/src/posix/Makefile-posix @@ -78,7 +78,6 @@ UPTIME ?= 1 COMMONCFLAGS := \ -g \ - -rdynamic \ $(NULL) # If the user has asserted COVERAGE, alter the configuration options @@ -144,6 +143,7 @@ CXXFLAGS += \ LDFLAGS += \ $(COMMONCFLAGS) \ + -rdynamic \ $(NULL) TopSourceDir := $(dir $(shell readlink $(firstword $(MAKEFILE_LIST))))../..