[commit: ghc] master: aclocal.m4: respect user's --with-ar= choice (79848f1)
git at git.haskell.org
git at git.haskell.org
Mon Apr 17 12:57:11 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/79848f18805ad8eba48c9897c5d53afbd17ab44d/ghc
>---------------------------------------------------------------
commit 79848f18805ad8eba48c9897c5d53afbd17ab44d
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date: Mon Apr 17 09:41:49 2017 +0100
aclocal.m4: respect user's --with-ar= choice
'FP_PROG_AR' macro has a minor bug: it ignores
already existing value stored in '$fp_prog_ar'.
I've noticed it when tried to built UNREG ghc using thin LTO:
$ ./configure --enable-unregisterised \
--with-nm=gcc-nm \
--with-ar=gcc-ar \
--with-ranlib=gcc-ranlib \
./configure refused to use 'gcc-ar' (LTO-aware variant of 'ar')
and kept using 'ar'.
'$fp_prog_ar' is initialized (in a complex manner) in 'configure.ac' as:
FP_ARG_WITH_PATH_GNU_PROG([AR], [ar], [ar])
ArCmd="$AR"
fp_prog_ar="$AR"
AC_SUBST([ArCmd])
The change keeps that value.
Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
>---------------------------------------------------------------
79848f18805ad8eba48c9897c5d53afbd17ab44d
aclocal.m4 | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/aclocal.m4 b/aclocal.m4
index 2062b0d..ed26a89 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1130,7 +1130,9 @@ AC_SUBST([LdHasFilelist])
# ----------
# Sets fp_prog_ar to a path to ar. Exits if no ar can be found
AC_DEFUN([FP_PROG_AR],
-[AC_PATH_PROG([fp_prog_ar], [ar])
+[if test -z "$fp_prog_ar"; then
+ AC_PATH_PROG([fp_prog_ar], [ar])
+fi
if test -z "$fp_prog_ar"; then
AC_MSG_ERROR([cannot find ar in your PATH, no idea how to make a library])
fi
More information about the ghc-commits
mailing list