aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-12-13 21:56:40 +0100
committerThomas Deutschmann <whissi@gentoo.org>2019-12-14 01:05:33 +0100
commit7d7d95509fcecd86476e705bc52fa147452139c3 (patch)
tree6c9ff3e81dc36b359a7480c7d5e043f62b722c2c /gen_funcs.sh
parentgenkernel: bump to v4.0.1 (diff)
downloadgenkernel-7d7d95509fcecd86476e705bc52fa147452139c3.tar.gz
genkernel-7d7d95509fcecd86476e705bc52fa147452139c3.tar.bz2
genkernel-7d7d95509fcecd86476e705bc52fa147452139c3.zip
gen_funcs.sh: get_chost_libdir(): Use libc.a to determine CHOST libdir
libc.a is required for almost every package in initramfs whereas libnss_files.so isn't available in musl for example. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gen_funcs.sh')
-rwxr-xr-xgen_funcs.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/gen_funcs.sh b/gen_funcs.sh
index f5dd0cd2..32d367e5 100755
--- a/gen_funcs.sh
+++ b/gen_funcs.sh
@@ -860,10 +860,13 @@ debug_breakpoint() {
get_chost_libdir() {
local cc=$(tc-getCC)
- local test_file=$(${cc} -print-file-name=libnss_files.so 2>/dev/null)
+ local test_file=$(${cc} -print-file-name=libc.a 2>/dev/null)
if [ -z "${test_file}" ]
then
- gen_die "$(get_useful_function_stack "${FUNCNAME}")Unable to determine CHOST's libdir: '${cc} -print-file-name=libnss_files.so' returned nothing!"
+ gen_die "$(get_useful_function_stack "${FUNCNAME}")Unable to determine CHOST's libdir: '${cc} -print-file-name=libc.a' returned nothing!"
+ elif [[ "${test_file}" == "libc.a" ]]
+ then
+ gen_die "$(get_useful_function_stack "${FUNCNAME}")Unable to determine CHOST's libdir: '${cc} -print-file-name=libc.a' returned no path!"
fi
local test_file_realpath=$(realpath "${test_file}" 2>/dev/null)