Enable power10 multilib (RHEL-31523)

Resolves: RHEL-31523
Related: RHEL-35602

Fedora 40 commits: 22d78986caa580c2165ecca462a42cc0e37549a3
                   c6129da0b9d734f66e2ed1fae3cf96bcb4d2970a
This commit is contained in:
Arjun Shankar 2024-06-07 15:39:03 +02:00
parent b46c1c0b2e
commit 080993e7ad

View File

@ -61,6 +61,13 @@
%endif
%endif
# Build the POWER10 multilib.
%ifarch ppc64le
%define buildpower10 1
%else
%define buildpower10 0
%endif
%if %{with bootstrap}
# Disable benchtests, -Werror, docs, and valgrind if we're bootstrapping
%undefine with_benchtests
@ -163,7 +170,7 @@ Version: %{glibcversion}
# - It allows using the Release number without the %%dist tag in the dependency
# generator to make the generated requires interchangeable between Rawhide
# and ELN (.elnYY < .fcXX).
%global baserelease 9
%global baserelease 10
Release: %{baserelease}%{?dist}
# Licenses:
@ -1398,6 +1405,17 @@ build build-%{target} \
%endif
#
# POWER10 build variant.
%if %{buildpower10}
build build-%{target}-power10 \
CC="gcc $glibc_flags_cc" \
CXX="g++ $glibc_flags_cc" \
CFLAGS="$glibc_flags_cflags" \
--with-cpu=power10 \
#
%endif
##############################################################################
# Install glibc...
##############################################################################
@ -1476,23 +1494,28 @@ install_different()
mkdir -p "$destdir"
mkdir -p "$libdestdir"
# Walk all of the libraries we installed...
for lib in libc math/libm nptl/libpthread rt/librt nptl_db/libthread_db
for lib in libc math/libm
do
libbase=${lib#*/}
# Take care that `libbaseso' has a * that needs expanding so
# take care with quoting.
libbaseso=$(basename %{glibc_sysroot}/%{_lib}/${libbase}-*.so)
libbaseso=$(basename %{glibc_sysroot}/%{_lib}/${libbase}.so.*)
# Only install if different from default build library.
if cmp -s ${lib}.so ../build-%{target}/${lib}.so; then
ln -sf "$subdir_up"/$libbaseso $libdestdir/$libbaseso
else
cp -a ${lib}.so $libdestdir/$libbaseso
fi
dlib=$libdestdir/$(basename %{glibc_sysroot}/%{_lib}/${libbase}.so.*)
ln -sf $libbaseso $dlib
done
}
%if %{buildpower10}
pushd build-%{target}-power10
install_different "$RPM_BUILD_ROOT/%{_libdir}/glibc-hwcaps" power10 ..
popd
%endif
##############################################################################
# Remove the files we don't want to distribute
##############################################################################
@ -2224,6 +2247,16 @@ pushd build-%{target}
run_tests
popd
%if %{buildpower10}
# Run this test only if the server supports Power10 instructions.
if LD_SHOW_AUXV=1 /bin/true | grep -E "AT_HWCAP2:[^$]*arch_3_1" > /dev/null; then
echo ====================TESTING -mcpu=power10=============
pushd build-%{target}-power10
run_tests
popd
fi
%endif
echo ====================TESTING END=====================
PLTCMD='/^Relocation section .*\(\.rela\?\.plt\|\.rela\.IA_64\.pltoff\)/,/^$/p'
echo ====================PLT RELOCS LD.SO================
@ -2445,6 +2478,9 @@ update_gconv_modules_cache ()
%files -f glibc.filelist
%dir %{_prefix}/%{_lib}/audit
%if %{buildpower10}
%dir /%{_libdir}/glibc-hwcaps/power10
%endif
%verify(not md5 size mtime) %config(noreplace) /etc/ld.so.conf
%verify(not md5 size mtime) %config(noreplace) /etc/rpc
%dir /etc/ld.so.conf.d
@ -2520,6 +2556,9 @@ update_gconv_modules_cache ()
%endif
%changelog
* Fri May 03 2024 Florian Weimer <fweimer@redhat.com> - 2.39-10
- Build POWER10 multilib
* Fri Apr 26 2024 Florian Weimer <fweimer@redhat.com> - 2.39-9
- nscd is currently not build, so the security fixes below are not relevant.
- Sync with upstream branch release/2.39/master,