!14 init for Multi-Version LLVM-18.1.8
From: @liyunfei33 Reviewed-by: @eastb233 Signed-off-by: @eastb233
This commit is contained in:
commit
de07953b09
17
README.en.md
17
README.en.md
@ -1,8 +1,23 @@
|
|||||||
# libcxx
|
# libcxx-latest
|
||||||
|
|
||||||
#### 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
|
||||||
|
|||||||
18
README.md
18
README.md
@ -1,8 +1,24 @@
|
|||||||
# libcxx
|
# libcxx-latest
|
||||||
|
|
||||||
#### 介绍
|
#### 介绍
|
||||||
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 本仓库
|
||||||
|
|||||||
Binary file not shown.
BIN
libcxx-18.1.8.src.tar.xz
Normal file
BIN
libcxx-18.1.8.src.tar.xz
Normal file
Binary file not shown.
167
libcxx.spec
167
libcxx.spec
@ -1,17 +1,13 @@
|
|||||||
%undefine __cmake_in_source_build
|
|
||||||
|
|
||||||
%bcond_without sys_llvm
|
|
||||||
%bcond_without check
|
%bcond_without check
|
||||||
%bcond_without toolchain_clang
|
%bcond_without toolchain_clang
|
||||||
%bcond_without bisheng_autotuner
|
|
||||||
|
|
||||||
%if %{with toolchain_clang}
|
%if %{with toolchain_clang}
|
||||||
%global toolchain clang
|
%global toolchain clang
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%global maj_ver 17
|
%global maj_ver 18
|
||||||
%global min_ver 0
|
%global min_ver 1
|
||||||
%global patch_ver 6
|
%global patch_ver 8
|
||||||
%global libcxx_version %{maj_ver}.%{min_ver}.%{patch_ver}
|
%global libcxx_version %{maj_ver}.%{min_ver}.%{patch_ver}
|
||||||
|
|
||||||
%global libcxx_srcdir libcxx-%{libcxx_version}.src
|
%global libcxx_srcdir libcxx-%{libcxx_version}.src
|
||||||
@ -20,16 +16,12 @@
|
|||||||
%global runtimes_srcdir runtimes-%{libcxx_version}.src
|
%global runtimes_srcdir runtimes-%{libcxx_version}.src
|
||||||
%global runtimes_cmakedir %{runtimes_srcdir}/cmake/Modules
|
%global runtimes_cmakedir %{runtimes_srcdir}/cmake/Modules
|
||||||
|
|
||||||
|
%global _scl_prefix /opt/openEuler
|
||||||
%if %{with sys_llvm}
|
%{?scl:%scl_package %scl}
|
||||||
%global pkg_name libcxx
|
%{!?scl:%global scl_prefix llvm-toolset-%{maj_ver}-}
|
||||||
%global install_prefix %{_prefix}
|
%{!?scl:%global pkg_name %{name}}
|
||||||
%global install_datadir %{_datadir}
|
%global install_prefix %{!?scl:%{_scl_prefix}/llvm-toolset-%{maj_ver}/root}%{_prefix}
|
||||||
%else
|
%global install_datadir %{!?scl:%{_scl_prefix}/llvm-toolset-%{maj_ver}/root}%{_datadir}
|
||||||
%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
|
%if 0%{?__isa_bits} == 64
|
||||||
%global install_libdir %{install_prefix}/lib64
|
%global install_libdir %{install_prefix}/lib64
|
||||||
@ -38,10 +30,9 @@
|
|||||||
%endif
|
%endif
|
||||||
%global install_includedir %{install_prefix}/include
|
%global install_includedir %{install_prefix}/include
|
||||||
|
|
||||||
|
Name: %{?scl_prefix}libcxx
|
||||||
Name: %{pkg_name}
|
|
||||||
Version: %{libcxx_version}
|
Version: %{libcxx_version}
|
||||||
Release: 4
|
Release: 1
|
||||||
Summary: LLVM "libcxx" runtime libraries
|
Summary: LLVM "libcxx" runtime libraries
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
URL: http://llvm.org
|
URL: http://llvm.org
|
||||||
@ -53,14 +44,12 @@ Source4: CMakeLists.txt
|
|||||||
|
|
||||||
Patch0: fedora-standalone.patch
|
Patch0: fedora-standalone.patch
|
||||||
|
|
||||||
BuildRequires: clang cmake ninja-build
|
%if "%toolchain" == "clang"
|
||||||
%if %{with sys_llvm}
|
BuildRequires: clang
|
||||||
BuildRequires: llvm-devel = %{version}
|
|
||||||
BuildRequires: llvm-cmake-utils = %{version}
|
|
||||||
%else
|
|
||||||
BuildRequires: llvm%{maj_ver}-devel = %{version}
|
|
||||||
BuildRequires: llvm%{maj_ver}-cmake-utils = %{version}
|
|
||||||
%endif
|
%endif
|
||||||
|
BuildRequires: %{?scl_prefix}clang cmake ninja-build
|
||||||
|
BuildRequires: %{?scl_prefix}llvm-devel = %{version}
|
||||||
|
BuildRequires: %{?scl_prefix}llvm-cmake-utils = %{version}
|
||||||
|
|
||||||
# We need python3-devel for %%py3_shebang_fix
|
# We need python3-devel for %%py3_shebang_fix
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
@ -68,13 +57,15 @@ BuildRequires: python3-devel
|
|||||||
# For documentation
|
# For documentation
|
||||||
BuildRequires: python3-sphinx
|
BuildRequires: python3-sphinx
|
||||||
|
|
||||||
|
%{?scl:Requires: %scl_runtime}
|
||||||
|
|
||||||
%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
|
# 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: %{pkg_name}%{?_isa} = %{version}-%{release}
|
||||||
Requires: libcxxabi-devel
|
Requires: libcxxabi-devel
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
@ -82,64 +73,64 @@ Requires: libcxxabi-devel
|
|||||||
|
|
||||||
%package static
|
%package static
|
||||||
Summary: Static libraries for libcxx
|
Summary: Static libraries for libcxx
|
||||||
|
|
||||||
%description static
|
%description static
|
||||||
%{summary}.
|
%{summary}.
|
||||||
|
|
||||||
|
|
||||||
# libcxxabi
|
# libcxxabi
|
||||||
%package -n libcxxabi
|
%package -n %{?scl_prefix}libcxxabi
|
||||||
Summary: Low level support for a standard C++ library
|
Summary: Low level support for a standard C++ library
|
||||||
|
|
||||||
%description -n libcxxabi
|
%description -n %{?scl_prefix}libcxxabi
|
||||||
libcxxabi provides low level support for a standard C++ library.
|
libcxxabi provides low level support for a standard C++ library.
|
||||||
|
|
||||||
%package -n libcxxabi-devel
|
%package -n %{?scl_prefix}libcxxabi-devel
|
||||||
Summary: Headers and libraries for libcxxabi devel
|
Summary: Headers and libraries for libcxxabi devel
|
||||||
Requires: libcxxabi%{?_isa} = %{version}-%{release}
|
Requires: %{?scl_prefix}libcxxabi%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description -n libcxxabi-devel
|
%description -n %{?scl_prefix}libcxxabi-devel
|
||||||
%{summary}.
|
%{summary}.
|
||||||
|
|
||||||
%package -n libcxxabi-static
|
%package -n %{?scl_prefix}libcxxabi-static
|
||||||
Summary: Static libraries for libcxxabi
|
Summary: Static libraries for libcxxabi
|
||||||
|
|
||||||
%description -n libcxxabi-static
|
%description -n %{?scl_prefix}libcxxabi-static
|
||||||
%{summary}.
|
%{summary}.
|
||||||
|
|
||||||
|
|
||||||
# libunwind
|
# libunwind
|
||||||
%package -n llvm-libunwind
|
%package -n %{?scl_prefix}llvm-libunwind
|
||||||
Summary: LLVM libunwind
|
Summary: LLVM libunwind
|
||||||
|
|
||||||
%description -n llvm-libunwind
|
%description -n %{?scl_prefix}llvm-libunwind
|
||||||
|
|
||||||
LLVM libunwind is an implementation of the interface defined by the HP 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
|
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
|
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
|
fast implementation of the ABI, leaving off some features of HP's libunwind
|
||||||
that never materialized (e.g. remote unwinding).
|
that never materialized (e.g. remote unwinding).
|
||||||
|
|
||||||
%package -n llvm-libunwind-devel
|
%package -n %{?scl_prefix}llvm-libunwind-devel
|
||||||
Summary: LLVM libunwind development files
|
Summary: LLVM libunwind development files
|
||||||
Provides: libunwind(major) = %{maj_ver}
|
Provides: %{?scl_prefix}libunwind(major) = %{maj_ver}
|
||||||
Requires: llvm-libunwind%{?_isa} = %{version}-%{release}
|
Requires: %{?scl_prefix}llvm-libunwind%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description -n llvm-libunwind-devel
|
%description -n %{?scl_prefix}llvm-libunwind-devel
|
||||||
Unversioned shared library for LLVM libunwind
|
Unversioned shared library for LLVM libunwind
|
||||||
|
|
||||||
%package -n llvm-libunwind-static
|
%package -n %{?scl_prefix}llvm-libunwind-static
|
||||||
Summary: Static library for LLVM libunwind
|
Summary: Static library for LLVM libunwind
|
||||||
|
|
||||||
%description -n llvm-libunwind-static
|
%description -n %{?scl_prefix}llvm-libunwind-static
|
||||||
%{summary}.
|
%{summary}.
|
||||||
|
|
||||||
%package -n llvm-libunwind-doc
|
%package -n %{?scl_prefix}llvm-libunwind-doc
|
||||||
Summary: libunwind documentation
|
Summary: libunwind documentation
|
||||||
# jquery.js and langage_data.js are used in the HTML doc and under BSD License
|
# 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)
|
License: BSD AND (Apache-2.0 WITH LLVM-exception OR NCSA OR MIT)
|
||||||
|
|
||||||
%description -n llvm-libunwind-doc
|
%description -n %{?scl_prefix}llvm-libunwind-doc
|
||||||
Documentation for LLVM libunwind
|
Documentation for LLVM libunwind
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
@ -162,10 +153,15 @@ cp ../%{runtimes_cmakedir}/WarningFlags.cmake runtimes/cmake/Modules/
|
|||||||
#%py3_shebang_fix libcxx/utils/
|
#%py3_shebang_fix libcxx/utils/
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
mkdir -p _build
|
||||||
|
cd _build
|
||||||
# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
|
# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
|
||||||
export ASMFLAGS=$CFLA
|
export ASMFLAGS=$CFLA
|
||||||
|
|
||||||
%cmake -GNinja \
|
%cmake -GNinja \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=%{install_prefix} \
|
||||||
|
-DLLVM_COMMON_CMAKE_UTILS=%{install_datadir}/llvm/cmake \
|
||||||
|
-DLLVM_MAIN_SRC_DIR=%{install_prefix}/src \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
-DCMAKE_MODULE_PATH="%{install_libdir}/cmake/llvm;%{install_datadir}/llvm/cmake/Modules" \
|
-DCMAKE_MODULE_PATH="%{install_libdir}/cmake/llvm;%{install_datadir}/llvm/cmake/Modules" \
|
||||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||||
@ -177,6 +173,7 @@ export ASMFLAGS=$CFLA
|
|||||||
-DLIBCXX_INCLUDE_BENCHMARKS=OFF \
|
-DLIBCXX_INCLUDE_BENCHMARKS=OFF \
|
||||||
-DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON \
|
-DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON \
|
||||||
-DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=ON \
|
-DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=ON \
|
||||||
|
-DLIBCXXABI_USE_LLVM_UNWINDER=OFF \
|
||||||
-DLLVM_BUILD_DOCS=ON \
|
-DLLVM_BUILD_DOCS=ON \
|
||||||
-DLLVM_ENABLE_SPHINX=ON \
|
-DLLVM_ENABLE_SPHINX=ON \
|
||||||
-DLIBUNWIND_INCLUDE_DOCS=ON \
|
-DLIBUNWIND_INCLUDE_DOCS=ON \
|
||||||
@ -186,14 +183,14 @@ export ASMFLAGS=$CFLA
|
|||||||
-DCMAKE_C_COMPILER=clang \
|
-DCMAKE_C_COMPILER=clang \
|
||||||
-DCMAKE_CXX_COMPILER=clang++ \
|
-DCMAKE_CXX_COMPILER=clang++ \
|
||||||
%endif
|
%endif
|
||||||
%if %{with bisheng_autotuner}
|
..
|
||||||
-DLLVM_ENABLE_AUTOTUNER=ON \
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%cmake_build
|
%ninja_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%cmake_install
|
cd _build
|
||||||
|
|
||||||
|
%ninja_install
|
||||||
# We can't install the unversionned path on default location because that would conflict with
|
# We can't install the unversionned path on default location because that would conflict with
|
||||||
# https://src.fedoraproject.org/rpms/libunwind
|
# https://src.fedoraproject.org/rpms/libunwind
|
||||||
#
|
#
|
||||||
@ -204,48 +201,49 @@ export ASMFLAGS=$CFLA
|
|||||||
# have the exact same ABI as gcc's libunwind (it actually provides a subset).
|
# have the exact same ABI as gcc's libunwind (it actually provides a subset).
|
||||||
rm %{buildroot}%{install_libdir}/libunwind.so
|
rm %{buildroot}%{install_libdir}/libunwind.so
|
||||||
mkdir -p %{buildroot}/%{install_libdir}/llvm-unwind/
|
mkdir -p %{buildroot}/%{install_libdir}/llvm-unwind/
|
||||||
|
|
||||||
pushd %{buildroot}/%{install_libdir}/llvm-unwind
|
pushd %{buildroot}/%{install_libdir}/llvm-unwind
|
||||||
ln -s ../libunwind.so.1.0 libunwind.so
|
ln -s ../libunwind.so.1.0 libunwind.so
|
||||||
popd
|
popd
|
||||||
|
|
||||||
rm %{buildroot}%{_pkgdocdir}/html/.buildinfo
|
rm %{buildroot}%{_pkgdocdir}/html/.buildinfo
|
||||||
|
|
||||||
|
%ldconfig_scriptlets
|
||||||
%files
|
%files
|
||||||
%license libcxx/LICENSE.TXT
|
%license libcxx/LICENSE.TXT
|
||||||
%doc libcxx/CREDITS.TXT libcxx/TODO.TXT
|
%doc libcxx/CREDITS.TXT libcxx/TODO.TXT
|
||||||
%{install_libdir}/libc++.so.*
|
%{install_libdir}/libc++.so.*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{install_includedir}/c++/
|
%{install_includedir}/c++/
|
||||||
%exclude %{install_includedir}/c++/v1/cxxabi.h
|
%exclude %{install_includedir}/c++/v1/cxxabi.h
|
||||||
%exclude %{install_includedir}/c++/v1/__cxxabi_config.h
|
%exclude %{install_includedir}/c++/v1/__cxxabi_config.h
|
||||||
%{install_libdir}/libc++.so
|
%{install_libdir}/libc++.so
|
||||||
|
|
||||||
%files static
|
%files static
|
||||||
%license libcxx/LICENSE.TXT
|
%license libcxx/LICENSE.TXT
|
||||||
%{install_libdir}/libc++.a
|
%{install_libdir}/libc++.a
|
||||||
%{install_libdir}/libc++experimental.a
|
%{install_libdir}/libc++experimental.a
|
||||||
|
|
||||||
%files -n libcxxabi
|
%files -n %{?scl_prefix}libcxxabi
|
||||||
%license libcxxabi/LICENSE.TXT
|
%license libcxxabi/LICENSE.TXT
|
||||||
%doc libcxxabi/CREDITS.TXT
|
%doc libcxxabi/CREDITS.TXT
|
||||||
%{install_libdir}/libc++abi.so.*
|
%{install_libdir}/libc++abi.so.*
|
||||||
|
|
||||||
%files -n libcxxabi-devel
|
%files -n %{?scl_prefix}libcxxabi-devel
|
||||||
%{install_includedir}/c++/v1/cxxabi.h
|
%{install_includedir}/c++/v1/cxxabi.h
|
||||||
%{install_includedir}/c++/v1/__cxxabi_config.h
|
%{install_includedir}/c++/v1/__cxxabi_config.h
|
||||||
%{install_libdir}/libc++abi.so
|
%{install_libdir}/libc++abi.so
|
||||||
|
|
||||||
%files -n libcxxabi-static
|
%files -n %{?scl_prefix}libcxxabi-static
|
||||||
%{install_libdir}/libc++abi.a
|
%{install_libdir}/libc++abi.a
|
||||||
|
|
||||||
%files -n llvm-libunwind
|
%files -n %{?scl_prefix}llvm-libunwind
|
||||||
%license libunwind/LICENSE.TXT
|
%license libunwind/LICENSE.TXT
|
||||||
%{install_libdir}/libunwind.so.1
|
%{install_libdir}/libunwind.so.1
|
||||||
%{install_libdir}/libunwind.so.1.0
|
%{install_libdir}/libunwind.so.1.0
|
||||||
|
|
||||||
%files -n llvm-libunwind-devel
|
%files -n %{?scl_prefix}llvm-libunwind-devel
|
||||||
%{install_includedir}/llvm-libunwind/__libunwind_config.h
|
%{install_includedir}/llvm-libunwind/__libunwind_config.h
|
||||||
%{install_includedir}/llvm-libunwind/libunwind.h
|
%{install_includedir}/llvm-libunwind/libunwind.h
|
||||||
%{install_includedir}/llvm-libunwind/libunwind.modulemap
|
%{install_includedir}/llvm-libunwind/libunwind.modulemap
|
||||||
@ -256,15 +254,18 @@ rm %{buildroot}%{_pkgdocdir}/html/.buildinfo
|
|||||||
%{install_includedir}/llvm-libunwind/unwind_itanium.h
|
%{install_includedir}/llvm-libunwind/unwind_itanium.h
|
||||||
%dir %{install_libdir}/llvm-unwind
|
%dir %{install_libdir}/llvm-unwind
|
||||||
%{install_libdir}/llvm-unwind/libunwind.so
|
%{install_libdir}/llvm-unwind/libunwind.so
|
||||||
|
|
||||||
%files -n llvm-libunwind-static
|
%files -n %{?scl_prefix}llvm-libunwind-static
|
||||||
%{install_libdir}/libunwind.a
|
%{install_libdir}/libunwind.a
|
||||||
|
|
||||||
%files -n llvm-libunwind-doc
|
%files -n %{?scl_prefix}llvm-libunwind-doc
|
||||||
%license libunwind/LICENSE.TXT
|
%license libunwind/LICENSE.TXT
|
||||||
%doc %{_pkgdocdir}/html
|
%doc %{_pkgdocdir}/html
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Dec 6 2024 liyunfei <liyunfei33@huawei.com> - 18.1.8-1
|
||||||
|
- init for Multi-Version LLVM-18.1.8
|
||||||
|
|
||||||
* Thu Nov 07 2024 Funda Wang <fundawang@yeah.net> - 17.0.6-4
|
* Thu Nov 07 2024 Funda Wang <fundawang@yeah.net> - 17.0.6-4
|
||||||
- adopt to new cmake macro
|
- adopt to new cmake macro
|
||||||
- force out-of-source build
|
- force out-of-source build
|
||||||
|
|||||||
Binary file not shown.
BIN
libcxxabi-18.1.8.src.tar.xz
Normal file
BIN
libcxxabi-18.1.8.src.tar.xz
Normal file
Binary file not shown.
Binary file not shown.
BIN
libunwind-18.1.8.src.tar.xz
Normal file
BIN
libunwind-18.1.8.src.tar.xz
Normal file
Binary file not shown.
Binary file not shown.
BIN
runtimes-18.1.8.src.tar.xz
Normal file
BIN
runtimes-18.1.8.src.tar.xz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user