Message ID | 20200225001404.7532-1-rosenp@gmail.com |
---|---|
State | Changes Requested |
Delegated to: | Petr Štetiar |
Headers | show |
Series | [OpenWrt-Devel] libcxx: fix compilation with platforms needing lssp | expand |
Rosen Penev <rosenp@gmail.com> [2020-02-24 16:14:04]: > Currently this is an issue with powerpc and i386 platforms. What issue? > Added extra cxxabi header > It's used by cxxabi.h. Perhaps upstream material? > ++ target_link_libraries(${target} PUBLIC ssp_nonshared) Shouldn't this be PRIVATE? Wont this break if one builds without SSP? Isn't this library implicit? It doesn't look like a correct change to me. -- ynezz
diff --git a/package/libs/libcxx/Makefile b/package/libs/libcxx/Makefile index 8343cbb427..51a49e4e9d 100644 --- a/package/libs/libcxx/Makefile +++ b/package/libs/libcxx/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libcxx PKG_VERSION:=9.0.1 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://git.llvm.org/git/libcxx diff --git a/package/libs/libcxx/patches/030-cxxabi.patch b/package/libs/libcxx/patches/030-cxxabi.patch new file mode 100644 index 0000000000..c70400f0c0 --- /dev/null +++ b/package/libs/libcxx/patches/030-cxxabi.patch @@ -0,0 +1,11 @@ +--- a/cmake/Modules/HandleLibCXXABI.cmake ++++ b/cmake/Modules/HandleLibCXXABI.cmake +@@ -84,7 +84,7 @@ if ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libstdc++" OR + "${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libsupc++") + set(_LIBSUPCXX_INCLUDE_FILES + cxxabi.h bits/c++config.h bits/os_defines.h bits/cpu_defines.h +- bits/cxxabi_tweaks.h bits/cxxabi_forced.h ++ bits/cxxabi_tweaks.h bits/cxxabi_forced.h bits/cxxabi_init_exception.h + ) + if ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libstdc++") + set(_LIBSUPCXX_DEFINES "-DLIBSTDCXX") diff --git a/package/libs/libcxx/patches/040-ssp.patch b/package/libs/libcxx/patches/040-ssp.patch new file mode 100644 index 0000000000..f4f780d33a --- /dev/null +++ b/package/libs/libcxx/patches/040-ssp.patch @@ -0,0 +1,11 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -175,6 +175,8 @@ function(cxx_link_system_libraries target) + target_link_libraries(${target} PUBLIC atomic) + endif() + ++ target_link_libraries(${target} PUBLIC ssp_nonshared) ++ + if (MINGW) + target_link_libraries(${target} PUBLIC "${MINGW_LIBRARIES}") + endif()
Currently this is an issue with powerpc and i386 platforms. Added extra cxxabi header It's used by cxxabi.h. Issue discovered when trying to build i2pd. Signed-off-by: Rosen Penev <rosenp@gmail.com> --- package/libs/libcxx/Makefile | 2 +- package/libs/libcxx/patches/030-cxxabi.patch | 11 +++++++++++ package/libs/libcxx/patches/040-ssp.patch | 11 +++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 package/libs/libcxx/patches/030-cxxabi.patch create mode 100644 package/libs/libcxx/patches/040-ssp.patch