public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/46539] New: libquadmath: Add -static-libquadmath
@ 2010-11-18 13:06 burnus at gcc dot gnu.org
  2010-11-25 11:30 ` [Bug fortran/46539] " burnus at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-11-18 13:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46539

           Summary: libquadmath: Add -static-libquadmath
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


One should add such a flag. For some systems such as Darwin, it needs more
changes than to the general argument handling (gcc/gcc.c?)

Cf. http://gcc.gnu.org/ml/fortran/2010-11/msg00273.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/46539] libquadmath: Add -static-libquadmath
  2010-11-18 13:06 [Bug fortran/46539] New: libquadmath: Add -static-libquadmath burnus at gcc dot gnu.org
@ 2010-11-25 11:30 ` burnus at gcc dot gnu.org
  2012-03-22 16:46 ` arnaud02 at users dot sourceforge.net
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-11-25 11:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46539

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-11-25 11:22:08 UTC ---
cf. http://gcc.gnu.org/ml/fortran/2010-11/msg00348.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/46539] libquadmath: Add -static-libquadmath
  2010-11-18 13:06 [Bug fortran/46539] New: libquadmath: Add -static-libquadmath burnus at gcc dot gnu.org
  2010-11-25 11:30 ` [Bug fortran/46539] " burnus at gcc dot gnu.org
@ 2012-03-22 16:46 ` arnaud02 at users dot sourceforge.net
  2012-03-22 18:18 ` burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: arnaud02 at users dot sourceforge.net @ 2012-03-22 16:46 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46539

Arnaud Desitter <arnaud02 at users dot sourceforge.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arnaud02 at users dot
                   |                            |sourceforge.net

--- Comment #2 from Arnaud Desitter <arnaud02 at users dot sourceforge.net> 2012-03-22 16:40:41 UTC ---
I hit this problem. For the application I am dealing with, I need to link
statically the compiler provided libraries while linking dynamically the system
ones (pthread, mpi, etc.).

Linking with "gfortran -static-libgfortran -static-libgcc -Wl,-Bstatic -lstdc++
-Wl,-Bdynamic" solves the problem except for "libquadmath.so.0".

Linking with "-Wl,-Bstatic -lquadmath -Wl,-Bdynamic" does not help.

The only workaround I found is to configure gcc with "configure
--disable-libquadmath-support".

Could you please implement "-static-libquadmath" or make "-Wl,-Bstatic
-lquadmath -Wl,-Bdynamic" work?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/46539] libquadmath: Add -static-libquadmath
  2010-11-18 13:06 [Bug fortran/46539] New: libquadmath: Add -static-libquadmath burnus at gcc dot gnu.org
  2010-11-25 11:30 ` [Bug fortran/46539] " burnus at gcc dot gnu.org
  2012-03-22 16:46 ` arnaud02 at users dot sourceforge.net
@ 2012-03-22 18:18 ` burnus at gcc dot gnu.org
  2012-03-28 10:08 ` arnaud02 at users dot sourceforge.net
  2014-10-04 13:52 ` fxcoudert at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-03-22 18:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46539

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-03-22 17:31:41 UTC ---
(In reply to comment #2)
> I hit this problem. For the application I am dealing with, I need to link
> statically the compiler provided libraries while linking dynamically the system
> ones (pthread, mpi, etc.).
> 
> Linking with "gfortran -static-libgfortran -static-libgcc -Wl,-Bstatic -lstdc++
> -Wl,-Bdynamic" solves the problem except for "libquadmath.so.0".

Work arounds:

You could try to link with "gcc" rather than with gfortran, but you then need
to explicitly include the gfortran, quadmath and m(ath) library:

  gcc -static-libgcc -Wl,-Bstatic -lstdc++ -lgfortran -lquadmath -Wl,-Bdynamic
-lm

as that avoids "gfortran"'s special treatment of libquadmath. [You might
consider to add -Wl,--as-needed ... -Wl,--no-as-needed. That avoids linking
files when they are not needed.]


An alternative is to modify libgfortran.spec - and add there the "-Bstatic" ...
"-Bdynamic" unconditionally. Or you create your own .spec file and load it via
-specs=<filename>   (The "libgfortran.spec" file is a text file in the
installed GCC tree; e.g. it could be <prefix>/lib*/libgfortran.spec. If you use
GCC/gfortran with "-v" the output should inform you about which file has been
read - and how the linker is called.)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/46539] libquadmath: Add -static-libquadmath
  2010-11-18 13:06 [Bug fortran/46539] New: libquadmath: Add -static-libquadmath burnus at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-03-22 18:18 ` burnus at gcc dot gnu.org
@ 2012-03-28 10:08 ` arnaud02 at users dot sourceforge.net
  2014-10-04 13:52 ` fxcoudert at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: arnaud02 at users dot sourceforge.net @ 2012-03-28 10:08 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46539

--- Comment #4 from Arnaud Desitter <arnaud02 at users dot sourceforge.net> 2012-03-28 10:05:29 UTC ---
Thanks for the workarounds. 

For information, the Intel Fortran compiler has "-static-intel" which links
statically Intel provided libraries. Such option may be un-practical for gcc.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/46539] libquadmath: Add -static-libquadmath
  2010-11-18 13:06 [Bug fortran/46539] New: libquadmath: Add -static-libquadmath burnus at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-03-28 10:08 ` arnaud02 at users dot sourceforge.net
@ 2014-10-04 13:52 ` fxcoudert at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-10-04 13:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46539

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-10-04
                 CC|                            |fxcoudert at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |fxcoudert at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #5 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Patch proposed here: https://gcc.gnu.org/ml/gcc-patches/2014-10/msg00375.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-10-04 13:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-18 13:06 [Bug fortran/46539] New: libquadmath: Add -static-libquadmath burnus at gcc dot gnu.org
2010-11-25 11:30 ` [Bug fortran/46539] " burnus at gcc dot gnu.org
2012-03-22 16:46 ` arnaud02 at users dot sourceforge.net
2012-03-22 18:18 ` burnus at gcc dot gnu.org
2012-03-28 10:08 ` arnaud02 at users dot sourceforge.net
2014-10-04 13:52 ` fxcoudert at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).