commit | 9fd3c3de3d48f328c5771f3659235774aa7df984 | [log] [tgz] |
---|---|---|
author | Serge Bazanski <serge@monogon.tech> | Tue Jun 20 13:18:36 2023 +0200 |
committer | Serge Bazanski <serge@monogon.tech> | Tue Jun 20 14:19:54 2023 +0000 |
tree | ed1c39faa59c9bfd6a3bdd6a2bdfe6814c73e2f6 | |
parent | 9739a4f0d1a48cbc4e9f6092d3bd471e833bb8c0 [diff] [blame] |
build/toolchain/musl-host-gcc: handle non-workspace-root execution This is needed to build stdlib with cgo, which is in turn required for the race checker to be enabled. Change-Id: Ic81542925a02c626f157dfd8c6650de3dbb30c7d Reviewed-on: https://review.monogon.dev/c/monogon/+/1832 Tested-by: Jenkins CI Reviewed-by: Leopold Schabel <leo@monogon.tech>
diff --git a/build/toolchain/musl-host-gcc/gcc-wrapper.sh b/build/toolchain/musl-host-gcc/gcc-wrapper.sh index a430e75..33048c0 100755 --- a/build/toolchain/musl-host-gcc/gcc-wrapper.sh +++ b/build/toolchain/musl-host-gcc/gcc-wrapper.sh
@@ -1,2 +1,3 @@ #!/usr/bin/env bash -exec /usr/bin/gcc "$@" -specs build/toolchain/musl-host-gcc/musl.spec +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +exec /usr/bin/gcc "$@" -specs $SCRIPT_DIR/musl.spec