commit:     78cd431b62a02ca951200937750ec24d47a3185a
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed May 20 07:25:24 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed May 20 07:26:10 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78cd431b

sys-libs/newlib: don't use c++ _nano libs, bug #723756

Gentoo's and upstream gccs don't install _nano variants of stdc++ and supc++.

Let's not refer to them in nano specs of newlib until we do
(or better yet upstream does) have these libraries.

Reported-by: David Flogeras
Closes: https://bugs.gentoo.org/723756
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 .../newlib/files/newlib-3.3.0-no-nano-cxx.patch    | 29 ++++++++++++++++++++++
 .../{newlib-9999.ebuild => newlib-3.3.0-r1.ebuild} |  4 +++
 sys-libs/newlib/newlib-9999.ebuild                 |  4 +++
 3 files changed, 37 insertions(+)

diff --git a/sys-libs/newlib/files/newlib-3.3.0-no-nano-cxx.patch 
b/sys-libs/newlib/files/newlib-3.3.0-no-nano-cxx.patch
new file mode 100644
index 00000000000..58068ad2d22
--- /dev/null
+++ b/sys-libs/newlib/files/newlib-3.3.0-no-nano-cxx.patch
@@ -0,0 +1,29 @@
+Gentoo's and upstream gccs don't install _nano variants of stdc++ and supc++.
+
+Let's not refer to them in nano specs of newlib until we do
+(or better yet upstream does) have these libraries.
+
+Reported-by: David Flogeras
+Bug: https://bugs.gentoo.org/723756
+--- a/libgloss/arc/nano.specs
++++ b/libgloss/arc/nano.specs
+@@ -11,7 +11,7 @@
+ %(nano_link_gcc_c_sequence) --start-group %G %(nano_libc) %(nano_libgloss) 
--end-group
+ 
+ *link:
+-%(nano_link) %:replace-outfile(-lc -lc_nano) %:replace-outfile(-lg -lg_nano) 
%:replace-outfile(-lstdc++ -lstdc++_nano) %:replace-outfile(-lsupc++ 
-lsupc++_nano)
++%(nano_link) %:replace-outfile(-lc -lc_nano) %:replace-outfile(-lg -lg_nano)
+ 
+ *lib:
+ %{!shared:%{g*:-lg_nano} %{!p:%{!pg:-lc_nano}}%{p:-lc_p}%{pg:-lc_p}}
+--- a/libgloss/arm/elf-nano.specs
++++ b/libgloss/arm/elf-nano.specs
+@@ -15,7 +15,7 @@
+ %(nano_link_gcc_c_sequence) --start-group %G %(nano_libc) %(nano_libgloss) 
--end-group
+ 
+ *link:
+-%(nano_link) %:replace-outfile(-lc -lc_nano) %:replace-outfile(-lg -lg_nano) 
%:replace-outfile(-lrdimon -lrdimon_nano) %:replace-outfile(-lstdc++ 
-lstdc++_nano) %:replace-outfile(-lsupc++ -lsupc++_nano)
++%(nano_link) %:replace-outfile(-lc -lc_nano) %:replace-outfile(-lg -lg_nano) 
%:replace-outfile(-lrdimon -lrdimon_nano)
+ 
+ *lib:
+ %{!shared:%{g*:-lg_nano} %{!p:%{!pg:-lc_nano}}%{p:-lc_p}%{pg:-lc_p}}

diff --git a/sys-libs/newlib/newlib-9999.ebuild 
b/sys-libs/newlib/newlib-3.3.0-r1.ebuild
similarity index 98%
copy from sys-libs/newlib/newlib-9999.ebuild
copy to sys-libs/newlib/newlib-3.3.0-r1.ebuild
index 6362c1259bd..bd8e3d1de3f 100644
--- a/sys-libs/newlib/newlib-9999.ebuild
+++ b/sys-libs/newlib/newlib-3.3.0-r1.ebuild
@@ -29,6 +29,10 @@ SLOT="0"
 IUSE="nls threads unicode headers-only nano"
 RESTRICT="strip"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-3.3.0-no-nano-cxx.patch
+)
+
 NEWLIBBUILD="${WORKDIR}/build"
 NEWLIBNANOBUILD="${WORKDIR}/build.nano"
 NEWLIBNANOTMPINSTALL="${WORKDIR}/nano_tmp_install"

diff --git a/sys-libs/newlib/newlib-9999.ebuild 
b/sys-libs/newlib/newlib-9999.ebuild
index 6362c1259bd..bd8e3d1de3f 100644
--- a/sys-libs/newlib/newlib-9999.ebuild
+++ b/sys-libs/newlib/newlib-9999.ebuild
@@ -29,6 +29,10 @@ SLOT="0"
 IUSE="nls threads unicode headers-only nano"
 RESTRICT="strip"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-3.3.0-no-nano-cxx.patch
+)
+
 NEWLIBBUILD="${WORKDIR}/build"
 NEWLIBNANOBUILD="${WORKDIR}/build.nano"
 NEWLIBNANOTMPINSTALL="${WORKDIR}/nano_tmp_install"

Reply via email to