Dear libtool-patches,
On Linux on 'aarch64' using the 'armflang' compiler I got the following
error:
FCLD src/libqmckl.la
clang-13: error: unknown argument: '-soname'
clang-13: error: no such file or directory: 'libqmckl.so.0'
make[2]: *** [Makefile:1203: src/libqmckl.la] Error 1
make[2]: Leaving directory '/users/m23005/scemama/qmckl'
make[1]: *** [Makefile:1520: all-recursive] Error 1
make[1]: Leaving directory '/users/m23005/scemama/qmckl'
make: *** [Makefile:1046: all] Error 2
John C. Linford <john.linf...@arm.com> from ARM suggested the following
workaround for end users:
$ ./configure ...
$ sed -i -e 's#wl=""#wl="-Wl,"#g' libtool
$ sed -i -e 's#pic_flag=""#pic_flag=" -fPIC -DPIC"#g' libtool
$ make
This works, so I patched the 'libtool.m4' file to include the correct
flags for the 'armflang' compiler:
$ git format-patch --stdout origin/master
From 3657095457c4a311f3e775c6267b11c575e7c245 Mon Sep 17 00:00:00 2001
From: Francois Coppens <francois.copp...@irsamc.ups-tlse.fr>
Date: Fri, 10 Feb 2023 15:36:16 +0100
Subject: [PATCH] armflang patch
---
m4/libtool.m4 | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 79a2451e..df1a7860 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -4719,6 +4719,12 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'P
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
+ # ARM flang
+ armflang*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static
+ ;;
# Lahey Fortran 8.1.
lf95*)
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
This works as well and the end user does no longer have to use the
proposed workaround.
I remain at your disposal for more inforation if needed.
With kind regards,
Francois Coppens