You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pawosm-arm commented on Sep 21, 2016
This is required by software packages that use autoconf's 'configure' script to generate makefiles. As it turns out, for some of them (e.g. openmpi) 'configure' script literally adds linker options to the command line not prefixing them with '-Wl,'. This only happens when flang is discovered by 'configure' as a frontend driver. Following options were frequently encountered (AFAIR, with singe or double dash):
--whole-archive, --no-whole-archive, --rpath (with all instances of its allowed syntax), -soname.
As a workaround, --disable-shared --enable-static (usually accompanied with setting ENV variables having -fPIC -DPIC as compiler flags) can be passed to configure. This isn't a permanent solution though, the best option would be to accept these flags and pass them to the linker as they are. @ppenzin
ppenzin commented on Sep 21, 2016
Would other Fortran compilers accept those options?
AFAIR there is check for compiler that sets some variable to prepend -Wl, (or whatever is appropriate for particular compiler) to linker flags. If compiler is not recognized that prefix stays blank, therefore it would try to pass linker flags directly. @pawosm-arm
pawosm-arm commented on Sep 21, 2016
They would not (I tried gfortran and some other, commercial) and the least intrusive solution needs to be found. Any solution that would require the users to update their autotools will be likely rejected by the wider audience. @ppenzin
ppenzin commented on Sep 21, 2016
Any new compiler will have to be added to autotools at some point. For now we can probably provide a way to patch makefiles or configure scripts.
The text was updated successfully, but these errors were encountered:
Actually, the only thing to be adapted is the libtool version. Usually, software packages ship with their own libtool version. E.g. for the NAGFOR compiler we managed to get our specifics for that compiler to be included in the official libtool release. So, in general is it possible to create shared libraries with flang?
pawosm-arm commented on Sep 21, 2016
This is required by software packages that use autoconf's 'configure' script to generate makefiles. As it turns out, for some of them (e.g. openmpi) 'configure' script literally adds linker options to the command line not prefixing them with '-Wl,'. This only happens when flang is discovered by 'configure' as a frontend driver. Following options were frequently encountered (AFAIR, with singe or double dash):
--whole-archive, --no-whole-archive, --rpath (with all instances of its allowed syntax), -soname.
As a workaround, --disable-shared --enable-static (usually accompanied with setting ENV variables having -fPIC -DPIC as compiler flags) can be passed to configure. This isn't a permanent solution though, the best option would be to accept these flags and pass them to the linker as they are.
@ppenzin
ppenzin commented on Sep 21, 2016
Would other Fortran compilers accept those options?
AFAIR there is check for compiler that sets some variable to prepend -Wl, (or whatever is appropriate for particular compiler) to linker flags. If compiler is not recognized that prefix stays blank, therefore it would try to pass linker flags directly.
@pawosm-arm
pawosm-arm commented on Sep 21, 2016
They would not (I tried gfortran and some other, commercial) and the least intrusive solution needs to be found. Any solution that would require the users to update their autotools will be likely rejected by the wider audience.
@ppenzin
ppenzin commented on Sep 21, 2016
Any new compiler will have to be added to autotools at some point. For now we can probably provide a way to patch makefiles or configure scripts.
The text was updated successfully, but these errors were encountered: