[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.
This commit is contained in:
Zhanglong Xia
2023-03-09 16:55:46 -08:00
committed by GitHub
parent 742f53f64a
commit 295f63f370
+1 -1
View File
@@ -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))))../..