aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Vinichenko <oleg@funtoo.org>2017-08-09 05:08:03 +0000
committerOleg Vinichenko <oleg@funtoo.org>2017-08-09 05:08:03 +0000
commitd8678b3e098afac3f9190d9111df7eb1f5f9a1cc (patch)
tree76311bede454f35653a4633e5db379b211e5c891
parentgenkernel-3.4.40.15 (diff)
downloadgenkernel-d8678b3e098afac3f9190d9111df7eb1f5f9a1cc.tar.gz
genkernel-d8678b3e098afac3f9190d9111df7eb1f5f9a1cc.tar.bz2
genkernel-d8678b3e098afac3f9190d9111df7eb1f5f9a1cc.zip
FL-4028: correct libgcc.so in zfs initrmafs creationv3.4.40.16-funtoo
-rwxr-xr-xgen_initramfs.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index 33470dd..0fb76b2 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -360,13 +360,17 @@ append_zfs(){
# Copy binaries
# Include libgcc_s.so.1 to workaround zfsonlinux/zfs#4749
+ local libgccpath
if type gcc-config 2>&1 1>/dev/null; then
- copy_binaries "${TEMP}/initramfs-zfs-temp" /sbin/{mount.zfs,zdb,zfs,zpool} \
- "/usr/lib/gcc/$(s=$(gcc-config -c); echo ${s%-*}/${s##*-})/libgcc_s.so.1"
- else
- copy_binaries "${TEMP}/initramfs-zfs-temp" /sbin/{mount.zfs,zdb,zfs,zpool} \
- /usr/lib/gcc/*/*/libgcc_s.so.1
+ libgccpath="/usr/lib/gcc/$(s=$(gcc-config -c); echo ${s%-*}/${s##*-})/libgcc_s.so.1"
fi
+ if [[ ! -f ${libgccpath} ]]; then
+ libgccpath="/usr/lib/gcc/*/*/libgcc_s.so.1"
+ fi
+
+ copy_binaries "${TEMP}/initramfs-zfs-temp" /sbin/{mount.zfs,zdb,zfs,zpool} ${libgccpath}
+ cd "${TEMP}/initramfs-zfs-temp/lib64"
+ ln -s "..${libgccpath}"
cd "${TEMP}/initramfs-zfs-temp/"
log_future_cpio_content