(perl #134189) handle no gcc, but cc is clang
authorTony Cook <tony@develop-help.com>
Thu, 13 Jun 2019 04:04:35 +0000 (04:04 +0000)
committerTony Cook <tony@develop-help.com>
Mon, 24 Jun 2019 00:30:45 +0000 (10:30 +1000)
You can setup Ubuntu (and presumably other dists) with clang and no
gcc installed, which left plibpth unfilled.

hints/linux.sh

index a985a8e..8cbe7dc 100644 (file)
@@ -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