Skip to content

Commit 3278938

Browse files
neurocismoul
authored andcommitted
Fix crossbuild to not forever expand the ENV vars.
1 parent 3712409 commit 3278938

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

assets/crossbuild

+6-2
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,15 @@ case "${CROSS_TRIPLE}" in
3535
;;
3636
esac
3737

38+
# store original PATH and LD_LIBRARY_PATH
39+
if [ -z ${PATH_ORIGIN+x} ]; then export PATH_ORIGIN=${PATH}; fi
40+
if [ -z ${LD_LIBRARY_PATH_ORIGIN+x} ]; then export LD_LIBRARY_PATH_ORIGIN=${LD_LIBRARY_PATH}; fi
41+
3842
# configure environment
3943
if [ -n "${CROSS_TRIPLE}" ]; then
4044
export CROSS_ROOT="/usr/${CROSS_TRIPLE}"
41-
export PATH="${CROSS_ROOT}/bin:${PATH}"
42-
export LD_LIBRARY_PATH="/usr/x86_64-linux-gnu/${CROSS_TRIPLE}/lib:${LD_LIBRARY_PATH}"
45+
export PATH="${CROSS_ROOT}/bin:${PATH_ORIGIN}"
46+
export LD_LIBRARY_PATH="/usr/x86_64-linux-gnu/${CROSS_TRIPLE}/lib:${LD_LIBRARY_PATH_ORIGIN}"
4347
fi
4448

4549
# try to exec direct binary instead on relying on the $PATH

0 commit comments

Comments
 (0)