diff options
author | obache <obache> | 2014-04-03 09:05:11 +0000 |
---|---|---|
committer | obache <obache> | 2014-04-03 09:05:11 +0000 |
commit | 6a3435e097546d7773d436120c7c130ef0444b64 (patch) | |
tree | 6c9fb9e19805ac34a7a821ea9b2827b552b3cbbd /bootstrap | |
parent | 76444f8827f83209978375c539d9802e946e8bb1 (diff) | |
download | pkgsrc-6a3435e097546d7773d436120c7c130ef0444b64.tar.gz |
Set CLANGBASE=/usr automatically if CLANGBASE is not set and /usr/bin/clang exists.
It is expected in mk/compiler/clang.mk that CLANGBASE is set properly
even if builtin clang is selected.
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap/bootstrap | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap index 04a56fd66fd..ce7baaf2fa8 100755 --- a/bootstrap/bootstrap +++ b/bootstrap/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: bootstrap,v 1.204 2014/03/14 21:52:13 ryoon Exp $ +# $NetBSD: bootstrap,v 1.205 2014/04/03 09:05:11 obache Exp $ # # Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org> # All rights reserved. @@ -981,6 +981,9 @@ clang) echo "CC= clang" >> ${TARGET_MKCONF} echo "CXX= clang++" >> ${TARGET_MKCONF} echo "CPP= \${CC} -E" >> ${TARGET_MKCONF} + if [ -z "$CLANGBASE" -a -f "/usr/bin/clang" ]; then + CLANGBASE="/usr" + fi if [ -n "$CLANGBASE" -o -f "/bin/clang" ]; then echo "CLANGBASE= $CLANGBASE" >> ${TARGET_MKCONF} fi |