diff --git a/0001-PATCH-libcxxabi-Remove-monorepo-requirement.patch b/0001-PATCH-libcxxabi-Remove-monorepo-requirement.patch new file mode 100644 index 0000000000000000000000000000000000000000..db85739492ccbc95d9ba60422426633176b53f19 --- /dev/null +++ b/0001-PATCH-libcxxabi-Remove-monorepo-requirement.patch @@ -0,0 +1,33 @@ +From e0f1975ff11b9914beb4b6af5ce0da452298543c Mon Sep 17 00:00:00 2001 +From: wangzehong +Date: Fri, 10 Feb 2023 10:43:22 +0800 +Subject: [PATCH] Remove monorepo requirement + +--- + CMakeLists.txt | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/libcxxabi-12.0.1.src/CMakeLists.txt b/libcxxabi-12.0.1.src/CMakeLists.txt +index 6de2b5a..a3019da 100644 +--- a/libcxxabi-12.0.1.src/CMakeLists.txt ++++ b/libcxxabi-12.0.1.src/CMakeLists.txt +@@ -1,8 +1,5 @@ + # See www/CMake.html for instructions on how to build libcxxabi with CMake. + +-if (NOT IS_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/../libcxx") +- message(FATAL_ERROR "libc++abi now requires being built in a monorepo layout with libcxx available") +-endif() + + #=============================================================================== + # Setup Project +@@ -42,8 +39,6 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXXABI_STANDALONE_B + set(LIBCXXABI_STANDALONE_BUILD 1) + set(LLVM_LIT_OUTPUT_DIR "${LIBCXXABI_BINARY_DIR}/bin") + +- # Find the LLVM sources and simulate LLVM CMake options. +- include(HandleOutOfTreeLLVM) + endif() + + if (LIBCXXABI_STANDALONE_BUILD) +-- +2.33.1.windows.1 \ No newline at end of file diff --git a/0002-PATCH-libcxxabi-Include-refstring.h-from-system-incl.patch b/0002-PATCH-libcxxabi-Include-refstring.h-from-system-incl.patch new file mode 100644 index 0000000000000000000000000000000000000000..bf24d29a1d005be9278cded623417cc9ea536541 --- /dev/null +++ b/0002-PATCH-libcxxabi-Include-refstring.h-from-system-incl.patch @@ -0,0 +1,25 @@ +From d3eda1ebfd4f127e53880bbc588d703293552ef3 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Wed, 17 Feb 2021 12:50:08 -0800 +Subject: [PATCH 1/2] [PATCH][libcxxabi-12.0.1.src] Include refstring.h from system + includedir + +--- + libcxxabi-12.0.1.src/src/stdlib_stdexcept.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libcxxabi-12.0.1.src/src/stdlib_stdexcept.cpp b/libcxxabi-12.0.1.src/src/stdlib_stdexcept.cpp +index 4a464e4..c3d14b2 100644 +--- a/libcxxabi-12.0.1.src/src/stdlib_stdexcept.cpp ++++ b/libcxxabi-12.0.1.src/src/stdlib_stdexcept.cpp +@@ -6,7 +6,7 @@ + // + //===----------------------------------------------------------------------===// + +-#include "../../libcxx/src/include/refstring.h" ++#include + #include "stdexcept" + #include "new" + #include +-- +1.8.3.1 diff --git a/libcxxabi-12.0.1.src.tar.xz b/libcxxabi-12.0.1.src.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..1cbc54ede916866c10802f5487fa044635eeac6c Binary files /dev/null and b/libcxxabi-12.0.1.src.tar.xz differ diff --git a/libcxxabi.spec b/libcxxabi.spec new file mode 100644 index 0000000000000000000000000000000000000000..81508a8ef5ce25994b0175ad1b854af1f0b9a826 --- /dev/null +++ b/libcxxabi.spec @@ -0,0 +1,76 @@ +%global debug_package %{nil} + +Name: libcxxabi +Version: 12.0.1 +Release: 1 +Summary: LLVM "libcxxabi" runtime libraries +License: BSD +URL: http://llvm.org +Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/libcxxabi-%{version}.src.tar.xz + +Patch0: 0001-PATCH-libcxxabi-Remove-monorepo-requirement.patch +Patch1: 0002-PATCH-libcxxabi-Include-refstring.h-from-system-incl.patch + +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: cmake +BuildRequires: python3 +BuildRequires: libcxx-devel >= %{version} + +%description +The libcxxabi-devel package includes the libraries and header files for libcxxabi. + +%package devel +Summary: Headers and libraries for libcxxabi devel +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +%{summary}. + +%package static +Summary: Static libraries for libcxxabi + +%description static +%{summary}. + +%prep +%autosetup -n libcxxabi-%{version}.src -p2 + +%build +mkdir -p _build +cd _build + +cmake \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DLIBCXXABI_LIBCXX_INCLUDES=%{_includedir}/c++/v1/ \ + -DCMAKE_CXX_FLAGS="-std=c++11"\ +%if 0%{?__isa_bits} == 64 + -DLLVM_LIBDIR_SUFFIX=64 \ +%else + -DLLVM_LIBDIR_SUFFIX= \ +%endif + .. + +%make_build + +%install +cd _build +%make_install + +mkdir -p %{buildroot}%{_includedir} +cp -a ../include/* %{buildroot}%{_includedir} + +%files +%{_libdir}/libc++abi.so.* + +%files devel +%{_includedir}/*.h +%{_libdir}/libc++abi.so + +%files static +%{_libdir}/libc++abi.a + +%changelog +* Tue Feb 7 2023 Wang Zehong - 12.0.1-1 +- update to 12.0.1-1