Skip to content
Snippets Groups Projects
ltmain-parallel-printf.patch 553 B
--- a/config/ltmain.sh
+++ b/config/ltmain.sh
@@ -310,6 +310,18 @@ test -z "$GREP" && {
 # in the command search PATH.
 
 : ${CP="cp -f"}
+# work around bug in libtool which raises an error when running in a
+# parallel make that should have been handled in printf internally
+printf()
+{
+  while ! builtin printf "$@" ; do
+    errcode=$?
+    # errcode might be EAGAIN=11 which means to simply try again
+    if [ $errcode != 11 ]; then
+      return $errcode
+    fi
+  done
+}
 : ${ECHO="printf %s\n"}
 : ${EGREP="$GREP -E"}
 : ${FGREP="$GREP -F"}