Re: [patch, fortran] Also use size estimate for vector-matrix matmul

2021-03-20 Thread Thomas Koenig via Fortran



Hi Jerry and Steve,


Yes Ok for trunk.


Thanks for the heads-up and the review, committed as r11-7742.

Best regards

Thomas


Re: gfortran static linking under OS X (was: Re: )

2021-03-20 Thread Daniel Feenberg via Fortran
On 3/19/21, Iain Sandoe  wrote:

>> On Fri, 19 Mar 2021, Tobias Burnus wrote:

>
> you should be able to work around this without changing the compiler or
> rebuilding it,
>
> find
>
> /path/to/compiler/install/lib/libgfortran.spec
>
> make a copy of that (for backup only)
>
> the file contains something like:
>
> #
> # This spec file is read by gfortran when linking.
> # It is used to specify the libraries we need to link in, in the right
> # order.
> #
>
> %rename lib liborig
> *lib:  -lquadmath -lm %(libgcc) %(liborig)
>
> change the last line line to :
>
> *lib: %{!static-libgfortran: -lquadmath } %{static-libgfortran:
> libquadmath.a%s} %(libgcc) %(liborig)
>
> ===
>
> and try your link again
>

Tried that, the error message is:

   ld: library not found for -lSystem

Indeed there is no libsystem.a anywhere on the computer. Any ideas?

Daniel Feenberg


Re: gfortran static linking under OS X (was: Re: )

2021-03-20 Thread Iain Sandoe via Fortran

Daniel Feenberg  wrote:


On 3/19/21, Iain Sandoe  wrote:


On Fri, 19 Mar 2021, Tobias Burnus wrote:



you should be able to work around this without changing the compiler or
rebuilding it,



%rename lib liborig
*lib:  -lquadmath -lm %(libgcc) %(liborig)

change the last line line to :

*lib: %{!static-libgfortran: -lquadmath } %{static-libgfortran:
libquadmath.a%s} %(libgcc) %(liborig)


^^ this line is presumably not broken in your file - i.e. this is a mailer
phenomenon?


===

and try your link again


Tried that, the error message is:

  ld: library not found for -lSystem


Please could you either file a PR or send the output of

/your complete command line/ with ‘-save-temps -v’ appended

to me off-list.



For the record, this was not completely theoretical on my part; I actually  
tried this on a macOS 11.2.3 system with gcc-6.5 (which is the closest I  
have to what you’re using)


…./gcc-6-5/bin/gfortran /source/test/fortran/hello.f -static-libgfortran  
-static-libgcc -o h


$  otool -Lv h
h:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
version 1292.60.1)
time stamp 2 Thu Jan  1 01:00:02 1970

This ^^ is what I expect to see;
libgfortran, libquadmath and libgcc have all been linked statically,  
leaving only

the "/usr/lib/libSystem.B.dylib” which is fine and expected.


Indeed there is no libsystem.a anywhere on the computer.


macOS does not allow the equivalent of a “completely statically linked”  
user-mode
executable.  Exes are always started by “dyld” (dynamic linker) and they  
always refer

to libSystem.dylib.

So you should never be needing to find a libSystem.a (there isn’t one, as  
you found).
Nor do you need to care about it - since it’s available to all your  
end-users as part

of their system (as are things like the Accelerate framework).


Any ideas?


I am somewhat surprised that 6.3 behaves any differently from 6.5 - let’s  
investigate a little more.


cheers
Iain