This seems like an automake issue, not libtool. The libtool produced by running configure has:
11661 # ### BEGIN LIBTOOL TAG CONFIG: FC 11662 11663 # The linker used to build libraries. 11664 LD="<some path>/arm-compiler-for-linux_23.10_AmazonLinux-2/gcc-12.2.0_AmazonLinux-2/aarch64-linux-gnu/bin/ld" 11665 11666 # How to create reloadable object files. 11667 reload_flag=" -r" 11668 reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" 11669 11670 # Commands used to build an old-style archive. 11671 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$tool_oldlib" 11672 11673 # A language specific compiler. 11674 CC="armflang" 11675 11676 # Is the compiler the GNU compiler? 11677 with_gcc=no 11678 11679 # Compiler flag to turn off builtin functions. 11680 no_builtin_flag="" 11681 11682 # Additional compiler flags for building library objects. 11683 pic_flag="" 11684 11685 # How to pass a linker flag through the compiler. 11686 wl="" Note that wl= is emtpy. Compare with the portion of this file for C compiler: 317 # A language specific compiler. 318 CC="mpicc" 319 320 # Is the compiler the GNU compiler? 321 with_gcc=yes 322 323 # Compiler flag to turn off builtin functions. 324 no_builtin_flag=" -fno-builtin -fno-rtti -fno-exceptions" 325 326 # Additional compiler flags for building library objects. 327 pic_flag=" -fPIC -DPIC" 328 329 # How to pass a linker flag through the compiler. 330 wl="-Wl," This simple patch works: sed -i 's|wl=""|wl="-Wl,"|' libtool and gives: libtool: link: armflang -shared <some *.o files> -g -fopenmp -mcpu=neoverse-512tvb -march=armv8.4-a+sve -fopenmp -Wl,-soname -Wl,libp2.so.0 -o .libs/libp2.so.0.0.0 However, this crude hack will not work with "make distcheck", because it will generate a new libtool. Still, I'm trying to understand if this is a bug in autotools, and if there is a workaround via edits in configure.ac and/or Makefile.am. Thank you Anton > On 20 Oct 2023, at 08:40, Shterenlikht, Anton <shterenli...@par-tec.com> > wrote: > > [also posted in libt...@gnu.org] > > Please help me understand how to deal correctly with this error: > > libtool: link: armflang -shared <some *.o files> -g -soname > libp2.so.0 -o .libs/libp2.so.0.0.0 > armflang: error: unknown argument: '-soname' > > > I see this issue mentioned in multiple places, e.g: > > https://github.com/HDFGroup/hdf5/issues/366 > > with the solution that "-Wl," must be prepended somehow to "-soname". > > But I'm not sure what changes I need to do > to my configure.ac and/or Makefile.am > to fix this correctly. > > For comparison, here's how the same line looks like when > I use gfortran: > > libtool: link: gfortran -shared -fPIC <some *.o files> -g -O2 > -Wl,-soname -Wl,libp2.so.0 -o .libs/libp2.so.0.0.0 > > > Thank you > > Anton
smime.p7s
Description: S/MIME cryptographic signature