Follow-up Comment #3, sr #110947 (project libtool): I confirm that the patch works against the latest development branch:
$ libtool --version libtool (GNU libtool) 2.4.7.4-1ec8f I just added "flang" in addition to "armflang": cat <<EOF > patch.libtool.m4 diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 79a2451e..c39ea2f3 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' _LT_TAGVAR(lt_prog_compiler_static, \$1)='-static' ;; + # flang variants + 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,' EOF Building the development branch of libtool with this patch (using ./bootstrap), I get a fixed version, and now see the correct expected behaviour: /bin/sh ./libtool --tag=FC --mode=link armflang -g -version-info 0:0:0 -o libp2.la -rpath /bm/ashterenli/p2/reproducer/reproducer-1.0/_inst/lib libp2_la-ffun.lo libp2_la-cfun.lo libtool: link: armflang -shared -fPIC .libs/libp2_la-ffun.o .libs/libp2_la-cfun.o -g -Wl,-soname -Wl,libp2.so.0 -o .libs/libp2.so.0.0.0 _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/support/?110947> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/