f56b59e
# If you need to bootstrap this, turn this on.
f56b59e
# Otherwise, you have a loop with libcxxabi
45f91b6
%global bootstrap 0
2ba0af0
#global rc_ver 3
8561528
bce9a4c
%global libcxx_version 13.0.0
34f0800
%global libcxx_srcdir libcxx-%{libcxx_version}%{?rc_ver:rc%{rc_ver}}.src
f56b59e
f56b59e
Name:		libcxx
34f0800
Version:	%{libcxx_version}%{?rc_ver:~rc%{rc_ver}}
bce9a4c
Release:	1%{?dist}
f56b59e
Summary:	C++ standard library targeting C++11
f56b59e
License:	MIT or NCSA
f56b59e
URL:		http://libcxx.llvm.org/
34f0800
Source0:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libcxx_version}%{?rc_ver:-rc%{rc_ver}}/%{libcxx_srcdir}.tar.xz
34f0800
Source1:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libcxx_version}%{?rc_ver:-rc%{rc_ver}}/%{libcxx_srcdir}.tar.xz.sig
f560e45
Source2:	tstellar-gpg-key.asc
0674e18
dd1c9f3
Patch0:		0001-PATCH-libcxx-Remove-monorepo-requirement.patch
41db51f
ab6e4b8
BuildRequires:	gcc-c++ llvm-devel cmake llvm-static ninja-build
41db51f
# We need python3-devel for pathfix.py.
41db51f
BuildRequires:  python3-devel
41db51f
a5fbeda
# The static libc++ links the static abi library in as well
a5fbeda
BuildRequires:	libcxxabi-static
f56b59e
BuildRequires:	libcxxabi-devel
a5fbeda
a5fbeda
%if %{bootstrap} < 1
947aaa0
BuildRequires:	python3
f56b59e
%endif
ab6e4b8
41db51f
ab6e4b8
# For origin certification
ab6e4b8
BuildRequires:	gnupg2
ab6e4b8
f56b59e
# PPC64 (on EL7) doesn't like this code.
f56b59e
# /builddir/build/BUILD/libcxx-3.8.0.src/include/thread:431:73: error: '(9.223372036854775807e+18 / 1.0e+9)' is not a constant expression
f56b59e
# _LIBCPP_CONSTEXPR duration<long double> _Max = nanoseconds::max();
311df88
%if 0%{?rhel}
f56b59e
ExcludeArch:	ppc64 ppc64le
311df88
%endif
f56b59e
f56b59e
%description
f56b59e
libc++ is a new implementation of the C++ standard library, targeting C++11.
f56b59e
f56b59e
%package devel
f56b59e
Summary:	Headers and libraries for libcxx devel
f56b59e
Requires:	%{name}%{?_isa} = %{version}-%{release}
f56b59e
%if %{bootstrap} < 1
f56b59e
Requires:	libcxxabi-devel
f56b59e
%endif
f56b59e
f56b59e
%description devel
f56b59e
%{summary}.
f56b59e
be05952
%package static
be05952
Summary:	Static libraries for libcxx
be05952
be05952
%description static
be05952
%{summary}.
be05952
f56b59e
%prep
ab6e4b8
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
41db51f
%autosetup -n %{libcxx_srcdir} -p2
41db51f
41db51f
pathfix.py -i %{__python3} -pn \
41db51f
	utils/*.py
f56b59e
f56b59e
%build
d603aee
a5fbeda
common_cmake_flags="\
a5fbeda
%if 0%{?__isa_bits} == 64
a5fbeda
	-DLIBCXX_LIBDIR_SUFFIX:STRING=64 \
a5fbeda
%endif
f56b59e
%if %{bootstrap} < 1
f56b59e
	-DLIBCXX_CXX_ABI=libcxxabi \
f56b59e
	-DLIBCXX_CXX_ABI_INCLUDE_PATHS=%{_includedir} \
947aaa0
	-DPYTHONINTERP_FOUND=ON \
947aaa0
	-DPYTHON_EXECUTABLE=%{_bindir}/python3 \
f56b59e
%endif
a5fbeda
	-DLIBCXX_STANDALONE_BUILD=ON \
a5fbeda
	-DCMAKE_BUILD_TYPE=RelWithDebInfo"
a5fbeda
a5fbeda
# Build the static libc++.a.
a5fbeda
# We include the libc++abi symbols.
a5fbeda
%cmake  -GNinja \
a5fbeda
	$common_cmake_flags \
a5fbeda
	-DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF \
a5fbeda
	-DLIBCXX_ENABLE_STATIC=ON \
a5fbeda
	-DLIBCXX_ENABLE_SHARED=OFF \
a5fbeda
	-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON \
a5fbeda
	-DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON \
a5fbeda
	-DLIBCXX_CXX_ABI_LIBRARY_PATH=%{_libdir}
a5fbeda
a5fbeda
%cmake_build
a5fbeda
a5fbeda
# Copy result libc++.a
a5fbeda
mkdir results-static
a5fbeda
find . -name libc++.a -exec cp {} ./results-static \;
f56b59e
a5fbeda
%cmake  -GNinja \
a5fbeda
	$common_cmake_flags \
a5fbeda
	-DLIBCXX_STANDALONE_BUILD=ON \
a5fbeda
%if %{bootstrap} < 1
a5fbeda
	-DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=ON \
a5fbeda
%endif
a5fbeda
	-DLIBCXX_ENABLE_STATIC=OFF \
a5fbeda
	-DLIBCXX_ENABLE_SHARED=ON \
a5fbeda
	-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=OFF
f56b59e
ab6e4b8
%cmake_build
f56b59e
f56b59e
%install
ab6e4b8
ab6e4b8
%cmake_install
a5fbeda
install results-static/libc++.a %{buildroot}/%{_libdir}
f56b59e
b659b98
%ldconfig_scriptlets
f56b59e
7b4ed51
# Install header files that libcxxabi needs
7b4ed51
mkdir -p %{buildroot}%{_includedir}/libcxx-internal/
7b4ed51
install -m 0644 src/include/* %{buildroot}%{_includedir}/libcxx-internal/
7b4ed51
f56b59e
%files
f56b59e
%license LICENSE.TXT
f56b59e
%doc CREDITS.TXT TODO.TXT
f56b59e
%{_libdir}/libc++.so.*
f56b59e
f56b59e
%files devel
7b4ed51
%{_includedir}/libcxx-internal/
f56b59e
%{_includedir}/c++/
f56b59e
%{_libdir}/libc++.so
f56b59e
be05952
%files static
be05952
%license LICENSE.TXT
be05952
%{_libdir}/libc++*.a
be05952
be05952
f56b59e
%changelog
2ba0af0
* Fri Oct 01 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0-1
2ba0af0
- 13.0.0 Release
2ba0af0
6ce5ab2
* Wed Sep 22 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0~rc3-1
6ce5ab2
- 13.0.0-rc3 Release
6ce5ab2
bce9a4c
* Mon Aug 09 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0~rc1-1
bce9a4c
- 13.0.0-rc1 Release
bce9a4c
1703fdf
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 12.0.1-2
1703fdf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
1703fdf
aee8df5
* Tue Jul 13 2021 Tom Stellard <tstellar@redhat.com> - 12.0.1-1
aee8df5
- 12.0.1 Release
aee8df5
41e6e0e
* Thu Jul 01 2021 Tom Stellard <tstellar@redhat.com> - 12.0.1~rc3-1
41e6e0e
- 12.0.1-rc3 Release
41e6e0e
34f0800
* Thu Jun 03 2021 Tom Stellard <tstellar@redhat.com> - 12.0.1~rc1-1
34f0800
- 12.0.1-rc1 Release
34f0800
8353648
* Fri Apr 16 2021 Tom Stellard <tstellar@redhat.com> - 12.0.0-1
8353648
- 12.0.0 Release
8353648
30c9402
* Thu Apr 08 2021 sguelton@redhat.com - 12.0.0-0.7.rc5
30c9402
- New upstream release candidate
30c9402
1d0012e
* Fri Apr 02 2021 sguelton@redhat.com - 12.0.0-0.6.rc4
1d0012e
- New upstream release candidate
1d0012e
71dc33f
* Thu Mar 11 2021 sguelton@redhat.com - 12.0.0-0.5.rc3
71dc33f
- LLVM 12.0.0 rc3
71dc33f
091579e
* Tue Mar 09 2021 sguelton@redhat.com - 12.0.0-0.4.rc2
091579e
- rebuilt
091579e
a5fbeda
* Thu Feb 25 2021 Timm Bäder <tbaeder@redhat.com> - 12.0.0-0.3.rc2
a5fbeda
- Build shared and static libc++ separately
a5fbeda
- Include libc++abi symbols in static libc++.a
a5fbeda
31892fd
* Wed Feb 24 2021 sguelton@redhat.com - 12.0.0-0.2.rc2
31892fd
- 12.0.0-rc2 release
31892fd
7b4ed51
* Wed Feb 17 2021 Tom Stellard <tstellar@redhat.com> - 12.0.0-0.1.rc1
7b4ed51
- 12.0.0-rc1 Release
7b4ed51
b0b569f
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 11.1.0-0.3.rc2
b0b569f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
b0b569f
0d82f13
* Fri Jan 22 2021 Serge Guelton - 11.1.0-0.2.rc2
0d82f13
- llvm 11.1.0-rc2 release
0d82f13
6a2335e
* Thu Jan 14 2021 Serge Guelton - 11.1.0-0.1.rc1
6a2335e
- 11.1.0-rc1 release
6a2335e
108a034
* Wed Jan 06 2021 Serge Guelton - 11.0.1-3
108a034
- LLVM 11.0.1 final
108a034
b37b3af
* Tue Dec 22 2020 sguelton@redhat.com - 11.0.1-2.rc2
b37b3af
- llvm 11.0.1-rc2
b37b3af
f560e45
* Tue Dec 01 2020 sguelton@redhat.com - 11.0.1-1.rc1
f560e45
- llvm 11.0.1-rc1
f560e45
957bc64
* Thu Oct 15 2020 sguelton@redhat.com - 11.0.0-1
957bc64
- Fix NVR
957bc64
e5e3271
* Mon Oct 12 2020 sguelton@redhat.com - 11.0.0-0.5
e5e3271
- llvm 11.0.0 - final release
e5e3271
a1a7f24
* Thu Oct 08 2020 sguelton@redhat.com - 11.0.0-0.4.rc6
a1a7f24
- 11.0.0-rc6
a1a7f24
c5e037d
* Fri Oct 02 2020 sguelton@redhat.com - 11.0.0-0.3.rc5
c5e037d
- 11.0.0-rc5 Release
c5e037d
47d1634
* Sun Sep 27 2020 sguelton@redhat.com - 11.0.0-0.2.rc3
47d1634
- Fix NVR
47d1634
a07e253
* Thu Sep 24 2020 sguelton@redhat.com - 11.0.0-0.1.rc3
a07e253
- 11.0.0-rc3 Release
a07e253
9a34b48
* Tue Sep 01 2020 sguelton@redhat.com - 11.0.0-0.1.rc2
9a34b48
- 11.0.0-rc2 Release
9a34b48
41db51f
* Tue Aug 11 2020 Tom Stellard <tstellar@redhat.com> - 11.0.0-0.1.rc1
41db51f
- 11.0.0-rc1 Release
41db51f
f1bfe5f
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 10.0.0-3
f1bfe5f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
f1bfe5f
ab6e4b8
* Mon Jul 20 2020 sguelton@redhat.com - 10.0.0-2
ab6e4b8
- Use modern cmake macros
ab6e4b8
- Finalize source verification
ab6e4b8
7f1ea69
* Mon Mar 30 2020 sguelton@redhat.com - 10.0.0-1
7f1ea69
- 10.0.0 final
7f1ea69
1eb3ed2
* Wed Mar 25 2020 sguelton@redhat.com - 10.0.0-0.6.rc6
1eb3ed2
- 10.0.0 rc6
1eb3ed2
88d6bcc
* Fri Mar 20 2020 sguelton@redhat.com - 10.0.0-0.5.rc5
88d6bcc
- 10.0.0 rc5
88d6bcc
3559f5a
* Sun Mar 15 2020 sguelton@redhat.com - 10.0.0-0.4.rc4
3559f5a
- 10.0.0 rc4
3559f5a
9420528
* Thu Mar 05 2020 sguelton@redhat.com - 10.0.0-0.3.rc3
9420528
- 10.0.0 rc3
9420528
ca732f6
* Fri Feb 14 2020 sguelton@redhat.com - 10.0.0-0.1.rc2
ca732f6
- 10.0.0 rc2
ca732f6
45f91b6
* Thu Feb 6 2020 sguelton@redhat.com - 10.0.0-0.2.rc1
45f91b6
- bootstrap off
45f91b6
0674e18
* Fri Jan 31 2020 sguelton@redhat.com - 10.0.0-0.1.rc1
0674e18
- 10.0.0 rc1
0674e18
6dd26b7
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 9.0.1-2
6dd26b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
6dd26b7
db53811
* Thu Jan 16 2020 Tom Stellard <tstellar@redhat.com> - 9.0.1-1
db53811
- 9.0.1 Release
db53811
204afe5
* Thu Jan 16 2020 Tom Stellard <tstellar@redhat.com> - 9.0.0-2
204afe5
- Build with gcc on all arches
204afe5
8561528
* Mon Sep 23 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-1
8561528
- 9.0.0 Release
8561528
e83b273
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.0-1.1
e83b273
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
e83b273
55bec4f
* Wed Mar 20 2019 sguelton@redhat.com - 8.0.0-1
55bec4f
- 8.0.0 final
55bec4f
35ba1aa
* Tue Mar 12 2019 sguelton@redhat.com - 8.0.0-0.4.rc4
35ba1aa
- 8.0.0 Release candidate 4
35ba1aa
cad705e
* Mon Mar 4 2019 sguelton@redhat.com - 8.0.0-0.3.rc3
cad705e
- 8.0.0 Release candidate 3
cad705e
9c40a0a
* Sun Feb 24 2019 sguelton@redhat.com - 8.0.0-0.2.rc2
9c40a0a
- 8.0.0 Release candidate 2
9c40a0a
9c40a0a
* Mon Feb 11 2019 sguelton@redhat.com - 8.0.0-0.1.rc1
014ee2a
- 8.0.0 Release candidate 1
014ee2a
86c937d
* Wed Feb 06 2019 sguelton@redhat.com - 7.0.1-1
86c937d
- 7.0.1 Release
86c937d
7e13c15
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.1-0.2.rc3
7e13c15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
7e13c15
0a654cd
* Mon Dec 10 2018 sguelton@redhat.com - 7.0.1-0.1.rc3
0a654cd
- 7.0.1-rc3 Release
0a654cd
67d065f
* Tue Sep 25 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-1
67d065f
- 7.0.0 Release
67d065f
e1f2263
* Wed Sep 12 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.1.rc3
e1f2263
- 7.0.0-rc3 Release
e1f2263
0fc1123
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.1-2
0fc1123
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
0fc1123
ed82c1a
* Tue Jun 26 2018 Tom Callaway <spot@fedoraproject.org> - 6.0.1-1
ed82c1a
- update to 6.0.1
ed82c1a
d603aee
* Wed Mar 21 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-2
d603aee
- Use default LDFLAGS/CXXFLAGS/CFLAGS and filter out flags not supported by clang
d603aee
d9d8c14
* Wed Mar 14 2018 Tom Callaway <spot@fedoraproject.org> - 6.0.0-1
d9d8c14
- 6.0.0 final
d9d8c14
f431076
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-0.2.rc1
f431076
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f431076
f536e61
* Sat Jan 20 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.1.rc1
f536e61
- 6.0.0-rc1
f536e61
4ee1f9e
* Thu Dec  21 2017 Tom Stellard <tstellar@redhat.com> - 5.0.1-1
4ee1f9e
- 5.0.1 Release
4ee1f9e
2b1d3ec
* Fri Sep  8 2017 Tom Callaway <spot@fedoraproject.org> - 5.0.0-1
2b1d3ec
- update to 5.0.0
2b1d3ec
75b80b1
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-3
75b80b1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
75b80b1
f5494ae
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-2
f5494ae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f5494ae
624e291
* Fri Jun 23 2017 Tom Callaway <spot@fedoraproject.org> - 4.0.1-1
624e291
- update to 4.0.1
624e291
d0d0df8
* Sat Apr 22 2017 Tom Callaway <spot@fedoraproject.org> - 4.0.0-1
d0d0df8
- update to 4.0.0
d0d0df8
d8ba11b
* Wed Mar  8 2017 Tom Callaway <spot@fedoraproject.org> - 3.9.1-1
d8ba11b
- update to 3.9.1
d8ba11b
947aaa0
* Fri Mar  3 2017 Tom Callaway <spot@fedoraproject.org> - 3.9.0-4
947aaa0
- LIBCXX_ENABLE_ABI_LINKER_SCRIPT=ON
947aaa0
5ac45bb
* Wed Mar  1 2017 Tom Callaway <spot@fedoraproject.org> - 3.9.0-3
5ac45bb
- disable bootstrap
5ac45bb
f0aa13e
* Tue Feb 21 2017 Dan Horák <dan[at]danny.cz> - 3.9.0-2
f0aa13e
- apply s390(x) workaround only in Fedora < 26
f0aa13e
f190f97
* Mon Feb 20 2017 Tom Callaway <spot@fedoraproject.org> - 3.9.0-1
f190f97
- update to 3.9.0 (match clang)
f190f97
71d7381
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.8.1-2
71d7381
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
71d7381
39f1942
* Fri Aug 26 2016 Tom Callaway <spot@fedoraproject.org> - 3.8.1-1
39f1942
- update to 3.8.1
39f1942
311df88
* Thu Jun 09 2016 Dan Horák <dan[at]danny.cz> - 3.8.0-4
311df88
- exclude Power only in EPEL
311df88
- default to z10 on s390(x)
311df88
f56b59e
* Thu May 19 2016 Tom Callaway <spot@fedoraproject.org> - 3.8.0-3
f56b59e
- use gcc on el7, fedora < 24. use clang on el6 and f24+
f56b59e
  MAGIC.
f56b59e
- bootstrap on
f56b59e
f56b59e
* Tue May 3 2016 Tom Callaway <spot@fedoraproject.org> - 3.8.0-2
f56b59e
- bootstrap off
f56b59e
f56b59e
* Tue May 3 2016 Tom Callaway <spot@fedoraproject.org> - 3.8.0-1
f56b59e
- initial package
f56b59e
- bootstrap on