Skip to content
Snippets Groups Projects
Commit 64742cf8 authored by Sergey Kosukhin's avatar Sergey Kosukhin Committed by Thomas Jahns
Browse files

build system: Add patches to fix EAGAIN problem in libtool.

parent 92d41e8f
No related branches found
No related tags found
No related merge requests found
......@@ -101,6 +101,8 @@ EXTRA_DIST = util/sunf95preproc-wrapper \
contrib/06ltmain_nag_pthread-patch/ltmain_nag_pthread.patch \
contrib/07ltmain-early-xcompile-patch/README \
contrib/07ltmain-early-xcompile-patch/ltmain-early-xcompile-libtool-2.4.6.patch \
contrib/08ltmain-parallel-printf-patch/ltmain-parallel-printf-libtool-2.4.2.patch \
contrib/08ltmain-parallel-printf-patch/ltmain-parallel-printf-libtool-2.4.6.patch \
doc/Makefile \
doc/Doxyfile.in doc/README.build doc/cfortran.doc \
doc/cfortran.html doc/cfortran.txt doc/styleguide.txt \
......
From d7ed6049d313e5c0fc7adcb88e19e50df60b3d58 Mon Sep 17 00:00:00 2001
From: Thomas Jahns <jahns@dkrz.de>
Date: Mon, 30 Jan 2017 15:36:55 +0100
Subject: [PATCH] Fix EAGAIN problem in libtool.
* This work-around is needed until both bash and libtool wisen up.
---
config/ltmain.sh | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/config/ltmain.sh b/config/ltmain.sh
index 63ae69dc..cfc9c20d 100644
--- a/config/ltmain.sh
+++ b/config/ltmain.sh
@@ -136,6 +136,18 @@ progpath="$0"
: ${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
+}
test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
: ${MAKE="make"}
: ${MKDIR="mkdir"}
From 7fade4eb31d7d8bc930e1fe2486fa9dd19366fb4 Mon Sep 17 00:00:00 2001
From: Thomas Jahns <jahns@dkrz.de>
Date: Wed, 21 Aug 2019 19:29:26 +0200
Subject: [PATCH] Re-apply libtool patches.
---
config/ltmain.sh | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/config/ltmain.sh b/config/ltmain.sh
index 0f0a2da3..e8a25b75 100644
--- 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"}
......@@ -83,7 +83,8 @@ case "$libtoolversion" in
contrib/04ltmain-xlinker-patch/ltmain-xlinker-patch.patch \
contrib/05macos-nagfor-patch/macos-nagfor.patch \
contrib/06ltmain_nag_pthread-patch/ltmain_nag_pthread.patch \
contrib/07ltmain-early-xcompile-patch/ltmain-early-xcompile-libtool-2.4.6.patch)
contrib/07ltmain-early-xcompile-patch/ltmain-early-xcompile-libtool-2.4.6.patch \
contrib/08ltmain-parallel-printf-patch/ltmain-parallel-printf-libtool-2.4.6.patch)
;;
(2.4.2)
patches=(contrib/00nagfor-libtool-patch/nagfor-libtool.patch \
......@@ -92,7 +93,8 @@ case "$libtoolversion" in
contrib/03ltmain-ld-groups-patch/ltmain-ld-groups-libtool-2.4.2.patch \
contrib/04ltmain-xlinker-patch/ltmain-xlinker-patch.patch \
contrib/05macos-nagfor-patch/macos-nagfor.patch \
contrib/06ltmain_nag_pthread-patch/ltmain_nag_pthread.patch)
contrib/06ltmain_nag_pthread-patch/ltmain_nag_pthread.patch \
contrib/08ltmain-parallel-printf-patch/ltmain-parallel-printf-libtool-2.4.2.patch)
;;
esac
for patch in "${patches[@]}"; do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment