public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][4.8][4.7][4.6] Make -shared-libgcc the default on Cygwin.
@ 2013-03-12  1:42 Dave Korn
  2013-03-12  8:59 ` Richard Biener
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Korn @ 2013-03-12  1:42 UTC (permalink / raw)
  To: GCC Patches; +Cc: Jakub Jelinek

[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]


    Hello list,

  The attached patch makes -shared-libgcc the default for Cygwin.  This is
something that I should have done some time ago, as shared libgcc on Cygwin is
more than mature.  What's more, it is vital for reliable compilation of
applications that throw exceptions or share TLS variables from DLLs into the
main executable; at present these compile incorrectly without an explicit
-shared-libgcc.  For instance, the just-released MPFR-3.1.2 doesn't work
without it.

  Given that it's a very simple tweak to the compiler specs on a single
platform only, I would like to use my target maintainer's discretion to apply
it even at this late stage, but I figure it's so close to RC1 that I should
ask the RM's permission anyway.

  I'd also like to backport it to all the currently-open branches.

gcc/ChangeLog

2013-03-12  Dave Korn  <dave.korn.cygwin@....>

	* config/i386/cygwin.h (SHARED_LIBGCC_SPEC): Make shared libgcc the
	default setting.

  Is this OK by everyone?

    cheers,
      DaveK




[-- Attachment #2: cygwin-shared-libgcc-default.diff --]
[-- Type: text/x-c, Size: 534 bytes --]

Index: gcc/config/i386/cygwin.h
===================================================================
--- gcc/config/i386/cygwin.h	(revision 196604)
+++ gcc/config/i386/cygwin.h	(working copy)
@@ -48,11 +48,7 @@ along with GCC; see the file COPYING3.  If not see
  %{static|static-libgcc:-lgcc -lgcc_eh} \
  %{!static: \
    %{!static-libgcc: \
-     %{!shared: \
-       %{!shared-libgcc:-lgcc -lgcc_eh} \
-       %{shared-libgcc:-lgcc_s -lgcc} \
-      } \
-     %{shared:-lgcc_s -lgcc} \
+     -lgcc_s -lgcc \
     } \
   } "
 #else

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

* Re: [PATCH][4.8][4.7][4.6] Make -shared-libgcc the default on Cygwin.
  2013-03-12  1:42 [PATCH][4.8][4.7][4.6] Make -shared-libgcc the default on Cygwin Dave Korn
@ 2013-03-12  8:59 ` Richard Biener
  2013-03-13 15:27   ` Dave Korn
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Biener @ 2013-03-12  8:59 UTC (permalink / raw)
  To: Dave Korn; +Cc: GCC Patches, Jakub Jelinek

On Tue, Mar 12, 2013 at 2:44 AM, Dave Korn <dave.korn.cygwin@gmail.com> wrote:
>
>     Hello list,
>
>   The attached patch makes -shared-libgcc the default for Cygwin.  This is
> something that I should have done some time ago, as shared libgcc on Cygwin is
> more than mature.  What's more, it is vital for reliable compilation of
> applications that throw exceptions or share TLS variables from DLLs into the
> main executable; at present these compile incorrectly without an explicit
> -shared-libgcc.  For instance, the just-released MPFR-3.1.2 doesn't work
> without it.
>
>   Given that it's a very simple tweak to the compiler specs on a single
> platform only, I would like to use my target maintainer's discretion to apply
> it even at this late stage, but I figure it's so close to RC1 that I should
> ask the RM's permission anyway.
>
>   I'd also like to backport it to all the currently-open branches.
>
> gcc/ChangeLog
>
> 2013-03-12  Dave Korn  <dave.korn.cygwin@....>
>
>         * config/i386/cygwin.h (SHARED_LIBGCC_SPEC): Make shared libgcc the
>         default setting.
>
>   Is this OK by everyone?

Ok for trunk (4.8).  Please add a documentation entry to gcc-4.8/changes.html.

I'm not sure whether this kind of stuff should change on a release branch,
I'll defer to others for this.  Still, if you backport it, add a
gcc-4.x/changes.html
item to the sub-release sections.

Richard.

>     cheers,
>       DaveK
>
>
>

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

* Re: [PATCH][4.8][4.7][4.6] Make -shared-libgcc the default on Cygwin.
  2013-03-12  8:59 ` Richard Biener
@ 2013-03-13 15:27   ` Dave Korn
  2013-08-18 12:14     ` Gerald Pfeifer
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Korn @ 2013-03-13 15:27 UTC (permalink / raw)
  To: Richard Biener; +Cc: GCC Patches, Jakub Jelinek

[-- Attachment #1: Type: text/plain, Size: 1898 bytes --]

On 12/03/2013 08:59, Richard Biener wrote:
> On Tue, Mar 12, 2013 at 2:44 AM, Dave Korn <dave.korn.cygwin@gmail.com> wrote:
>>     Hello list,
>>
>>   The attached patch makes -shared-libgcc the default for Cygwin.  This is
>> something that I should have done some time ago, as shared libgcc on Cygwin is
>> more than mature.  What's more, it is vital for reliable compilation of
>> applications that throw exceptions or share TLS variables from DLLs into the
>> main executable; at present these compile incorrectly without an explicit
>> -shared-libgcc.  For instance, the just-released MPFR-3.1.2 doesn't work
>> without it.
>>
>>   Given that it's a very simple tweak to the compiler specs on a single
>> platform only, I would like to use my target maintainer's discretion to apply
>> it even at this late stage, but I figure it's so close to RC1 that I should
>> ask the RM's permission anyway.
>>
>>   I'd also like to backport it to all the currently-open branches.
>>
>> gcc/ChangeLog
>>
>> 2013-03-12  Dave Korn  <dave.korn.cygwin@....>
>>
>>         * config/i386/cygwin.h (SHARED_LIBGCC_SPEC): Make shared libgcc the
>>         default setting.
>>
>>   Is this OK by everyone?
> 
> Ok for trunk (4.8).  Please add a documentation entry to gcc-4.8/changes.html.

  Committed revision 196634, with the attached documentation update and cvs
log entry:

	* htdocs/gcc-4.8/changes.html: Add OS-specific section and entry
	for Windows (Cygwin).

> I'm not sure whether this kind of stuff should change on a release branch,
> I'll defer to others for this.  Still, if you backport it, add a
> gcc-4.x/changes.html item to the sub-release sections.

  Would still like to do this, as it's important for correctness in anything
that links against shared libraries, and it'll only have to be maintained as a
local patch to any Cygwin distro version of GCC if we don't.

    cheers,
      DaveK


[-- Attachment #2: cygwin-shared-libgcc-default-doc-applied.diff --]
[-- Type: text/x-c, Size: 1084 bytes --]

Index: htdocs/gcc-4.8/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/changes.html,v
retrieving revision 1.105
diff -p -u -r1.105 changes.html
--- htdocs/gcc-4.8/changes.html	27 Feb 2013 19:24:43 -0000	1.105
+++ htdocs/gcc-4.8/changes.html	13 Mar 2013 15:19:44 -0000
@@ -805,6 +805,20 @@ B b(42); // OK
     command-line option.</li>
   </ul>
 
+<h2 id="os">Operating Systems</h2>
+
+<h3 id="windows">Windows (Cygwin)</h3>
+  <ul>
+    <li>Executables are now linked against shared libgcc by default.
+    The previous default was to link statically, which can still be
+    done by explicitly specifying -static or -static-libgcc on the
+    command line.  However it is strongly advised against, as it
+    will cause problems for any application that makes use of DLLs
+    compiled by GCC.  It should be alright for a monolithic stand-alone
+    application that only links against the Windows OS DLLs, but
+    offers little or no benefit.</li>
+  </ul>
+
 <!--
 <h2>Documentation improvements</h2>
 -->

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

* Re: [PATCH][4.8][4.7][4.6] Make -shared-libgcc the default on Cygwin.
  2013-03-13 15:27   ` Dave Korn
@ 2013-08-18 12:14     ` Gerald Pfeifer
  0 siblings, 0 replies; 4+ messages in thread
From: Gerald Pfeifer @ 2013-08-18 12:14 UTC (permalink / raw)
  To: Dave Korn; +Cc: Richard Biener, gcc-patches, Jakub Jelinek

On Wed, 13 Mar 2013, Dave Korn wrote:
>   Committed revision 196634, with the attached documentation update and cvs
> log entry:
> 
> 	* htdocs/gcc-4.8/changes.html: Add OS-specific section and entry
> 	for Windows (Cygwin).

I applied this small editorial patch.

Gerald

Index: changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/changes.html,v
retrieving revision 1.119
diff -u -3 -p -r1.119 changes.html
--- changes.html	31 May 2013 08:49:25 -0000	1.119
+++ changes.html	18 Aug 2013 11:56:32 -0000
@@ -143,7 +143,7 @@ by this change.</p>
 	<code>-fsanitize=thread</code>. Instructions will be instrumented to
 	detect data races. The ThreadSanitizer is available on x86-64
 	GNU/Linux.</li>
-    <li>A new local register allocator has been implemented, which
+    <li>A new local register allocator (LRA) has been implemented, which
         replaces the 26 year old reload pass and improves generated
         code quality.  For now it is active on the ia32 and x86-64
         targets.</li>
@@ -858,11 +858,12 @@ int i = A().f();  // error, f() requires
   <ul>
     <li>Executables are now linked against shared libgcc by default.
     The previous default was to link statically, which can still be
-    done by explicitly specifying -static or -static-libgcc on the
+    done by explicitly specifying <code>-static</code> or
+    <code>static-libgcc</code> on the
     command line.  However it is strongly advised against, as it
     will cause problems for any application that makes use of DLLs
     compiled by GCC.  It should be alright for a monolithic stand-alone
-    application that only links against the Windows OS DLLs, but
+    application that only links against the Windows DLLs, but
     offers little or no benefit.</li>
   </ul>
 

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

end of thread, other threads:[~2013-08-18 12:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-12  1:42 [PATCH][4.8][4.7][4.6] Make -shared-libgcc the default on Cygwin Dave Korn
2013-03-12  8:59 ` Richard Biener
2013-03-13 15:27   ` Dave Korn
2013-08-18 12:14     ` Gerald Pfeifer

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