[Bug other/31400] enable static linking of support libraries through -static-libXY

2017-11-14 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31400

--- Comment #21 from janus at gcc dot gnu.org ---
(In reply to Matt Arsenault from comment #20)
> I would find the -static-libgomp option useful

+1

[Bug other/31400] enable static linking of support libraries through -static-libXY

2011-06-19 Thread arsenm2 at rpi dot edu
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


[Bug other/31400] enable static linking of support libraries through -static-libXY

2010-04-13 Thread iains at gcc dot gnu dot org


--- 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=gccview=revrev=158262
Log:
gcc/fortran:
2010-04-13  Iain Sandoe  ia...@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



[Bug other/31400] enable static linking of support libraries through -static-libXY

2010-04-09 Thread jakub at gcc dot gnu dot org


--- Comment #11 from jakub at gcc dot gnu dot org  2010-04-09 17:05 ---
The http://gcc.gnu.org/viewcvs?root=gccview=revrev=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



[Bug other/31400] enable static linking of support libraries through -static-libXY

2010-04-09 Thread iains at gcc dot gnu dot org


--- 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=gccview=revrev=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



[Bug other/31400] enable static linking of support libraries through -static-libXY

2010-04-09 Thread iains at gcc dot gnu dot org


--- 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=20349action=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



[Bug other/31400] enable static linking of support libraries through -static-libXY

2010-04-09 Thread iains at gcc dot gnu dot org


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



[Bug other/31400] enable static linking of support libraries through -static-libXY

2010-04-09 Thread dfranke at gcc dot gnu dot org


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



[Bug other/31400] enable static linking of support libraries through -static-libXY

2010-04-09 Thread iains at gcc dot gnu dot org


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



[Bug other/31400] enable static linking of support libraries through -static-libXY

2010-04-09 Thread dfranke at gcc dot gnu dot org


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



[Bug other/31400] enable static linking of support libraries through -static-libXY

2010-04-09 Thread iains at gcc dot gnu dot org


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



[Bug other/31400] enable static linking of support libraries through -static-libXY

2009-08-06 Thread dfranke at gcc dot gnu dot org


--- 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  i...@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



[Bug other/31400] enable static linking of support libraries through -static-libXY

2008-06-17 Thread hjl dot tools at gmail dot com


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



[Bug other/31400] enable static linking of support libraries through -static-libXY

2007-06-28 Thread dfranke at gcc dot gnu dot org


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



[Bug other/31400] enable static linking of support libraries through -static-libXY

2007-06-28 Thread fxcoudert at gcc dot gnu dot org


-- 

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



[Bug other/31400] enable static linking of support libraries through -static-libXY

2007-06-27 Thread fxcoudert at gcc dot gnu dot org


--- 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=gccview=revrev=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



[Bug other/31400] enable static linking of support libraries through -static-libXY

2007-06-27 Thread fxcoudert at gcc dot gnu dot org


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



[Bug other/31400] enable static linking of support libraries through -static-libXY

2007-06-14 Thread fxcoudert at gcc dot gnu dot org


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



[Bug other/31400] enable static linking of support libraries through -static-libXY

2007-05-07 Thread fxcoudert at gcc dot gnu dot org


-- 

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



[Bug other/31400] enable static linking of support libraries through -static-libXY

2007-04-18 Thread fxcoudert at gcc dot gnu dot org


--- 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|-00-00 00:00:00 |2007-04-18 18:48:48
   date||


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



[Bug other/31400] enable static linking of support libraries through -static-libXY

2007-03-30 Thread hjl at lucon dot org


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