From ddddfecf181ff70d4226878559d74dc0503b1de9 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 13 Jun 2021 07:28:30 +0000 Subject: build system: configure, ccenv: enhanced --sysroot logic. --- configure | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 459e57d..b32b086 100755 --- a/configure +++ b/configure @@ -813,8 +813,15 @@ config_ccenv() output_section_break ccenv_set_native_variables + # implicit --sysroot for use with pkgconf and friends + if [ -z "$mb_sysroot" ]; then + mb_sysroot="$ccenv_host_sysroot" + fi + # require --sysroot when cross-compiling - if [ "$mb_cchost" != "$mb_native_cchost" ] && [ -z "$mb_sysroot" ]; then + if [ "$mb_cchost" != "$mb_native_cchost" ] \ + && [ "$ccenv_host_cc" != "$ccenv_native_cc" ] \ + && [ -z "$mb_sysroot" ]; then mb_pretty=$(printf "%-${#mb_package}s" '') error_msg ' !!' -- cgit v1.2.3