From 479e2569a0dd75d41265bf132178af16fa2c1b10 Mon Sep 17 00:00:00 2001 From: Ben Cressey Date: Mon, 11 Nov 2024 20:01:23 +0000 Subject: [PATCH] libgcc: add libstdc++ subpackage Make the libstdc++ library from the SDK available to packages as a runtime dependency. Signed-off-by: Ben Cressey --- packages/libgcc/libgcc.spec | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/libgcc/libgcc.spec b/packages/libgcc/libgcc.spec index 2f58e5b67..cd6018e27 100644 --- a/packages/libgcc/libgcc.spec +++ b/packages/libgcc/libgcc.spec @@ -1,5 +1,5 @@ -# This is a wrapper package that vends a pre-built shared library from -# the SDK, allowing it to be loaded at runtime. It also lets us extract +# This is a wrapper package that vends pre-built shared libraries from +# the SDK, allowing them to be loaded at runtime. It also lets us extract # debuginfo in the usual way. %undefine _debugsource_packages @@ -14,20 +14,37 @@ URL: https://gcc.gnu.org/ %description %{summary}. +%package -n %{_cross_os}libstdc++ +Summary: GCC C++ standard library +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Requires: %{_cross_os}libgcc + +%description -n %{_cross_os}libstdc++ +%{summary}. + %prep %setup -T -c cp %{_cross_licensedir}/gcc/COPYING{3,.RUNTIME} . %build install -p -m0755 %{_cross_libdir}/libgcc_s.so.1 . +install -p -m0755 %{_cross_libdir}/libstdc++.so.6.* . %install mkdir -p %{buildroot}%{_cross_libdir} install -p -m0755 libgcc_s.so.1 %{buildroot}%{_cross_libdir} +install -p -m0755 libstdc++.so.6.* %{buildroot}%{_cross_libdir} +for lib in $(find %{buildroot}%{_cross_libdir} -name 'libstdc++.so.6.*') ; do + ln -s "${lib##*/}" %{buildroot}%{_cross_libdir}/libstdc++.so.6 +done %files %license COPYING3 COPYING.RUNTIME %{_cross_attribution_file} %{_cross_libdir}/libgcc_s.so.1 +%files -n %{_cross_os}libstdc++ +%{_cross_libdir}/libstdc++.so.6 +%{_cross_libdir}/libstdc++.so.6.* + %changelog