mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
build/cmake: Add toolchain C++ library linking for all platforms.
Extend CONFIG_LIBCXXTOOLCHAIN support to all remaining platforms in CMake builds by explicitly locating and linking libstdc++.a from the toolchain. This prevents build failures caused by STL header/library mismatches where toolchain headers are included without the corresponding library. * Adds nuttx_find_toolchain_lib() calls for all platforms. * Aligns CMake behavior with Make build system. Signed-off-by: trns1997 <trns1997@gmail.com>
This commit is contained in:
@@ -132,6 +132,10 @@ ifeq ($(CONFIG_LIBSUPCXX_TOOLCHAIN),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libsupc++.a))
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libstdc++.a))
|
||||
endif
|
||||
|
||||
# Loadable module definitions
|
||||
|
||||
CMODULEFLAGS = $(CFLAGS) -fvisibility=hidden
|
||||
|
||||
@@ -80,6 +80,10 @@ ifeq ($(CONFIG_LIBSUPCXX_TOOLCHAIN),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libsupc++.a))
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libstdc++.a))
|
||||
endif
|
||||
|
||||
# Loadable module definitions
|
||||
|
||||
CMODULEFLAGS = $(CFLAGS) -fvisibility=hidden
|
||||
|
||||
Reference in New Issue
Block a user