#95 Enable POWER10 multilibs (f40)
Merged 6 days ago by fweimer. Opened 20 days ago by fweimer.
rpms/ fweimer/glibc f40-power10  into  f40

file modified
+190 -127
@@ -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
@@ -69,16 +76,8 @@ 

  %undefine with_valgrind

  %endif

  

- # The annobin annotations cause binutils to produce broken ARM EABI

- # unwinding information.  Symptom is a hang/test failure for

- # malloc/tst-malloc-stats-cancellation.  See

- # <https://bugzilla.redhat.com/show_bug.cgi?id=1951492>.

- %ifarch armv7hl

- %undefine _annotated_build

- %endif

- 

  # We do our own build flags management.  In particular, see

- # rpm_inherit_flags below.

+ # glibc_shell_* below.

  %undefine _auto_set_build_flags

  

  ##############################################################################
@@ -171,7 +170,7 @@ 

  # - 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:
@@ -238,6 +237,36 @@ 

  # Include in the source RPM for reference.

  Source12: ChangeLog.old

  

+ # ABI-specific program interpreter name.  Used for debuginfo

+ # extraction (wrap-find-debuginfo.sh) and smoke testing ($run_ldso below).

+ %ifarch %{ix86}

+ %global glibc_ldso /lib/ld-linux.so.2

+ %endif

+ %ifarch aarch64

+ %global glibc_ldso /lib/ld-linux-aarch64.so.1

+ %endif

+ %ifarch ppc

+ %global glibc_ldso /lib/ld.so.1

+ %endif

+ %ifarch ppc64

+ %global glibc_ldso /lib64/ld64.so.1

+ %endif

+ %ifarch ppc64le

+ %global glibc_ldso /lib64/ld64.so.2

+ %endif

+ %ifarch riscv64

+ %global glibc_ldso /lib/ld-linux-riscv64-lp64d.so.1

+ %endif

+ %ifarch s390

+ %global glibc_ldso /lib/ld.so.1

+ %endif

+ %ifarch s390x

+ %global glibc_ldso /lib/ld64.so.1

+ %endif

+ %ifarch x86_64 x86_64_v2 x86_64_v3 x86_64_v4

+ %global glibc_ldso /lib64/ld-linux-x86-64.so.2

+ %endif

+ 

  ######################################################################

  # Activate the wrapper script for debuginfo generation, by rewriting

  # the definition of __debug_install_post.
@@ -249,7 +278,7 @@ 

  -- Avoid embedded newlines that confuse the macro definition.

  original = original:match("^%s*(.-)%s*$"):gsub("\\\n", "")

  rpm.define("__debug_install_post bash " .. wrapper

-   .. " " .. sysroot .. " " .. original)

+   .. " " .. sysroot .. " %{glibc_ldso} " .. original)

  }

  

  # sysroot package support.  These contain arch-specific packages, so
@@ -389,10 +418,7 @@ 

  BuildRequires: gcc >= 7.2.1-6

  %global enablekernel 3.2

  Conflicts: kernel < %{enablekernel}

- %global target %{_target_cpu}-redhat-linux

- %ifarch %{arm}

- %global target %{_target_cpu}-redhat-linuxeabi

- %endif

+ %define target %{_target_cpu}-redhat-linux

  %ifarch ppc64le

  %global target ppc64le-redhat-linux

  %endif
@@ -1192,78 +1218,97 @@ 

  cat /proc/meminfo

  df

  

- # We build using the native system compilers.

- GCC=gcc

- GXX=g++

- 

- # Part of rpm_inherit_flags.  Is overridden below.

- rpm_append_flag ()

- {

-     BuildFlags="$BuildFlags $*"

- }

- 

- # Propagates the listed flags to rpm_append_flag if supplied by

- # redhat-rpm-config.

- BuildFlags="-O2 -g"

- rpm_inherit_flags ()

- {

- 	local reference=" $* "

- 	local flag

- 	for flag in $RPM_OPT_FLAGS $RPM_LD_FLAGS ; do

- 		if echo "$reference" | grep -q -F " $flag " ; then

- 			rpm_append_flag "$flag"

- 		fi

- 	done

- }

- 

  # Propgate select compiler flags from redhat-rpm-config.  These flags

  # are target-dependent, so we use only those which are specified in

  # redhat-rpm-config.  We keep the -m32/-m32/-m64 flags to support

  # multilib builds.

- #

- # Note: For building alternative run-times, care is required to avoid

- # overriding the architecture flags which go into CC/CXX.  The flags

- # below are passed in CFLAGS.

- 

- rpm_inherit_flags \

- 	"-Wp,-D_GLIBCXX_ASSERTIONS" \

- 	"-fasynchronous-unwind-tables" \

- 	"-fstack-clash-protection" \

- 	"-fno-omit-frame-pointer" \

- 	"-funwind-tables" \

- 	"-m31" \

- 	"-m32" \

- 	"-m64" \

- 	"-march=armv8-a+lse" \

- 	"-march=armv8.1-a" \

- 	"-march=haswell" \

- 	"-march=i686" \

- 	"-march=x86-64" \

- 	"-march=x86-64-v2" \

- 	"-march=x86-64-v3" \

- 	"-march=x86-64-v4" \

- 	"-march=z13" \

- 	"-march=z14" \

- 	"-march=z15" \

- 	"-march=zEC12" \

- 	"-mbackchain" \

- 	"-mbranch-protection=standard" \

- 	"-mcpu=power10" \

- 	"-mcpu=power8" \

- 	"-mcpu=power9" \

- 	"-mfpmath=sse" \

- 	"-mno-omit-leaf-frame-pointer" \

- 	"-msse2" \

- 	"-mstackrealign" \

- 	"-mtune=generic" \

- 	"-mtune=power10" \

- 	"-mtune=power8" \

- 	"-mtune=power9" \

- 	"-mtune=z13" \

- 	"-mtune=z14" \

- 	"-mtune=z15" \

- 	"-mtune=zEC12" \

- 	"-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" \

+ 

+ %{lua:

+ -- Split the string argument into keys of an associate array.

+ -- The values are set to true.

+ local function string_to_array(s)

+     local result = {}

+     for e in string.gmatch(s, "%S+") do

+         result[e] = true

+     end

+     return result

+ end

+ 

+ local inherit_flags = {}

+ 

+ -- These flags are put into the CC and CXX arguments to configure.

+ -- Alternate builds do not use the flags listed here, only the main build does.

+ inherit_flags.cc_main = string_to_array [[

+ -march=armv8-a+lse

+ -march=armv8.1-a

+ -march=haswell

+ -march=i686

+ -march=x86-64

+ -march=x86-64-v2

+ -march=x86-64-v3

+ -march=x86-64-v4

+ -march=z13

+ -march=z14

+ -march=z15

+ -march=zEC12

+ -mcpu=power10

+ -mcpu=power8

+ -mcpu=power9

+ -mtune=generic

+ -mtune=power10

+ -mtune=power8

+ -mtune=power9

+ -mtune=z13

+ -mtune=z14

+ -mtune=z15

+ -mtune=zEC12

+ ]]

+ 

+ -- Like inherit_flags_cc_main, but also used for alternate builds.

+ inherit_flags.cc = string_to_array [[

+ -m31

+ -m32

+ -m64

+ ]]

+ 

+ -- These flags are passed through CFLAGS and CXXFLAGS.

+ inherit_flags.cflags = string_to_array [[

+ -O2

+ -O3

+ -Wall

+ -Wp,-D_GLIBCXX_ASSERTIONS

+ -fasynchronous-unwind-tables

+ -fno-omit-frame-pointer

+ -fstack-clash-protection

+ -funwind-tables

+ -g

+ -mbackchain

+ -mbranch-protection=standard

+ -mfpmath=sse

+ -mno-omit-leaf-frame-pointer

+ -msse2

+ -mstackrealign

+ -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1

+ ]]

+ 

+ -- Iterate over the build_cflags RPM variable and emit a shell

+ -- variable that contains the inherited flags of the indicated variant.

+ local function shell_build_flags(variant)

+     local result = {}

+     local inherit = assert(inherit_flags[variant])

+     for f in string.gmatch(rpm.expand("%build_cflags"), "%S+") do

+         if inherit[f] then

+ 	    result[#result + 1] = f

+ 	end

+     end

+     print("glibc_flags_" .. variant .. "=\"" .. table.concat(result, " ")

+           .. "\"\n")

+ end

+ 

+ shell_build_flags('cc_main') -- Set $glibc_flags_cc_main.

+ shell_build_flags('cc') -- Set $glibc_flags_cc.

+ shell_build_flags('cflags') -- Set $glibc_flags_cflags.

+ }

  

  %if 0%{?_annotated_build} > 0

  # libc_nonshared.a cannot be built with the default hardening flags
@@ -1285,34 +1330,29 @@ 

  # %%build - Generic options.

  ##############################################################################

  EnableKernel="--enable-kernel=%{enablekernel}"

- # Save the used compiler and options into the file "Gcc" for use later

- # by %%install.

- echo "$GCC" > Gcc

  

  ##############################################################################

  # build()

- #	Build glibc in `build-%{target}$1', passing the rest of the arguments

- #	as CFLAGS to the build (not the same as configure CFLAGS). Several

+ #	Build glibc in the directory $1, passing the rest of the arguments

+ #	as additional configure arguments.  Several

  #	global values are used to determine build flags, kernel version,

  #	system tap support, etc.

  ##############################################################################

  build()

  {

- 	local builddir=build-%{target}${1:+-$1}

- 	${1+shift}

+ 	local builddir=$1

+ 	shift

  	rm -rf $builddir

  	mkdir $builddir

  	pushd $builddir

- 	../configure CC="$GCC" CXX="$GXX" CFLAGS="$BuildFlags $*" \

+ 	../configure "$@" \

  		--prefix=%{_prefix} \

  		--with-headers=%{_prefix}/include $EnableKernel \

  		--with-nonshared-cflags="$BuildFlagsNonshared" \

  		--enable-bind-now \

  		--build=%{target} \

- 		${configure_host} \

  		--enable-stack-protector=strong \

  		--enable-systemtap \

- 		${core_with_options} \

  %ifarch %{ix86}

  		--disable-multi-arch \

  %endif
@@ -1347,17 +1387,34 @@ 

  

  %ifarch x86_64

  # Build for the glibc32 package.

- GCC="$GCC -m32" GXX="$GXX -m32" BuildFlags="${BuildFlags/-m64/-m32}" configure_host="--host=i686-linux-gnu" build 32

+ build build-%{target}-32 \

+   CC="gcc -m32" \

+   CXX="g++ -m32" \

+   CFLAGS="${glibc_flags_cflags/-m64/-m32}" \

+   --host=i686-linux-gnu \

+ #

  %endif

  

- configure_host=""

- 

+ # Default set of compiler options.

+ build build-%{target} \

+   CC="gcc $glibc_flags_cc $glibc_flags_cc_main" \

+   CXX="g++ $glibc_flags_cc $glibc_flags_cc_main" \

+   CFLAGS="$glibc_flags_cflags" \

  %ifarch x86_64

- configure_host="--enable-cet"

+   --enable-cet \

+ %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

  

- # Default set of compiler options.

- build

  

  ##############################################################################

  # Install glibc...
@@ -1373,9 +1430,6 @@ 

  # Remove existing file lists.

  find . -type f -name '*.filelist' -exec rm -rf {} \;

  

- # Reload compiler and build options that were used during %%build.

- GCC=`cat Gcc`

- 

  %ifarch riscv64

  # RISC-V ABI wants to install everything in /lib64/lp64d or /usr/lib64/lp64d.

  # Make these be symlinks to /lib64 or /usr/lib64 respectively.  See:
@@ -1440,23 +1494,28 @@ 

  	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

  ##############################################################################
@@ -2188,6 +2247,16 @@ 

  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================
@@ -2196,19 +2265,7 @@ 

  readelf -Wr %{glibc_sysroot}/%{_lib}/libc-*.so | sed -n -e "$PLTCMD"

  echo ====================PLT RELOCS END==================

  

- # Obtain a way to run the dynamic loader.  Avoid matching the symbolic

- # link and then pick the first loader (although there should be only

- # one).  Use -maxdepth 2 to avoid descending into the /sys-root/

- # sub-tree.  See wrap-find-debuginfo.sh.

- %ifarch x86_64

- # Hardcode the patch to avoid picking up the 32-bit dynamic linker from

- # glibc32; both 32-bit and 64-bit dynamic linkers will be present.

- ldso_path="%{glibc_sysroot}/lib64/ld-linux-x86-64.so.2"

- %else

- ldso_path="$(find %{glibc_sysroot}/ -maxdepth 2 -regextype posix-extended \

-   -regex '.*/ld(-.*|64|)\.so\.[0-9]+$' -type f | LC_ALL=C sort | head -n1)"

- %endif

- run_ldso="$ldso_path --library-path %{glibc_sysroot}/%{_lib}"

+ run_ldso="%{glibc_sysroot}/%{glibc_ldso} --library-path %{glibc_sysroot}/%{_lib}"

  

  # Show the auxiliary vector as seen by the new library

  # (even if we do not perform the valgrind test).
@@ -2239,13 +2296,11 @@ 

    error("FATAL: kernel too old", 0)

  end

  

- %post -p <lua>

- %glibc_post_funcs

  -- (1) Remove multilib libraries from previous installs.

  -- In order to support in-place upgrades, we must immediately remove

- -- obsolete platform directories after installing a new glibc

+ -- all platform directories before installing a new glibc

  -- version.  RPM only deletes files removed by updates near the end

- -- of the transaction.  If we did not remove the obsolete platform

+ -- of the transaction.  If we did not remove all platform

  -- directories here, they may be preferred by the dynamic linker

  -- during the execution of subsequent RPM scriptlets, likely

  -- resulting in process startup failures.
@@ -2318,7 +2373,9 @@ 

    end

  end

  

- -- (2) Update /etc/ld.so.conf

+ %post -p <lua>

+ %glibc_post_funcs

+ -- (1) Update /etc/ld.so.conf

  -- Next we update /etc/ld.so.conf to ensure that it starts with

  -- a literal "include ld.so.conf.d/*.conf".

  
@@ -2357,14 +2414,14 @@ 

    end

  end

  

- -- (3) Rebuild ld.so.cache early.

+ -- (2) Rebuild ld.so.cache early.

  -- If the format of the cache changes then we need to rebuild

  -- the cache early to avoid any problems running binaries with

  -- the new glibc.

  

  call_ldconfig()

  

- -- (4) Update gconv modules cache.

+ -- (3) Update gconv modules cache.

  -- If the /usr/lib/gconv/gconv-modules.cache exists, then update it

  -- with the latest set of modules that were just installed.

  -- We assume that the cache is in _libdir/gconv and called
@@ -2372,7 +2429,7 @@ 

  

  update_gconv_modules_cache()

  

- -- (5) On upgrades, restart systemd if installed.  "systemctl -q" does

+ -- (4) On upgrades, restart systemd if installed.  "systemctl -q" does

  -- not suppress the error message (which is common in chroots), so

  -- open-code rpm.execute with standard error suppressed.

  if tonumber(arg[2]) >= 2
@@ -2421,6 +2478,9 @@ 

  

  %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
@@ -2496,6 +2556,9 @@ 

  %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,

file modified
+50 -59
@@ -18,7 +18,13 @@ 

  workdir="$(mktemp -d -t find_debuginfo.XXXXXX)"

  

  ldso_tmp="$workdir/ld.so"

- libc_tmp="$workdir/libc.so"

+ libc_tmp_dir="$workdir/"

+ 

+ # Return the path where a libc should be saved temporarily. This path is

+ # based on its original path received in $1.

+ libc_tmp_path() {

+     echo "$libc_tmp_dir"`dirname "$1"`"/libc.so"

+ }

  

  # Prefer a separately installed debugedit over the RPM-integrated one.

  if command -v debugedit >/dev/null ; then
@@ -34,64 +40,65 @@ 

  

  sysroot_path="$1"

  shift

+ # Resolve symbolic link, so that the activities below only alter the

+ # file it points to.

+ ldso_path="$(readlink -f "$sysroot_path/$1")"

+ shift

  script_path="$1"

  shift

  

- # See ldso_path setting in glibc.spec.

- ldso_path=

- for ldso_candidate in `find "$sysroot_path" -maxdepth 2 \

-   -regextype posix-extended -regex '.*/ld(-.*|64|)\.so\.[0-9]+$' -type f` ; do

-     if test -z "$ldso_path" ; then

- 	ldso_path="$ldso_candidate"

-     elif [ -f "$sysroot_path/lib64/ld-linux-x86-64.so.2" ] && [ -f "$sysroot_path/lib/ld-linux.so.2" ]; then

- 	# x86_64 with 32-bit libc built for glibc32 as well.  Finding

- 	# multiple dynamic linkers is expected, not a bug; ensure the

- 	# 64-bit one is used.

- 	ldso_path="$sysroot_path/lib64/ld-linux-x86-64.so.2"

-     else

- 	echo "error: multiple ld.so candidates: $ldso_path, $ldso_candidate"

- 	exit 1

-     fi

- done

- 

  # libc.so.6 always uses this name, so it is simpler to locate.

- libc_path=

- for libc_candidate in `find "$sysroot_path" -maxdepth 2 -name libc.so.6`; do

-     if test -z "$libc_path" ; then

- 	libc_path="$libc_candidate"

-     elif [ -f "$sysroot_path/lib64/ld-linux-x86-64.so.2" ] && [ -f "$sysroot_path/lib/ld-linux.so.2" ]; then

- 	# x86_64 with 32-bit libc built for glibc32 as well.  The test

- 	# here uses ld.so paths, not libc paths, to ensure it doesn't

- 	# apply on any other architecture.

- 	libc_path="$sysroot_path/lib64/libc.so.6"

-     else

- 	echo "error: multiple libc.so.6 candidates: $libc_path, $libc_candidate"

- 	exit 1

-     fi

- done

+ # This can result in multiple paths, hence the loop below.

+ libc_path=`find "$sysroot_path" -name libc.so.6`

  

  

  # Preserve the original files.

  cp "$ldso_path" "$ldso_tmp"

- cp "$libc_path" "$libc_tmp"

+ for lib in $libc_path ; do

+     libtmp=`libc_tmp_path $lib`

+     mkdir -p `dirname "$libtmp"`

+     cp "$lib" "$libtmp"

+ done

  

  # Run the debuginfo extraction.

  "$script_path" "$@"

  

- # libc.so.6: Extract the .gnu_debuglink section

- objcopy -j.gnu_debuglink --set-section-flags .gnu_debuglink=alloc \

-   -O binary "$libc_path" "$libc_tmp.debuglink"

+ for lib in $libc_path ; do

+     libtmp=`libc_tmp_path "$lib"`

+     # libc.so.6: Extract the .gnu_debuglink section

+     objcopy -j.gnu_debuglink --set-section-flags .gnu_debuglink=alloc \

+         -O binary "$lib" "$libtmp.debuglink"

+     # Restore the original files.

+     cp "$libtmp" "$lib"

+ 

+     # Reduce the size of libc notes.  Primarily for annobin.

+     objcopy --merge-notes "$lib"

+ 

+     # libc.so.6: Restore the .gnu_debuglink section

+     objcopy --add-section .gnu_debuglink="$libtmp.debuglink" "$lib"

+ 

+     # libc.so.6: Reduce to valuable symbols.  Eliminate file symbols,

+     # annobin symbols, and symbols used by the glibc build to implement

+     # hidden aliases (__EI_*).  We would also like to remove __GI_*

+     # symbols, but even listing them explicitly (as in -K __GI_strlen)

+     # still causes strip to remove them, so there is no filtering of

+     # __GI_* here.  (Debuginfo is gone after this, so no need to optimize

+     # it.)

+     strip -w \

+           -K '*' \

+           -K '!*.c' \

+           -K '!*.os' \

+           -K '!.annobin_*' \

+           -K '!__EI_*' \

+           -K '!__PRETTY_FUNCTION__*' \

+           "$lib"

+ done

  

- # Restore the original files.

+ # Restore the original ld.so.

  cp "$ldso_tmp" "$ldso_path"

- cp "$libc_tmp" "$libc_path"

  

  # Reduce the size of notes.  Primarily for annobin.

  objcopy --merge-notes "$ldso_path"

- objcopy --merge-notes "$libc_path"

- 

- # libc.so.6: Restore the .gnu_debuglink section

- objcopy --add-section .gnu_debuglink="$libc_tmp.debuglink" "$libc_path"

  

  # ld.so does not have separated debuginfo and so the debuginfo file

  # generated by find-debuginfo is redundant.  Therefore, remove it.
@@ -108,22 +115,6 @@ 

  done

  rm -f "$ldso_debug"

  

- # libc.so.6: Reduce to valuable symbols.  Eliminate file symbols,

- # annobin symbols, and symbols used by the glibc build to implement

- # hidden aliases (__EI_*).  We would also like to remove __GI_*

- # symbols, but even listing them explicitly (as in -K __GI_strlen)

- # still causes strip to remove them, so there is no filtering of

- # __GI_* here.  (Debuginfo is gone after this, so no need to optimize

- # it.)

- strip -w \

-     -K '*' \

-     -K '!*.c' \

-     -K '!*.os' \

-     -K '!.annobin_*' \

-     -K '!__EI_*' \

-     -K '!__PRETTY_FUNCTION__*' \

-     "$libc_path"

- 

  # ld.so: Rewrite the source file paths to match the extracted

  # locations.  First compute the arguments for invoking debugedit.

  # See find-debuginfo.sh.
@@ -147,7 +138,7 @@ 

  debug_base_name=${last_arg:-$RPM_BUILD_ROOT}

  $debugedit -b "$debug_base_name" -d "$debug_dest_name" -n $ldso_path

  # Remove the .annobin* symbols (and only them).

- if nm --format=just-symbols "$ldso_path" \

+ if nm --format=posix "$ldso_path" | cut -d' ' -f1 \

  	| grep '^\.annobin' > "$ldso_tmp.annobin-symbols"; then

      objcopy --strip-symbols="$ldso_tmp.annobin-symbols" "$ldso_path"

  fi

This is a conflict-free cherry-pick of the POWER10 changes in #92, except for the last commit, which is new: it is a temporary kludge to keep valgrind working. It effectively reverts the CC/CFLAGS injection fixes we need for POWER10 building on x86-64.

I see an i686 test failure on the c10s builder:

=====FAIL: nptl/tst-cancel30.out=====
...
error: ../sysdeps/pthread/tst-cancel30.c:73: not true: status == PTHREAD_CANCELED
error: 1 test failures

It's likely that this is because sysdeps/pthread/tst-cancel30.c uses SYS_ppoll_time64 without fallback to SYS_ppoll, so the thread encounters ENOSYS and just exits, usually without being canceled. This doesn't show up on the Fedora Koji builders.

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/e54316168273403db7e4fff7ed8dc2e9

We will wait for Fedora 40 to go out the door next week before merging and building this, so we have a little more time to review.

rebased onto 96639fe

13 days ago

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/4aa8f0901eb8410b802bd326b3088778

rebased onto b3da3b4

7 days ago

I dropped the valgrind workaround because downstream won't need it anymore, so the sequences of patches should be exactly the same as in #92 now.

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/2557eab497154d3aa3c65b5f281d1ce9

All five commits backported are clean cherry-picks from rawhide.
Let's include a new changelog entry and NVR bump for this in an additional commit within this MR?

1 new commit added

  • Update changelog
6 days ago

New commit has good NVR bump and changelog entry. LGTM.

Pull-Request has been merged by fweimer

6 days ago

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/2e5aa64fddf3487aa9f7c926b5781d3c