manually merge PR #24

This commit is contained in:
Tom spot Callaway 2021-02-25 17:18:39 -05:00
parent 31892fd885
commit a5fbedaff1
1 changed files with 42 additions and 9 deletions

View File

@ -2,7 +2,7 @@
# Otherwise, you have a loop with libcxxabi # Otherwise, you have a loop with libcxxabi
%global bootstrap 0 %global bootstrap 0
%global rc_ver 2 %global rc_ver 2
%global baserelease 2 %global baserelease 3
%global libcxx_srcdir libcxx-%{version}%{?rc_ver:rc%{rc_ver}}.src %global libcxx_srcdir libcxx-%{version}%{?rc_ver:rc%{rc_ver}}.src
@ -22,8 +22,11 @@ BuildRequires: gcc-c++ llvm-devel cmake llvm-static ninja-build
# We need python3-devel for pathfix.py. # We need python3-devel for pathfix.py.
BuildRequires: python3-devel BuildRequires: python3-devel
%if %{bootstrap} < 1 # The static libc++ links the static abi library in as well
BuildRequires: libcxxabi-static
BuildRequires: libcxxabi-devel BuildRequires: libcxxabi-devel
%if %{bootstrap} < 1
BuildRequires: python3 BuildRequires: python3
%endif %endif
@ -66,26 +69,52 @@ pathfix.py -i %{__python3} -pn \
%build %build
%cmake -GNinja \ common_cmake_flags="\
-DLIBCXX_STANDALONE_BUILD=ON \ %if 0%{?__isa_bits} == 64
-DLIBCXX_LIBDIR_SUFFIX:STRING=64 \
%endif
%if %{bootstrap} < 1 %if %{bootstrap} < 1
-DLIBCXX_CXX_ABI=libcxxabi \ -DLIBCXX_CXX_ABI=libcxxabi \
-DLIBCXX_CXX_ABI_INCLUDE_PATHS=%{_includedir} \ -DLIBCXX_CXX_ABI_INCLUDE_PATHS=%{_includedir} \
-DPYTHONINTERP_FOUND=ON \ -DPYTHONINTERP_FOUND=ON \
-DPYTHON_EXECUTABLE=%{_bindir}/python3 \ -DPYTHON_EXECUTABLE=%{_bindir}/python3 \
%endif
-DLIBCXX_STANDALONE_BUILD=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo"
# Build the static libc++.a.
# We include the libc++abi symbols.
%cmake -GNinja \
$common_cmake_flags \
-DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF \
-DLIBCXX_ENABLE_STATIC=ON \
-DLIBCXX_ENABLE_SHARED=OFF \
-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON \
-DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON \
-DLIBCXX_CXX_ABI_LIBRARY_PATH=%{_libdir}
%cmake_build
# Copy result libc++.a
mkdir results-static
find . -name libc++.a -exec cp {} ./results-static \;
%cmake -GNinja \
$common_cmake_flags \
-DLIBCXX_STANDALONE_BUILD=ON \
%if %{bootstrap} < 1
-DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=ON \ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=ON \
%endif %endif
%if 0%{?__isa_bits} == 64 -DLIBCXX_ENABLE_STATIC=OFF \
-DLIBCXX_LIBDIR_SUFFIX:STRING=64 \ -DLIBCXX_ENABLE_SHARED=ON \
%endif -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=OFF
-DCMAKE_BUILD_TYPE=RelWithDebInfo
%cmake_build %cmake_build
%install %install
%cmake_install %cmake_install
install results-static/libc++.a %{buildroot}/%{_libdir}
%ldconfig_scriptlets %ldconfig_scriptlets
@ -109,6 +138,10 @@ install -m 0644 src/include/* %{buildroot}%{_includedir}/libcxx-internal/
%changelog %changelog
* Thu Feb 25 2021 Timm Bäder <tbaeder@redhat.com> - 12.0.0-0.3.rc2
- Build shared and static libc++ separately
- Include libc++abi symbols in static libc++.a
* Wed Feb 24 2021 sguelton@redhat.com - 12.0.0-0.2.rc2 * Wed Feb 24 2021 sguelton@redhat.com - 12.0.0-0.2.rc2
- 12.0.0-rc2 release - 12.0.0-rc2 release