summaryrefslogtreecommitdiff
path: root/sys-kernel/dracut/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
commitd18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c (patch)
tree4a95cbc6ffdf13bad6ecbc7f8d5af99631984123 /sys-kernel/dracut/files
parente748ba9741f6540f4675c23e3e37b73e822c13a4 (diff)
gentoo resync : 15.06.2021
Diffstat (limited to 'sys-kernel/dracut/files')
-rw-r--r--sys-kernel/dracut/files/gentoo-ldconfig-paths-r1.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/sys-kernel/dracut/files/gentoo-ldconfig-paths-r1.patch b/sys-kernel/dracut/files/gentoo-ldconfig-paths-r1.patch
new file mode 100644
index 000000000000..53349a1f31f3
--- /dev/null
+++ b/sys-kernel/dracut/files/gentoo-ldconfig-paths-r1.patch
@@ -0,0 +1,39 @@
+From e6a5f02038954ede223cc75901386acf43ec4264 Mon Sep 17 00:00:00 2001
+From: Alexander Tsoy <alexander@tsoy.me>
+Date: Mon, 9 Mar 2020 02:47:07 +0300
+Subject: [PATCH] Remove redundant gcc paths in ldconfig_paths()
+
+Bug: https://bugs.gentoo.org/705728
+---
+ dracut-functions.sh | 15 ++++++++++++++-
+ 1 file changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/dracut-functions.sh b/dracut-functions.sh
+index 5206bd21..a119fb15 100755
+--- a/dracut-functions.sh
++++ b/dracut-functions.sh
+@@ -81,7 +81,20 @@ find_binary() {
+ }
+
+ ldconfig_paths() {
+- $DRACUT_LDCONFIG ${dracutsysrootdir:+-r ${dracutsysrootdir} -f /etc/ld.so.conf} -pN 2> /dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq
++ local gccpath
++
++ if type -P gcc-config &>/dev/null; then
++ gccpath=$(gcc-config -c)
++ gccpath=/usr/lib/gcc/${gccpath%-*}/${gccpath##*-}
++ fi
++
++ while read -r line; do
++ if [[ ${line} != /usr/lib/gcc/* || -z ${gccpath} ]]; then
++ echo ${line}
++ elif [[ ${line} == ${gccpath} ]]; then
++ echo ${line}
++ fi
++ done < <($DRACUT_LDCONFIG ${dracutsysrootdir:+-r ${dracutsysrootdir} -f /etc/ld.so.conf} -pN 2>/dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq)
+ }
+
+ # Version comparision function. Assumes Linux style version scheme.
+--
+2.32.0
+