blob: 9e668418a9148f3e18e92c7ba56b7df13b8ce93b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/bin/sh
_cc="${HOSTCC_REAL:-gcc}"
case "$1" in
-print-file-name=*)
dirs="$($_cc -print-search-dirs | grep -m1 libraries | sed -e 's,:, ,' -e 's,.* =,,')"
dirs="$dirs /usr/lib /usr/local/lib"
find $dirs -name "${1#*=}" | head -n1
;;
*)
exec $_cc "$@"
;;
esac
|