summaryrefslogtreecommitdiff
path: root/hints
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2019-06-13 04:04:35 +0000
committerTony Cook <tony@develop-help.com>2019-06-24 10:30:45 +1000
commit9918f0bc5148608ed6e31f41d86dff018d035897 (patch)
treecea2394ec007b47f1e204d6e85a6c7774af3f16f /hints
parentc6981b9a20742358c4af17bc46ba8d20a1c46d07 (diff)
downloadperl-9918f0bc5148608ed6e31f41d86dff018d035897.tar.gz
(perl #134189) handle no gcc, but cc is clang
You can setup Ubuntu (and presumably other dists) with clang and no gcc installed, which left plibpth unfilled.
Diffstat (limited to 'hints')
-rw-r--r--hints/linux.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/hints/linux.sh b/hints/linux.sh
index a985a8ee1b..8cbe7dc463 100644
--- a/hints/linux.sh
+++ b/hints/linux.sh
@@ -165,6 +165,9 @@ esac
# plibpth to bypass this check.
if [ -x /usr/bin/gcc ] ; then
gcc=/usr/bin/gcc
+# clang also provides -print-search-dirs
+elif ${cc:-cc} --version 2>/dev/null | grep -q '^clang ' ; then
+ gcc=${cc:-cc}
else
gcc=gcc
fi