libstdc++: Relocate c++config.h from include/ to libstdc++ to preserve upstream integrity

- Add c++config.h to improve libstdc++ configuration support
- Update CMakeLists.txt and libsupc++.defs to integrate the new config header
- Remove the obsolete 0001-libsupc-Add-missing-header-files.patch to clean up the codebase

These changes enhance the maintainability and portability of the C++ standard library and simplify the build process.
This commit is contained in:
cuiziwei
2026-01-26 15:04:58 +08:00
committed by Donny(董九柱)
parent 6d9ed4217a
commit 94ac6b620b
4 changed files with 2287 additions and 2308 deletions
File diff suppressed because it is too large Load Diff
+1 -3
View File
@@ -45,9 +45,6 @@ if(CONFIG_LIBSUPCXX)
""
TEST_COMMAND
""
PATCH_COMMAND
patch -p1 -d ${CMAKE_CURRENT_LIST_DIR}/libstdc++ <
${CMAKE_CURRENT_LIST_DIR}/0001-libsupc-Add-missing-header-files.patch
DOWNLOAD_NO_PROGRESS true
TIMEOUT 30)
@@ -81,6 +78,7 @@ if(CONFIG_LIBSUPCXX)
set(BITSDIR ${CMAKE_BINARY_DIR}/include/c++/bits)
# Copy libsupc++ headers
file(COPY ${CMAKE_CURRENT_LIST_DIR}/c++config.h DESTINATION ${INCDIR}/bits)
file(COPY ${SUPDIR}/compare DESTINATION ${CXXDIR})
file(COPY ${SUPDIR}/exception DESTINATION ${CXXDIR})
file(COPY ${SUPDIR}/initializer_list DESTINATION ${CXXDIR})
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -31,7 +31,6 @@ libstdc++-v3.tar.gz:
libstdc++/libstdc++: libstdc++-v3.tar.gz
$(Q) mkdir -p $@
$(Q) tar -xzf $< -C $@
$(Q) patch -p1 < libstdc++/0001-libsupc-Add-missing-header-files.patch -d $@
endif
C++DIR = $(TOPDIR)/include/c++
@@ -50,6 +49,7 @@ $(BITSDIR): libstdc++/libstdc++
$(Q) mkdir -p $(BITSDIR)
copy_headers: $(BITSDIR)
$(Q) cp libstdc++/c++config.h $(INCDIR)/bits
$(Q) cp $(SUPDIR)/compare $(C++DIR)
$(Q) cp $(SUPDIR)/exception $(C++DIR)
$(Q) cp $(SUPDIR)/initializer_list $(C++DIR)
@@ -75,6 +75,7 @@ context:: copy_headers
distclean::
$(call DELDIR, $(BITSDIR))
$(call DELFILE, $(INCDIR)/bits/c++config.h)
ifeq ($(wildcard libstdc++/libstdc++/.git),)
$(call DELDIR, libstdc++)
$(call DELFILE, libstdc++.tar.gz)