Update to 17.0.6
1. Add libcxxabi and libunwind and build together 2. Add runtime packae due to depend on runtimes/cmake/Modules 3. Add standalone.patch
This commit is contained in:
parent
e0e6e59457
commit
24fc9897d4
5
CMakeLists.txt
Normal file
5
CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.13.4)
|
||||||
|
project(Runtimes C CXX ASM)
|
||||||
|
add_subdirectory(libcxxabi)
|
||||||
|
add_subdirectory(libcxx)
|
||||||
|
add_subdirectory(libunwind)
|
||||||
15
README.en.md
15
README.en.md
@ -3,21 +3,6 @@
|
|||||||
#### Description
|
#### Description
|
||||||
The libcxx is c++ libs of llvm for openEuler
|
The libcxx is c++ libs of llvm for openEuler
|
||||||
|
|
||||||
#### Software Architecture
|
|
||||||
Software architecture description
|
|
||||||
|
|
||||||
#### Installation
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Instructions
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Contribution
|
#### Contribution
|
||||||
|
|
||||||
1. Fork the repository
|
1. Fork the repository
|
||||||
|
|||||||
16
README.md
16
README.md
@ -3,22 +3,6 @@
|
|||||||
#### 介绍
|
#### 介绍
|
||||||
The libcxx is c++ libs of llvm for openEuler
|
The libcxx is c++ libs of llvm for openEuler
|
||||||
|
|
||||||
#### 软件架构
|
|
||||||
软件架构说明
|
|
||||||
|
|
||||||
|
|
||||||
#### 安装教程
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 使用说明
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 参与贡献
|
#### 参与贡献
|
||||||
|
|
||||||
1. Fork 本仓库
|
1. Fork 本仓库
|
||||||
|
|||||||
22
fedora-standalone.patch
Normal file
22
fedora-standalone.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
From 0ef68aab2b08915b9144ffa67b3319e3e8332445 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nikita Popov <npopov@redhat.com>
|
||||||
|
Date: Thu, 4 Aug 2022 12:44:15 +0200
|
||||||
|
Subject: [PATCH] Fix standalone build
|
||||||
|
|
||||||
|
---
|
||||||
|
libunwind/docs/CMakeLists.txt | 1 +
|
||||||
|
1 files changed, 1 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/libunwind/docs/CMakeLists.txt b/libunwind/docs/CMakeLists.txt
|
||||||
|
index 79b87eb03b44..eaf6f3db5223 100644
|
||||||
|
--- a/libunwind/docs/CMakeLists.txt
|
||||||
|
+++ b/libunwind/docs/CMakeLists.txt
|
||||||
|
@@ -1,5 +1,6 @@
|
||||||
|
include(FindSphinx)
|
||||||
|
if (SPHINX_FOUND AND LLVM_ENABLE_SPHINX)
|
||||||
|
+ include(AddLLVM)
|
||||||
|
include(AddSphinxTarget)
|
||||||
|
if (${SPHINX_OUTPUT_HTML})
|
||||||
|
add_sphinx_target(html libunwind)
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
Binary file not shown.
BIN
libcxx-17.0.6.src.tar.xz
Normal file
BIN
libcxx-17.0.6.src.tar.xz
Normal file
Binary file not shown.
270
libcxx.spec
270
libcxx.spec
@ -1,71 +1,263 @@
|
|||||||
%global debug_package %{nil}
|
%bcond_without sys_llvm
|
||||||
|
%bcond_without check
|
||||||
|
|
||||||
Name: libcxx
|
%global maj_ver 17
|
||||||
Version: 12.0.1
|
%global min_ver 0
|
||||||
Release: 1%{?dist}
|
%global patch_ver 6
|
||||||
Summary: LLVM "libcxx" runtime libraries
|
%global libcxx_version %{maj_ver}.%{min_ver}.%{patch_ver}
|
||||||
License: BSD
|
|
||||||
URL: http://llvm.org
|
|
||||||
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/libcxx-%{version}.src.tar.xz
|
|
||||||
|
|
||||||
Patch0: 0001-libcxx-Remove-monorepo-requirement.patch
|
%global libcxx_srcdir libcxx-%{libcxx_version}.src
|
||||||
BuildRequires: gcc
|
%global libcxxabi_srcdir libcxxabi-%{libcxx_version}.src
|
||||||
BuildRequires: gcc-c++
|
%global libunwind_srcdir libunwind-%{libcxx_version}.src
|
||||||
BuildRequires: cmake
|
%global runtimes_srcdir runtimes-%{libcxx_version}.src
|
||||||
BuildRequires: python3
|
%global runtimes_cmakedir %{runtimes_srcdir}/cmake/Modules
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with sys_llvm}
|
||||||
|
%global pkg_name libcxx
|
||||||
|
%global install_prefix %{_prefix}
|
||||||
|
%global install_datadir %{_datadir}
|
||||||
|
%else
|
||||||
|
%global pkg_name libcxx%{maj_ver}
|
||||||
|
%global install_prefix %{_libdir}/llvm%{maj_ver}
|
||||||
|
%global install_datadir %{install_prefix}/share
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?__isa_bits} == 64
|
||||||
|
%global install_libdir %{install_prefix}/lib64
|
||||||
|
%else
|
||||||
|
%global install_libdir %{install_prefix}/lib
|
||||||
|
%endif
|
||||||
|
%global install_includedir %{install_prefix}/include
|
||||||
|
|
||||||
|
|
||||||
|
Name: %{pkg_name}
|
||||||
|
Version: %{libcxx_version}
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: LLVM "libcxx" runtime libraries
|
||||||
|
License: Apache-2.0
|
||||||
|
URL: http://llvm.org
|
||||||
|
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libcxx_version}/%{libcxx_srcdir}.tar.xz
|
||||||
|
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libcxx_version}/%{libcxxabi_srcdir}.tar.xz
|
||||||
|
Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libcxx_version}/%{libunwind_srcdir}.tar.xz
|
||||||
|
Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libcxx_version}/%{runtimes_srcdir}.tar.xz
|
||||||
|
Source4: CMakeLists.txt
|
||||||
|
|
||||||
|
Patch0: fedora-standalone.patch
|
||||||
|
|
||||||
|
BuildRequires: clang cmake ninja-build
|
||||||
|
%if %{with sys_llvm}
|
||||||
|
BuildRequires: llvm-devel = %{version}
|
||||||
|
BuildRequires: llvm-cmake-utils = %{version}
|
||||||
|
%else
|
||||||
|
BuildRequires: llvm%{maj_ver}-devel = %{version}
|
||||||
|
BuildRequires: llvm%{maj_ver}-cmake-utils = %{version}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# We need python3-devel for %%py3_shebang_fix
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
|
||||||
|
# For documentation
|
||||||
|
BuildRequires: python3-sphinx
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The libcxx-devel package includes the libraries and header files for libcxx.
|
The libcxx-devel package includes the libraries and header files for libcxx.
|
||||||
|
|
||||||
|
# libcxx
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Headers and libraries for libcxx devel
|
Summary: Headers and libraries for libcxx devel
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: libcxxabi-devel
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
%{summary}.
|
%{summary}.
|
||||||
|
|
||||||
|
%package static
|
||||||
|
Summary: Static libraries for libcxx
|
||||||
|
|
||||||
|
%description static
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
|
||||||
|
# libcxxabi
|
||||||
|
%package -n libcxxabi
|
||||||
|
Summary: Low level support for a standard C++ library
|
||||||
|
|
||||||
|
%description -n libcxxabi
|
||||||
|
libcxxabi provides low level support for a standard C++ library.
|
||||||
|
|
||||||
|
%package -n libcxxabi-devel
|
||||||
|
Summary: Headers and libraries for libcxxabi devel
|
||||||
|
Requires: libcxxabi%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n libcxxabi-devel
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%package -n libcxxabi-static
|
||||||
|
Summary: Static libraries for libcxxabi
|
||||||
|
|
||||||
|
%description -n libcxxabi-static
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
|
||||||
|
# libunwind
|
||||||
|
%package -n llvm-libunwind
|
||||||
|
Summary: LLVM libunwind
|
||||||
|
|
||||||
|
%description -n llvm-libunwind
|
||||||
|
|
||||||
|
LLVM libunwind is an implementation of the interface defined by the HP libunwind
|
||||||
|
project. It was contributed Apple as a way to enable clang++ to port to
|
||||||
|
platforms that do not have a system unwinder. It is intended to be a small and
|
||||||
|
fast implementation of the ABI, leaving off some features of HP's libunwind
|
||||||
|
that never materialized (e.g. remote unwinding).
|
||||||
|
|
||||||
|
%package -n llvm-libunwind-devel
|
||||||
|
Summary: LLVM libunwind development files
|
||||||
|
Provides: libunwind(major) = %{maj_ver}
|
||||||
|
Requires: llvm-libunwind%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n llvm-libunwind-devel
|
||||||
|
Unversioned shared library for LLVM libunwind
|
||||||
|
|
||||||
|
%package -n llvm-libunwind-static
|
||||||
|
Summary: Static library for LLVM libunwind
|
||||||
|
|
||||||
|
%description -n llvm-libunwind-static
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%package -n llvm-libunwind-doc
|
||||||
|
Summary: libunwind documentation
|
||||||
|
# jquery.js and langage_data.js are used in the HTML doc and under BSD License
|
||||||
|
License: BSD AND (Apache-2.0 WITH LLVM-exception OR NCSA OR MIT)
|
||||||
|
|
||||||
|
%description -n llvm-libunwind-doc
|
||||||
|
Documentation for LLVM libunwind
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n libcxx-%{version}.src
|
%setup -T -q -b 0 -n %{libcxx_srcdir}
|
||||||
|
%setup -T -q -b 1 -n %{libcxxabi_srcdir}
|
||||||
|
%setup -T -q -b 2 -n %{libunwind_srcdir}
|
||||||
|
%setup -T -q -b 3 -n %{runtimes_srcdir}
|
||||||
|
%setup -T -c -n build
|
||||||
|
|
||||||
|
cp %{SOURCE4} .
|
||||||
|
mv ../%{libcxx_srcdir} libcxx
|
||||||
|
mv ../%{libcxxabi_srcdir} libcxxabi
|
||||||
|
mv ../%{libunwind_srcdir} libunwind
|
||||||
|
mkdir -p runtimes/cmake/Modules
|
||||||
|
cp ../%{runtimes_cmakedir}/HandleFlags.cmake runtimes/cmake/Modules/
|
||||||
|
cp ../%{runtimes_cmakedir}/WarningFlags.cmake runtimes/cmake/Modules/
|
||||||
|
|
||||||
|
%autopatch -p1
|
||||||
|
|
||||||
|
#%py3_shebang_fix libcxx/utils/
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mkdir -p _build
|
mkdir -p _build
|
||||||
cd _build
|
cd _build
|
||||||
|
# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
|
||||||
|
export ASMFLAGS=$CFLA
|
||||||
|
|
||||||
cmake \
|
%cmake -GNinja \
|
||||||
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_MODULE_PATH="%{install_libdir}/cmake/llvm;%{install_datadir}/llvm/cmake/Modules" \
|
||||||
-DCMAKE_C_COMPILER_TARGET=%{_arch} \
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||||
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \
|
|
||||||
%if 0%{?__isa_bits} == 64
|
%if 0%{?__isa_bits} == 64
|
||||||
-DLLVM_LIBDIR_SUFFIX=64 \
|
-DLIBCXX_LIBDIR_SUFFIX:STRING=64 \
|
||||||
%else
|
-DLIBCXXABI_LIBDIR_SUFFIX:STRING=64 \
|
||||||
-DLLVM_LIBDIR_SUFFIX= \
|
-DLIBUNWIND_LIBDIR_SUFFIX:STRING=64 \
|
||||||
%endif
|
%endif
|
||||||
..
|
-DLIBCXX_INCLUDE_BENCHMARKS=OFF \
|
||||||
|
-DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON \
|
||||||
|
-DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=ON \
|
||||||
|
-DLLVM_BUILD_DOCS=ON \
|
||||||
|
-DLLVM_ENABLE_SPHINX=ON \
|
||||||
|
-DLIBUNWIND_INCLUDE_DOCS=ON \
|
||||||
|
-DLIBUNWIND_INSTALL_INCLUDE_DIR=%{install_includedir}/llvm-libunwind \
|
||||||
|
-DLIBUNWIND_INSTALL_SPHINX_HTML_DIR=%{_pkgdocdir}/html \
|
||||||
|
..
|
||||||
|
|
||||||
%make_build
|
%ninja_build
|
||||||
# Copy result libc++.a
|
|
||||||
mkdir results-static
|
|
||||||
find . -name libc++.a -exec cp {} ./results-static \;
|
|
||||||
cp ../src/include/atomic_support.h include/c++/v1
|
|
||||||
cp ../src/include/refstring.h include/c++/v1
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
cd _build
|
cd _build
|
||||||
%make_install
|
|
||||||
install results-static/libc++.a %{buildroot}/%{_libdir}
|
|
||||||
install include/c++/v1/atomic_support.h %{buildroot}/%{_libdir}/../include/c++/v1
|
|
||||||
install include/c++/v1/refstring.h %{buildroot}/%{_libdir}/../include/c++/v1
|
|
||||||
|
|
||||||
|
%ninja_install
|
||||||
|
# We can't install the unversionned path on default location because that would conflict with
|
||||||
|
# https://src.fedoraproject.org/rpms/libunwind
|
||||||
|
#
|
||||||
|
# The versionned path has a different soname (libunwind.so.1 compared to
|
||||||
|
# libunwind.so.8) so they can live together in %%{_libdir}
|
||||||
|
#
|
||||||
|
# ABI wise, even though llvm-libunwind's library is named libunwind, it doesn't
|
||||||
|
# have the exact same ABI as gcc's libunwind (it actually provides a subset).
|
||||||
|
rm %{buildroot}%{install_libdir}/libunwind.so
|
||||||
|
mkdir -p %{buildroot}/%{install_libdir}/llvm-unwind/
|
||||||
|
|
||||||
|
pushd %{buildroot}/%{install_libdir}/llvm-unwind
|
||||||
|
ln -s ../libunwind.so.1.0 libunwind.so
|
||||||
|
popd
|
||||||
|
|
||||||
|
rm %{buildroot}%{_pkgdocdir}/html/.buildinfo
|
||||||
|
|
||||||
|
%ldconfig_scriptlets
|
||||||
%files
|
%files
|
||||||
%{_libdir}/libc++*
|
%license libcxx/LICENSE.TXT
|
||||||
%{_prefix}/include/*
|
%doc libcxx/CREDITS.TXT libcxx/TODO.TXT
|
||||||
|
%{install_libdir}/libc++.so.*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_includedir}/c++/
|
%{install_includedir}/c++/
|
||||||
%{_libdir}/libc++.so
|
%exclude %{install_includedir}/c++/v1/cxxabi.h
|
||||||
|
%exclude %{install_includedir}/c++/v1/__cxxabi_config.h
|
||||||
|
%{install_libdir}/libc++.so
|
||||||
|
|
||||||
|
%files static
|
||||||
|
%license libcxx/LICENSE.TXT
|
||||||
|
%{install_libdir}/libc++.a
|
||||||
|
%{install_libdir}/libc++experimental.a
|
||||||
|
|
||||||
|
%files -n libcxxabi
|
||||||
|
%license libcxxabi/LICENSE.TXT
|
||||||
|
%doc libcxxabi/CREDITS.TXT
|
||||||
|
%{install_libdir}/libc++abi.so.*
|
||||||
|
|
||||||
|
%files -n libcxxabi-devel
|
||||||
|
%{install_includedir}/c++/v1/cxxabi.h
|
||||||
|
%{install_includedir}/c++/v1/__cxxabi_config.h
|
||||||
|
%{install_libdir}/libc++abi.so
|
||||||
|
|
||||||
|
%files -n libcxxabi-static
|
||||||
|
%{install_libdir}/libc++abi.a
|
||||||
|
|
||||||
|
%files -n llvm-libunwind
|
||||||
|
%license libunwind/LICENSE.TXT
|
||||||
|
%{install_libdir}/libunwind.so.1
|
||||||
|
%{install_libdir}/libunwind.so.1.0
|
||||||
|
|
||||||
|
%files -n llvm-libunwind-devel
|
||||||
|
%{install_includedir}/llvm-libunwind/__libunwind_config.h
|
||||||
|
%{install_includedir}/llvm-libunwind/libunwind.h
|
||||||
|
%{install_includedir}/llvm-libunwind/libunwind.modulemap
|
||||||
|
%{install_includedir}/llvm-libunwind/mach-o/compact_unwind_encoding.h
|
||||||
|
%{install_includedir}/llvm-libunwind/mach-o/compact_unwind_encoding.modulemap
|
||||||
|
%{install_includedir}/llvm-libunwind/unwind.h
|
||||||
|
%{install_includedir}/llvm-libunwind/unwind_arm_ehabi.h
|
||||||
|
%{install_includedir}/llvm-libunwind/unwind_itanium.h
|
||||||
|
%dir %{install_libdir}/llvm-unwind
|
||||||
|
%{install_libdir}/llvm-unwind/libunwind.so
|
||||||
|
|
||||||
|
%files -n llvm-libunwind-static
|
||||||
|
%{install_libdir}/libunwind.a
|
||||||
|
|
||||||
|
%files -n llvm-libunwind-doc
|
||||||
|
%license libunwind/LICENSE.TXT
|
||||||
|
%doc %{_pkgdocdir}/html
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 5 2023 zhoujing <zhoujing106@huawei.com> - 17.0.6-1
|
||||||
|
- update to 17.0.6
|
||||||
|
|
||||||
* Tue Feb 7 2023 Wang Zehong <wangzehong2@huawei.com> - 12.0.1-1
|
* Tue Feb 7 2023 Wang Zehong <wangzehong2@huawei.com> - 12.0.1-1
|
||||||
- update to 12.0.1-1
|
- update to 12.0.1-1
|
||||||
|
|||||||
BIN
libcxxabi-17.0.6.src.tar.xz
Normal file
BIN
libcxxabi-17.0.6.src.tar.xz
Normal file
Binary file not shown.
BIN
libunwind-17.0.6.src.tar.xz
Normal file
BIN
libunwind-17.0.6.src.tar.xz
Normal file
Binary file not shown.
BIN
runtimes-17.0.6.src.tar.xz
Normal file
BIN
runtimes-17.0.6.src.tar.xz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user