From 34aa82a11af95b3ca79b07c29d636719b0b3d162 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Sun, 10 Apr 2022 19:54:56 +0200 Subject: [PATCH] cmake: use -warn_commons instead of --warn-common on macOS --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 569f1a329e..56fa70e4b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,12 +198,13 @@ if(CONFIG_ESP_SYSTEM_USE_EH_FRAME) endif() list(APPEND link_options "-fno-lto") -list(APPEND link_options "-Wl,--warn-common") if(CONFIG_IDF_TARGET_LINUX AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") list(APPEND link_options "-Wl,-dead_strip") + list(APPEND link_options "-Wl,-warn_commons") else() list(APPEND link_options "-Wl,--gc-sections") + list(APPEND link_options "-Wl,--warn-common") endif() # SMP FreeRTOS user provided minimal idle hook. This allows the user to provide