diff --git a/recipes-core/llvm/llvm-common.bb b/recipes-core/llvm/llvm-common.bb
index 38ca1ee..3db4af0 100644
--- a/recipes-core/llvm/llvm-common.bb
+++ b/recipes-core/llvm/llvm-common.bb
@@ -4,8 +4,20 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \
                    "
 
+# provide native perl binaries via PATH
+inherit perlnative
+DEPENDS += "perl-native"
+
 SRC_URI = "file://llvm-config"
 
+do_compile() {
+  cd ..
+  # This adds an explicit call to the interpreter in the wrapper script
+  #  so we don't run into shebang max size issues in the llvm-configX.X perl script
+  #  if the path to perl-native > 127 chars.
+  sed -i -e "s|@PATH_TO_PERL@|`which perl`|" llvm-config
+}
+
 do_install() {
   install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
   install -m 0755 ${WORKDIR}/llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
diff --git a/recipes-core/llvm/llvm-common/llvm-config b/recipes-core/llvm/llvm-common/llvm-config
index a9a416d..08463e5 100644
--- a/recipes-core/llvm/llvm-common/llvm-config
+++ b/recipes-core/llvm/llvm-common/llvm-config
@@ -2,7 +2,7 @@
 # Wrapper script for real llvm-config. Simply calls
 
 if [ $WANT_LLVM_RELEASE ]; then
-	exec `dirname $0`/${TARGET_PREFIX}llvm-config$WANT_LLVM_RELEASE ${@}
+	exec "@PATH_TO_PERL@" `dirname $0`/${TARGET_PREFIX}llvm-config$WANT_LLVM_RELEASE ${@}
 else
   echo "The variable WANT_LLVM_RELEASE is not defined and exported"
 	echo "by your build recipe. Go figure."
