%global debug_package %{nil} URL: https://github.com/MCC45TR/uke-linux-hardware-support Source0: uke-libstdcxx-runtime-16.2.1.tar.xz ExclusiveArch: aarch64 BuildRequires: gcc-c++ = 16.2.1-2.fc46.1 BuildRequires: make binutils glibc-devel tzdata BuildRequires: python3 = 3.15.2-1.fc46 Name: uke-libstdcxx-runtime Version: 16.2.1 Release: 16.fc46 License: GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel Summary: Native GNU C++ runtime source build for the Uke package selection Provides: libstdcxx-uke-runtime = 16.2.1-16.fc46 Provides: libstdcxx-uke-runtime%{?_isa} = 16.2.1-16.fc46 Obsoletes: libstdcxx-uke-runtime < 16.2.1-16.fc46 Conflicts: libstdcxx-uke-runtime %description -n uke-libstdcxx-runtime Complete reviewed GCC source and build rules for a standalone native libstdc++. The binary subpackage retains the GNU C++ ABI and excludes optional Python GDB pretty-printers. No compiler or Python tool is installed on the tablet. %package -n uke-libstdcxx Version: 16.2.1 Release: 16.fc46 License: GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel Summary: GNU Standard C++ Library without optional Python GDB helpers Provides: senemos-native-runtime(libstdc++) = 16.2.1-16.fc46 Requires: glibc >= 2.10.90-7 Recommends: tzdata >= 2017c Provides: libstdc++ = 16.2.1-16.fc46 Provides: libstdc++%{?_isa} = 16.2.1-16.fc46 Obsoletes: libstdc++ < 16.2.1-16.fc46 Conflicts: libstdc++ %description -n uke-libstdcxx The native GNU Standard C++ Library, rebuilt from the exact Fedora GCC source. Optional GDB Python printers are outside this target runtime. The source build checks the original versioned symbol set and executes a native C++ smoke test. %prep %setup -q ( mkdir -p "%{_builddir}/uke-libstdcxx-runtime-16.2.1/work/libstdcxx-uke-runtime" cd '%{_builddir}/uke-libstdcxx-runtime-16.2.1/work/libstdcxx-uke-runtime' rm -rf 'gcc-16.2.1-20260819' /usr/bin/rpmuncompress -x '%{_builddir}/uke-libstdcxx-runtime-16.2.1/inputs/libstdcxx-uke-runtime/gcc-16.2.1-20260819.tar.xz' STATUS=$? if [ $STATUS -ne 0 ]; then exit $STATUS fi cd 'gcc-16.2.1-20260819' /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . # The inherited patch changes the shared libtool infrastructure used here. # Remaining Fedora patches affect compilers, other languages or HTML manuals; # the complete original source RPM is retained as Source99 for provenance. echo "Patch #4 (gcc16-libtool-no-rpath.patch):" /usr/bin/patch --no-backup-if-mismatch -f -p0 --fuzz=0 < %{_builddir}/uke-libstdcxx-runtime-16.2.1/inputs/libstdcxx-uke-runtime/gcc16-libtool-no-rpath.patch # GCC's top-level build normally creates this target threading header. cp libgcc/gthr-posix.h libgcc/gthr-default.h cp %{_builddir}/uke-libstdcxx-runtime-16.2.1/inputs/libstdcxx-uke-runtime/LICENSE.Boost LICENSE.Boost sed -n '1,39p' libstdc++-v3/src/c++17/fast_float/fast_float.h > NOTICE.fast-float sed -n '1,17p' libstdc++-v3/src/c++17/ryu/d2s.c > NOTICE.ryu sed -n '1,/^#ifndef/p' libbacktrace/backtrace.h | sed '$d' > NOTICE.libbacktrace ) %build ( cd "%{_builddir}/uke-libstdcxx-runtime-16.2.1/work/libstdcxx-uke-runtime/gcc-16.2.1-20260819" mkdir -p senemos-libstdcxx-build cd senemos-libstdcxx-build export CC=gcc CXX=g++ export CFLAGS="-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer " CXXFLAGS="-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer " LDFLAGS="-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes " ../libstdc++-v3/configure --prefix=/usr --libdir=/usr/lib64 \ --build=aarch64-redhat-linux --host=aarch64-redhat-linux --disable-multilib \ --enable-shared --enable-libstdcxx-threads=yes --enable-libstdcxx-backtrace \ --with-libstdcxx-zoneinfo=/usr/share/zoneinfo --disable-libstdcxx-pch grep -Fx '#define _GLIBCXX_HAS_GTHREADS 1' config.h # A standalone installed compiler would otherwise search its own C++ headers # after these generated headers. Duplicate fenv.h include guards suppress the # system C declarations and make upstream silently replace both std modules # with empty objects. Configure probes use the host compiler normally; only # the actual library build isolates its C++ header search. # Upstream clears MAKEOVERRIDES and forwards CXXFLAGS explicitly. Passing only # CXX at the top level would lose this isolation in recursive module builds. /usr/bin/make -O -j${RPM_BUILD_NCPUS} V=1 VERBOSE=1 CXXFLAGS="$CXXFLAGS -nostdinc++" ) %install ( cd "%{_builddir}/uke-libstdcxx-runtime-16.2.1/work/libstdcxx-uke-runtime/gcc-16.2.1-20260819" # Select the runtime library directly from the real source build. Header, # static-library, documentation and Python debugger targets are not installed. install -Dm755 senemos-libstdcxx-build/src/.libs/libstdc++.so.6.0.36 %{buildroot}/usr/lib64/libstdc++.so.6.0.36 ln -s libstdc++.so.6.0.36 %{buildroot}/usr/lib64/libstdc++.so.6 if find %{buildroot} -type f \( -name '*.py' -o -name '*.pyc' -o -name '*.pyo' \) -print | grep .; then exit 1; fi ) %check ( cd "%{_builddir}/uke-libstdcxx-runtime-16.2.1/work/libstdcxx-uke-runtime/gcc-16.2.1-20260819" cd senemos-libstdcxx-build nm -D --defined-only src/.libs/libstdc++.so.6.0.36 | awk '{print $3}' | grep '@' | LC_ALL=C sort -u > native-symbols.txt LC_ALL=C comm -23 %{_builddir}/uke-libstdcxx-runtime-16.2.1/inputs/libstdcxx-uke-runtime/fedora-exported-symbols.txt native-symbols.txt > missing-symbols.txt test ! -s missing-symbols.txt || { cat missing-symbols.txt; exit 1; } g++ -std=c++23 -O2 %{_builddir}/uke-libstdcxx-runtime-16.2.1/inputs/libstdcxx-uke-runtime/runtime-smoke.cpp -L"$PWD/src/.libs" -pthread -o runtime-smoke LD_LIBRARY_PATH="$PWD/src/.libs" ./runtime-smoke ) %files -n uke-libstdcxx %license work/libstdcxx-uke-runtime/gcc-16.2.1-20260819/COPYING3 work/libstdcxx-uke-runtime/gcc-16.2.1-20260819/COPYING.RUNTIME work/libstdcxx-uke-runtime/gcc-16.2.1-20260819/NOTICE.fast-float work/libstdcxx-uke-runtime/gcc-16.2.1-20260819/NOTICE.ryu work/libstdcxx-uke-runtime/gcc-16.2.1-20260819/NOTICE.libbacktrace work/libstdcxx-uke-runtime/gcc-16.2.1-20260819/LICENSE.Boost /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.0.36 %changelog * Thu Oct 29 2026 Senemos Maintainers <75160848+MCC45TR@users.noreply.github.com> - 16.2.1-16.fc46 - Build this component independently from its reviewed source recipe.