mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-16 03:24:07 +00:00
ef23d24eb5
The wrapper scripts currently do not resolve the real path to $0: $ install -l rs /usr/local/bin/clang50 gcc $ ./gcc ./gcc: /usr/local/llvm50/bin/gcc: not found Here /usr/local/llvm50/bin/clang should be called not /usr/local/llvm50/bin/gcc. Approved by: brooks (maintainer) Differential Revision: https://reviews.freebsd.org/D14727
12 lines
274 B
Bash
12 lines
274 B
Bash
#!/bin/sh
|
|
# $FreeBSD$
|
|
|
|
LLVM_PREFIX="%%LLVM_PREFIX%%"
|
|
LLVM_SUFFIX="%%LLVM_SUFFIX%%"
|
|
|
|
tool=$(/bin/realpath $0)
|
|
tool=${tool##*/}
|
|
tool="${LLVM_PREFIX}/bin/${tool%${LLVM_SUFFIX}}"
|
|
LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LLVM_PREFIX}/lib" \
|
|
"${tool}" "${@}"
|