I've been hit with this issues multiple times before, see e.g. 

https://lists.gnu.org/archive/html/libtool/2024-07/msg00002.html

I'm now trying an upcoming AMD "new flang" compiler from here:

https://repo.radeon.com/rocm/misc/flang

using libtool 2.6.2

The resulting "libtool" file has empty "wl=":


# A language specific compiler.
CC="ftn"

# Is the compiler the GNU compiler?
with_gcc=no

# Compiler flag to turn off builtin functions.
no_builtin_flag=""

# Additional compiler flags for building library objects.
pic_flag=""

# How to pass a linker flag through the compiler.
wl=""


which results in:

flang-23: error: unknown argument: '-soname'

I'm not sure why this happens.
Looking at aclocal/libtool.m4, "*flang*" should be correct.
It should catch compiler names such as armflang, amdflang, etc. or,
as in this case flang-23.


4972       *flang* | ftn | f18* | f95*)
4973         # Flang compiler.
4974         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4975         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4976         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4977         ;;

The immediate workaround, as before, is to simply fix
the resulting libtool script after configure has completed:

sed -i 's/^wl=""/wl="-Wl,"/g' libtool

but it would be good to understand what is causing libtool
to generate the libtool script with emtpy "wl=" in the first place.

Thank you

Anton

  • ... Anton Shterenlikht via Discussion list for the GNU libtool shared library maintenance tool
    • ... Roland Hughes via Discussion list for the GNU libtool shared library maintenance tool

Reply via email to