From b144f7ceb5a5df859d88704255636dc8670640ba Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Sat, 2 Jan 2021 13:42:58 +1000 Subject: build: update autosetup for pkg-config fix v0.7.0-3-g35b88dc Signed-off-by: Steve Bennett --- autosetup/README.autosetup | 2 +- autosetup/autosetup | 2 +- autosetup/autosetup-find-tclsh | 9 ++++----- autosetup/pkg-config.tcl | 3 ++- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/autosetup/README.autosetup b/autosetup/README.autosetup index 889026d..e2da6f5 100644 --- a/autosetup/README.autosetup +++ b/autosetup/README.autosetup @@ -1,4 +1,4 @@ -README.autosetup created by autosetup v0.7.0 +README.autosetup created by autosetup v0.7.0+ This is the autosetup directory for a local install of autosetup. It contains autosetup, support files and loadable modules. diff --git a/autosetup/autosetup b/autosetup/autosetup index 958287e..4f9f345 100755 --- a/autosetup/autosetup +++ b/autosetup/autosetup @@ -6,7 +6,7 @@ dir=`dirname "$0"`; exec "`$dir/autosetup-find-tclsh`" "$0" "$@" # Note that the version has a trailing + on unreleased versions -set autosetup(version) 0.7.0 +set autosetup(version) 0.7.0+ # Can be set to 1 to debug early-init problems set autosetup(debug) [expr {"--debug" in $argv}] diff --git a/autosetup/autosetup-find-tclsh b/autosetup/autosetup-find-tclsh index 6ef8bc3..e1e0462 100755 --- a/autosetup/autosetup-find-tclsh +++ b/autosetup/autosetup-find-tclsh @@ -1,16 +1,15 @@ #!/bin/sh # Looks for a suitable tclsh or jimsh in the PATH # If not found, builds a bootstrap jimsh in current dir from source -# Prefer $autosetup_tclsh if is set in the environment +# Prefer $autosetup_tclsh if is set in the environment (unless ./jimsh0 works) d="`dirname "$0"`" -{ "./jimsh0" "$d/autosetup-test-tclsh"; } 2>/dev/null && exit 0 -for tclsh in $autosetup_tclsh jimsh tclsh tclsh8.5 tclsh8.6 tclsh8.7; do +for tclsh in ./jimsh0 $autosetup_tclsh jimsh tclsh tclsh8.5 tclsh8.6 tclsh8.7; do { $tclsh "$d/autosetup-test-tclsh"; } 2>/dev/null && exit 0 done echo 1>&2 "No installed jimsh or tclsh, building local bootstrap jimsh0" for cc in ${CC_FOR_BUILD:-cc} gcc; do - { $cc -o "jimsh0" "$d/jimsh0.c"; } 2>/dev/null || continue - "./jimsh0" "$d/autosetup-test-tclsh" && exit 0 + { $cc -o jimsh0 "$d/jimsh0.c"; } 2>/dev/null || continue + ./jimsh0 "$d/autosetup-test-tclsh" && exit 0 done echo 1>&2 "No working C compiler found. Tried ${CC_FOR_BUILD:-cc} and gcc." echo false diff --git a/autosetup/pkg-config.tcl b/autosetup/pkg-config.tcl index d096cab..9ce7111 100644 --- a/autosetup/pkg-config.tcl +++ b/autosetup/pkg-config.tcl @@ -53,11 +53,12 @@ proc pkg-config-init {{required 1}} { define SYSROOT [file-normalize $o] msg-result "Using specified sysroot [get-define SYSROOT]" } elseif {[get-define build] ne [get-define host]} { - if {[catch {exec-with-stderr [get-define CC] -print-sysroot} result errinfo] == 0} { + if {[catch {exec-with-stderr {*}[get-define CC] -print-sysroot} result errinfo] == 0} { # Use the compiler sysroot, if there is one define SYSROOT $result msg-result "Found compiler sysroot $result" } else { + configlog "[get-define CC] -print-sysroot: $result" set msg "pkg-config: Cross compiling, but no compiler sysroot and no --sysroot supplied" if {$required} { user-error $msg -- cgit v1.1