TNX, this seems to explain what happens:
>   inherited_linker_flags='-threads'
Yes, some of the libraries I'm trying to suggest as potentially needed do have:
- *.la
- and setting as cited above.

Precisely I have
inherited_linker_flags=' -pthread -threads'
for libraries that provide interface Fortran over library that has interface in 
C (HDF, NetCDF),
and most apparently this is where it comes from, because I use:
-threads for Intel ifort (Fortran).
-pthreads for Intel icx.
Unfortunately compiler manual is so concise, that it is difficult to figure out 
what exactly do these switches do in each case...

> [...] libraries must not export information for threads
In my particular case the aim is to compile a set of libraries that behave 
correctly in case they are used by multithreaded program that uses OpenMP.
I have no experience at all to suggest how libtool should behave in general 
here.
And I'm not sure whether any reasonable/feasible libtool design conclusions 
follow from case of use as above.

BR
wint

________________________________________

Hello,

I'm sorry for top posting.
Multithread library does not mean that
program(utility,command,application) is multithreaded.

 From my point of view libraries must not export information for
threads. This could be from either shell config-script, or
"package-config file, or predefined autoconf macros.


На 25.08.24 г. в 19:47 ч., Nick Bowler написа:
Regards,
Roumen Petrov



________________________________________
Od: Nick Bowler <nbow...@draconx.ca>
Wysłane: niedziela, 25 sierpnia 2024 18:47
Do: Witold Interewicz
DW: libtool@gnu.org
Temat: Re: Issue with added '-threads' added while using Intel 2024.0.0 C 
compiler icx

On 2024-08-23 13:35, Witold Interewicz wrote:
> I have 2 Qs here:
> - What is (in short/sketch) the set of conditions that causes libtool
> to add this switch '-threads' (or where may I read about it)?

It could be coming from another library you are using.  For example,
some libtool library (.la file) might contain a line like

  inherited_linker_flags='-threads'

which will cause libtool to add the flag when you use that library
with libtool.

Perhaps some library was built using a different compiler which uses
different options and these got embedded into the installed library.

> - Should I look for solution of this problem here in libtool GNUs'
> world or in the Intel's world?

It's probably just a matter of identifying the problematic library and
then correcting it on your system.

> PS. Please let me know if it is ill posed problem at all or if you
> don't discuss issues involving non-GNU compilers at all.

Libtool should work with non-GNU compilers.

Hope that helps,
  Nick

Reply via email to