public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/31400]  New: enable static linking of support libraries through -static-libXY
@ 2007-03-30 12:14 dfranke at gcc dot gnu dot org
  2007-03-30 14:48 ` [Bug other/31400] " hjl at lucon dot org
                   ` (20 more replies)
  0 siblings, 21 replies; 23+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-03-30 12:14 UTC (permalink / raw)
  To: gcc-bugs

To deploy testing versions of applications built with (yet unreleased) versions
of gcc may be difficult due to linked in libraries as libgfortran and libgomp.

Similar to -static-libgcc, options like -static-libgfortran or -static-libgomp
would help to avoid problems. Especially for libgomp, one can not simply use
LDFLAGS=-static as libgomp pulls in libpthread and static linking is not
supported with libpthread (see PR30471, PR30613).


-- 
           Summary: enable static linking of support libraries through -
                    static-libXY
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dfranke at gcc dot gnu dot org


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
@ 2007-03-30 14:48 ` hjl at lucon dot org
  2007-03-30 15:23 ` pinskia at gcc dot gnu dot org
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: hjl at lucon dot org @ 2007-03-30 14:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hjl at lucon dot org  2007-03-30 15:47 -------
You may want to look at

http://gcc.gnu.org/ml/gcc/2005-12/msg00783.html


-- 

hjl at lucon dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl at lucon dot org
            Summary|enable static linking of    |enable static linking of
                   |support libraries through - |support libraries through -
                   |static-libXY                |static-libXY


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
  2007-03-30 14:48 ` [Bug other/31400] " hjl at lucon dot org
@ 2007-03-30 15:23 ` pinskia at gcc dot gnu dot org
  2007-03-30 15:30 ` dfranke at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-03-30 15:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-03-30 16:22 -------
In general this is wrong.  There are reasons why you don't want static linking.
 code size/memory usage is one of them.


-- 


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
  2007-03-30 14:48 ` [Bug other/31400] " hjl at lucon dot org
  2007-03-30 15:23 ` pinskia at gcc dot gnu dot org
@ 2007-03-30 15:30 ` dfranke at gcc dot gnu dot org
  2007-04-18 17:49 ` fxcoudert at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-03-30 15:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dfranke at gcc dot gnu dot org  2007-03-30 16:30 -------
Andrew, I agree that static linking should not be overused. But there are valid
cases where one may want to do it anyway. Deploying a testing application may
be one of them. Asking the user to compile gcc from scratch just to get the
latest libraries is usually not an option. Delivering a bunch of libraries
together with the binary may mess up the customers system, especially if it is
a test-and-discard like approach.

Given the two PRs I cited plus the thread H. J. pointed out, there are people
looking for options like the ones requested here.


-- 


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-03-30 15:30 ` dfranke at gcc dot gnu dot org
@ 2007-04-18 17:49 ` fxcoudert at gcc dot gnu dot org
  2007-05-07 11:18 ` fxcoudert at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-04-18 17:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from fxcoudert at gcc dot gnu dot org  2007-04-18 18:48 -------
I certainly agree that we should have an option to ask the driver to link
libgfortran statically.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-04-18 18:48:48
               date|                            |


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-04-18 17:49 ` fxcoudert at gcc dot gnu dot org
@ 2007-05-07 11:18 ` fxcoudert at gcc dot gnu dot org
  2007-06-14 12:13 ` fxcoudert at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-05-07 11:18 UTC (permalink / raw)
  To: gcc-bugs



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |fxcoudert at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-04-18 18:48:48         |2007-05-07 12:18:33
               date|                            |


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2007-05-07 11:18 ` fxcoudert at gcc dot gnu dot org
@ 2007-06-14 12:13 ` fxcoudert at gcc dot gnu dot org
  2007-06-27 22:58 ` fxcoudert at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-06-14 12:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from fxcoudert at gcc dot gnu dot org  2007-06-14 12:13 -------
Still pinging for someone to review my one-line patch to gcc.c... maybe we can
get this feature into trunk before GCC 12.0 ;-)


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|http://gcc.gnu.org/ml/gcc-  |http://gcc.gnu.org/ml/gcc-
                   |patches/2007-               |patches/2007-
                   |05/msg00394.html            |06/msg00956.html


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2007-06-14 12:13 ` fxcoudert at gcc dot gnu dot org
@ 2007-06-27 22:58 ` fxcoudert at gcc dot gnu dot org
  2007-06-27 23:00 ` fxcoudert at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-06-27 22:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from fxcoudert at gcc dot gnu dot org  2007-06-27 22:58 -------
Subject: Bug 31400

Author: fxcoudert
Date: Wed Jun 27 22:58:37 2007
New Revision: 126068

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126068
Log:
        PR other/31400

        * gcc.c (process_command): Recognize the new -static-libgfortran
        option.

        * lang.opt (static-libgfortran): New option.
        * gfortranspec.c (ADD_ARG_LIBGFORTRAN): New macro.
        (Option): Add OPTION_static and OPTION_static_libgfortran.
        (lookup_option): Handle the new -static-libgfortran option.
        (lang_specific_driver): Check whether -static is passed.
        Handle the new -static-libgfortran option.
        * options.c (gfc_handle_option): If -static-libgfortran is
        passed and isn't supported on this configuration, error out.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortranspec.c
    trunk/gcc/fortran/lang.opt
    trunk/gcc/fortran/options.c
    trunk/gcc/gcc.c


-- 


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2007-06-27 22:58 ` fxcoudert at gcc dot gnu dot org
@ 2007-06-27 23:00 ` fxcoudert at gcc dot gnu dot org
  2007-06-28  7:00 ` dfranke at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-06-27 23:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from fxcoudert at gcc dot gnu dot org  2007-06-27 23:00 -------
Fixed on mainline.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2007-06-27 23:00 ` fxcoudert at gcc dot gnu dot org
@ 2007-06-28  7:00 ` dfranke at gcc dot gnu dot org
  2007-06-28  9:07 ` fxcoudert at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-06-28  7:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from dfranke at gcc dot gnu dot org  2007-06-28 07:00 -------
FX, thanks for your patch :)

As libgfortran is one of many, at least -static-libgomp would be nice to have
as well (others?). Reopening, so the request is not lost.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2007-06-28  7:00 ` dfranke at gcc dot gnu dot org
@ 2007-06-28  9:07 ` fxcoudert at gcc dot gnu dot org
  2008-06-17 18:16 ` hjl dot tools at gmail dot com
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-06-28  9:07 UTC (permalink / raw)
  To: gcc-bugs



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|fxcoudert at gcc dot gnu dot|unassigned at gcc dot gnu
                   |org                         |dot org
                URL|http://gcc.gnu.org/ml/gcc-  |
                   |patches/2007-               |
                   |06/msg00956.html            |
             Status|REOPENED                    |NEW
           Keywords|patch                       |
   Target Milestone|4.3.0                       |---
            Version|unknown                     |4.3.0


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2007-06-28  9:07 ` fxcoudert at gcc dot gnu dot org
@ 2008-06-17 18:16 ` hjl dot tools at gmail dot com
  2009-08-06 19:55 ` dfranke at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-06-17 18:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from hjl dot tools at gmail dot com  2008-06-17 18:16 -------
I can contribute a patch for -static-libc++/-static-libstdc++.


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian at airs dot com
            Version|4.3.0                       |4.4.0


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2008-06-17 18:16 ` hjl dot tools at gmail dot com
@ 2009-08-06 19:55 ` dfranke at gcc dot gnu dot org
  2010-04-09 17:05 ` jakub at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2009-08-06 19:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from dfranke at gcc dot gnu dot org  2009-08-06 19:54 -------
-static-libstdc++ was added for 4.5.0 (thanks!):
2009-06-25  Ian Lance Taylor  <iant@google.com>

        * g++spec.c (SKIPOPT): define.
        (lang_specific_driver): Handle -static-libstdc++.  Only add
        LIBSTDCXX_STATIC if we add LIBSTDCXX.

Any chance to ever get -static-libgomp? Otherwise this PR can probably be
closed?!


-- 


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2009-08-06 19:55 ` dfranke at gcc dot gnu dot org
@ 2010-04-09 17:05 ` jakub at gcc dot gnu dot org
  2010-04-09 17:42 ` iains at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-04-09 17:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jakub at gcc dot gnu dot org  2010-04-09 17:05 -------
The http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126068
patch adds OPTION_static, but nothing ever returns that value, so the code
setting static_linking is clearly dead code.  That couldn't be the intent.


-- 


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2010-04-09 17:05 ` jakub at gcc dot gnu dot org
@ 2010-04-09 17:42 ` iains at gcc dot gnu dot org
  2010-04-09 19:05 ` iains at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: iains at gcc dot gnu dot org @ 2010-04-09 17:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from iains at gcc dot gnu dot org  2010-04-09 17:42 -------
(In reply to comment #11)
> The http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126068
> patch adds OPTION_static, but nothing ever returns that value, so the code
> setting static_linking is clearly dead code.  That couldn't be the intent.

indeed:
how about this? (tested on ia32-pc-linux)

Index: gcc/fortran/gfortranspec.c
===================================================================
--- gcc/fortran/gfortranspec.c  (revision 158167)
+++ gcc/fortran/gfortranspec.c  (working copy)
@@ -186,6 +186,8 @@ lookup_option (Option *xopt, int *xskip, const cha
        opt = OPTION_syntax_only;
       else if (!strcmp (text, "-static-libgfortran"))
        opt = OPTION_static_libgfortran;
+      else if (!strcmp (text, "-static"))
+       opt = OPTION_static;
       else if (!strcmp (text, "-fversion"))    /* Really --version!! */
        opt = OPTION_version;
       else if (!strcmp (text, "-Xlinker") || !strcmp (text, "-specs"))
@@ -351,8 +353,7 @@ lang_specific_driver (int *in_argc, const char *co
 #ifdef HAVE_LD_STATIC_DYNAMIC
          static_linking = 1;
 #endif
-         /* Fall through, count OPTION_static as an item included in
-            the rewritten command line. */
+         break;

        case OPTION_l:
          ++n_infiles;


-- 

iains at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |iains at gcc dot gnu dot org


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2010-04-09 17:42 ` iains at gcc dot gnu dot org
@ 2010-04-09 19:05 ` iains at gcc dot gnu dot org
  2010-04-09 19:07 ` iains at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: iains at gcc dot gnu dot org @ 2010-04-09 19:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from iains at gcc dot gnu dot org  2010-04-09 19:04 -------
Created an attachment (id=20349)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20349&action=view)
check for -static in lookup_option.


        PR bootstrap/31400
        * gfortranspec.c (lookup_option): Check for -static and return
        OPTION_static.
        (lang_specific_driver): Break when OPTION_static is discovered.


-- 


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
                   ` (14 preceding siblings ...)
  2010-04-09 19:05 ` iains at gcc dot gnu dot org
@ 2010-04-09 19:07 ` iains at gcc dot gnu dot org
  2010-04-09 21:04 ` dfranke at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: iains at gcc dot gnu dot org @ 2010-04-09 19:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from iains at gcc dot gnu dot org  2010-04-09 19:06 -------
(In reply to comment #10)

> Any chance to ever get -static-libgomp? Otherwise this PR can probably be
> closed?!

On Darwin - I made it so that if -static-* is given for {stdc++,cc, fortran}
the specs cause a substitution for static libgomp.  Would that work for you?


-- 


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
                   ` (15 preceding siblings ...)
  2010-04-09 19:07 ` iains at gcc dot gnu dot org
@ 2010-04-09 21:04 ` dfranke at gcc dot gnu dot org
  2010-04-09 21:19 ` iains at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-04-09 21:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from dfranke at gcc dot gnu dot org  2010-04-09 21:04 -------
(In reply to comment #14)
> On Darwin - I made it so that if -static-* is given for {stdc++,cc, fortran}
> the specs cause a substitution for static libgomp.  Would that work for you?

Iain, I can't say as I can't parse your statement?! Could you elaborate a bit?
Thanks.


-- 


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
                   ` (16 preceding siblings ...)
  2010-04-09 21:04 ` dfranke at gcc dot gnu dot org
@ 2010-04-09 21:19 ` iains at gcc dot gnu dot org
  2010-04-09 21:28 ` dfranke at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: iains at gcc dot gnu dot org @ 2010-04-09 21:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from iains at gcc dot gnu dot org  2010-04-09 21:19 -------
(In reply to comment #15)
> (In reply to comment #14)
> > On Darwin - I made it so that if -static-* is given for {stdc++,cc, fortran}
> > the specs cause a substitution for static libgomp.  Would that work for you?
> 
> Iain, I can't say as I can't parse your statement?! Could you elaborate a bit?
> Thanks.

Sorry ;) - specs processing.

It's possible to detect that "-static-libgfortran" has been given on the
command line and cause that to substitute libgomp.a instead of libgomp.so.

I arranged that this would happen on darwin if any of libgcc, libstdc++ or
libgfortran were made static  (for reasons of unwind symbol consistency, rather
than to satisfy a requirement for static-libgomp).

I think it's more difficult to approach libgomp directly - since it doesn't
"belong" to any specific language - therefore whatever changes you effect to it
need to be coordinated between all FEs.

Having said that, there was a comment made that libgomp.spec might be "going
away".

Does that help?


-- 


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
                   ` (17 preceding siblings ...)
  2010-04-09 21:19 ` iains at gcc dot gnu dot org
@ 2010-04-09 21:28 ` dfranke at gcc dot gnu dot org
  2010-04-09 21:51 ` iains at gcc dot gnu dot org
  2010-04-13 11:37 ` iains at gcc dot gnu dot org
  20 siblings, 0 replies; 23+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-04-09 21:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from dfranke at gcc dot gnu dot org  2010-04-09 21:28 -------
(In reply to comment #16)
> Does that help?

Much. Thanks. :)

Don't know if this is still a problem, but #0 has:
> for libgomp, one can not simply use LDFLAGS=-static as libgomp pulls in
> libpthread and static linking is not supported with libpthread

Question being, is there a difference between darwin and, say, our average
linux box, that allows static linking with the one, but not with the other? In
PR30471, comment #7, Jakub once posted a semi work around to this question.


-- 


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
                   ` (18 preceding siblings ...)
  2010-04-09 21:28 ` dfranke at gcc dot gnu dot org
@ 2010-04-09 21:51 ` iains at gcc dot gnu dot org
  2010-04-13 11:37 ` iains at gcc dot gnu dot org
  20 siblings, 0 replies; 23+ messages in thread
From: iains at gcc dot gnu dot org @ 2010-04-09 21:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from iains at gcc dot gnu dot org  2010-04-09 21:51 -------
(In reply to comment #17)

> Question being, is there a difference between darwin and, say, our average
> linux box, that allows static linking with the one, but not with the other?

yes, there is a significant difference - threads are part of libSystem on
darwin (which is always linked dynamically).  So I guess that this is not a
solution.


-- 


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
  2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
                   ` (19 preceding siblings ...)
  2010-04-09 21:51 ` iains at gcc dot gnu dot org
@ 2010-04-13 11:37 ` iains at gcc dot gnu dot org
  20 siblings, 0 replies; 23+ messages in thread
From: iains at gcc dot gnu dot org @ 2010-04-13 11:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from iains at gcc dot gnu dot org  2010-04-13 11:37 -------
Subject: Bug 31400

Author: iains
Date: Tue Apr 13 11:37:34 2010
New Revision: 158262

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158262
Log:
gcc/fortran:
2010-04-13  Iain Sandoe  <iains@gcc.gnu.org>

        PR bootstrap/31400
        * gfortranspec.c (lookup_option): Check for -static and return
        OPTION_static.
        (lang_specific_driver): Break when OPTION_static is discovered.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortranspec.c


-- 


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


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

* [Bug other/31400] enable static linking of support libraries through -static-libXY
       [not found] <bug-31400-4@http.gcc.gnu.org/bugzilla/>
@ 2011-06-19 18:26 ` arsenm2 at rpi dot edu
  0 siblings, 0 replies; 23+ messages in thread
From: arsenm2 at rpi dot edu @ 2011-06-19 18:26 UTC (permalink / raw)
  To: gcc-bugs

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

Matt Arsenault <arsenm2 at rpi dot edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arsenm2 at rpi dot edu

--- Comment #20 from Matt Arsenault <arsenm2 at rpi dot edu> 2011-06-19 18:25:27 UTC ---
I would find the -static-libgomp option useful


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

end of thread, other threads:[~2011-06-19 18:26 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-30 12:14 [Bug other/31400] New: enable static linking of support libraries through -static-libXY dfranke at gcc dot gnu dot org
2007-03-30 14:48 ` [Bug other/31400] " hjl at lucon dot org
2007-03-30 15:23 ` pinskia at gcc dot gnu dot org
2007-03-30 15:30 ` dfranke at gcc dot gnu dot org
2007-04-18 17:49 ` fxcoudert at gcc dot gnu dot org
2007-05-07 11:18 ` fxcoudert at gcc dot gnu dot org
2007-06-14 12:13 ` fxcoudert at gcc dot gnu dot org
2007-06-27 22:58 ` fxcoudert at gcc dot gnu dot org
2007-06-27 23:00 ` fxcoudert at gcc dot gnu dot org
2007-06-28  7:00 ` dfranke at gcc dot gnu dot org
2007-06-28  9:07 ` fxcoudert at gcc dot gnu dot org
2008-06-17 18:16 ` hjl dot tools at gmail dot com
2009-08-06 19:55 ` dfranke at gcc dot gnu dot org
2010-04-09 17:05 ` jakub at gcc dot gnu dot org
2010-04-09 17:42 ` iains at gcc dot gnu dot org
2010-04-09 19:05 ` iains at gcc dot gnu dot org
2010-04-09 19:07 ` iains at gcc dot gnu dot org
2010-04-09 21:04 ` dfranke at gcc dot gnu dot org
2010-04-09 21:19 ` iains at gcc dot gnu dot org
2010-04-09 21:28 ` dfranke at gcc dot gnu dot org
2010-04-09 21:51 ` iains at gcc dot gnu dot org
2010-04-13 11:37 ` iains at gcc dot gnu dot org
     [not found] <bug-31400-4@http.gcc.gnu.org/bugzilla/>
2011-06-19 18:26 ` arsenm2 at rpi dot edu

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).