File 0003-icecc-create-env-fix-adding-the-glibc-hwcaps-libs.patch of Package icecream
From 343c81607d465ba183db9687122303a78a4f1f54 Mon Sep 17 00:00:00 2001
From: Thiago Macieira <thiago.macieira@intel.com>
Date: Thu, 29 Jan 2026 16:27:46 -0800
Subject: [PATCH] icecc-create-env: fix adding the glibc-hwcaps libs
We were overwriting the `lib` variable with the base lib, thus the
`case` statement below never matched anything. So just don't do it.
Drive-by use "skipldd" to addfile, as all of these libraries come from
ldd, which in turn means their dependencies are showing up in the
current file's dependencies anyway.
Now:
```
adding file /lib64/libz.so.1=/usr/lib64/libz.so.1.3.1
adding file /lib64/glibc-hwcaps/x86-64-v3/libz.so.1=/usr/lib64/glibc-hwcaps/x86-64-v3/libz.so.1.3.1
adding file /lib64/libzstd.so.1=/usr/lib64/libzstd.so.1.5.7
adding file /lib64/glibc-hwcaps/x86-64-v3/libzstd.so.1=/usr/lib64/glibc-hwcaps/x86-64-v3/libzstd.so.1.5.7
```
---
client/icecc-create-env.in | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/client/icecc-create-env.in b/client/icecc-create-env.in
index 6620138..5afc519 100755
--- a/client/icecc-create-env.in
+++ b/client/icecc-create-env.in
@@ -144,8 +144,7 @@ add_file ()
fi
fi
if test -n "$usebaselib"; then
- lib=$baselib
- add_file "$lib"
+ add_file "skipldd" "$baselib"
else
# Optimization: We are adding a library we got from ldd output, so avoid
# using ldd on it, as it should not find more than this ldd.
@@ -168,14 +167,14 @@ add_file ()
local lib_non_hwcaps=$(echo "$lib" | sed 's,/glibc-hwcaps/.*/,/,')
local lib_basename=${lib##*/}
if [ "$lib" != "$lib_non_hwcaps" ] && [ -f "$lib_non_hwcaps" ]; then
- add_file "$lib_non_hwcaps"
+ add_file skipldd "$lib_non_hwcaps"
fi
# Add the other hwcaps too
local hwcaplib
for hwcaplib in ${lib_non_hwcaps%$lib_basename}/glibc-hwcaps/*/$lib_basename; do
if [ "$lib" != "$hwcaplib" ]; then
- add_file $hwcaplib
+ add_file skipldd $hwcaplib
fi
done
;;
--
2.52.0