| |
@@ -4,7 +4,7 @@
|
| |
%global gcc_major 10
|
| |
# Note, gcc_release must be integer, if you want to add suffixes to
|
| |
# %%{release}, append them after %%{gcc_release} on Release: line.
|
| |
- %global gcc_release 0.8
|
| |
+ %global gcc_release 0.9
|
| |
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
|
| |
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
|
| |
%global _unpackaged_files_terminate_build 0
|
| |
@@ -244,6 +244,8 @@
|
| |
%endif
|
| |
Requires: libgcc >= %{version}-%{release}
|
| |
Requires: libgomp = %{version}-%{release}
|
| |
+ Requires(post): %{_sbindir}/alternatives
|
| |
+ Requires(preun): %{_sbindir}/alternatives
|
| |
%if !%{build_ada}
|
| |
Obsoletes: gcc-gnat < %{version}-%{release}
|
| |
%endif
|
| |
@@ -338,6 +340,8 @@
|
| |
Provides: gcc-g++ = %{version}-%{release}
|
| |
Provides: g++ = %{version}-%{release}
|
| |
Autoreq: true
|
| |
+ Requires(post): %{_sbindir}/alternatives
|
| |
+ Requires(preun): %{_sbindir}/alternatives
|
| |
|
| |
%description c++
|
| |
This package adds C++ support to the GNU Compiler Collection.
|
| |
@@ -1906,6 +1910,12 @@
|
| |
# Help plugins find out nvra.
|
| |
echo gcc-%{version}-%{release}.%{_arch} > $FULLPATH/rpmver
|
| |
|
| |
+ for f in cc c++; do
|
| |
+ rm %{buildroot}%{_bindir}/$f
|
| |
+ touch %{buildroot}%{_bindir}/$f
|
| |
+ done
|
| |
+
|
| |
+
|
| |
%check
|
| |
cd obj-%{gcc_target_platform}
|
| |
|
| |
@@ -1927,6 +1937,12 @@
|
| |
| uuencode testlogs-%{_target_platform}.tar.xz || :
|
| |
rm -rf testlogs-%{_target_platform}-%{version}-%{release}
|
| |
|
| |
+ %post
|
| |
+ %{_sbindir}/update-alternatives --install %{_bindir}/cc cc %{_bindir}/gcc 50
|
| |
+
|
| |
+ %post c++
|
| |
+ %{_sbindir}/update-alternatives --install %{_bindir}/c++ c++ %{_bindir}/g++ 50
|
| |
+
|
| |
%post go
|
| |
%{_sbindir}/update-alternatives --install \
|
| |
%{_prefix}/bin/go go %{_prefix}/bin/go.gcc 92 \
|
| |
@@ -1950,6 +1966,16 @@
|
| |
end
|
| |
end
|
| |
|
| |
+ %postun
|
| |
+ if [ $1 -eq 0 ] ; then
|
| |
+ %{_sbindir}/update-alternatives --remove cc %{_bindir}/gcc
|
| |
+ fi
|
| |
+
|
| |
+ %postun c++
|
| |
+ if [ $1 -eq 0 ] ; then
|
| |
+ %{_sbindir}/update-alternatives --remove c++ %{_bindir}/g++
|
| |
+ fi
|
| |
+
|
| |
%postun -n libgcc -p <lua>
|
| |
if posix.access ("/sbin/ldconfig", "x") then
|
| |
local pid = posix.fork ()
|
| |
@@ -1993,7 +2019,7 @@
|
| |
%ldconfig_scriptlets -n libgo
|
| |
|
| |
%files -f %{name}.lang
|
| |
- %{_prefix}/bin/cc
|
| |
+ %ghost %{_prefix}/bin/cc
|
| |
%{_prefix}/bin/c89
|
| |
%{_prefix}/bin/c99
|
| |
%{_prefix}/bin/gcc
|
| |
@@ -2331,7 +2357,7 @@
|
| |
%files c++
|
| |
%{_prefix}/bin/%{gcc_target_platform}-*++
|
| |
%{_prefix}/bin/g++
|
| |
- %{_prefix}/bin/c++
|
| |
+ %ghost %{_prefix}/bin/c++
|
| |
%{_mandir}/man1/g++.1*
|
| |
%dir %{_prefix}/lib/gcc
|
| |
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
|
| |
@@ -3003,6 +3029,10 @@
|
| |
%endif
|
| |
|
| |
%changelog
|
| |
+ * Mon Feb 24 2020 Tom Stellard <tstellar@redhat.com> 10.0.1-0.9
|
| |
+ - Manage /usr/bin/cc with update-alternatives
|
| |
+ - https://fedoraproject.org/wiki/Changes/Use-Update-Alternatives-For-usr-bin-cc
|
| |
+
|
| |
* Sun Feb 16 2020 Jakub Jelinek <jakub@redhat.com> 10.0.1-0.8
|
| |
- update from trunk
|
| |
- PRs analyzer/93212, analyzer/93288, analyzer/93350, analyzer/93356,
|
| |
https://fedoraproject.org/wiki/Changes/Use-Update-Alternatives-For-usr-bin-cc