Re: [Mingw-w64-public] Revert [ca451a] Handle __CTOR_LIST__ internally within mingw-w64

2016-03-02 Thread JonY
On 3/2/2016 18:55, Mateusz wrote:
> I don't have access rights to apply.
> 
> If you have ready patch that enables __MINGW_CTOR_LIST__ only when
> building with clang it will be the best solution before release of ver.
> 5. If not, please revert this commit -- you have the access rights.
> 

Reverted for now.



0xD4EBC740.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Revert [ca451a] Handle __CTOR_LIST__ internally within mingw-w64

2016-03-02 Thread Mateusz

I don't have access rights to apply.

If you have ready patch that enables __MINGW_CTOR_LIST__ only when 
building with clang it will be the best solution before release of ver. 
5. If not, please revert this commit -- you have the access rights.


Mateusz

W dniu 2016-03-01 o 21:31, Martell Malone pisze:

You have my go ahead to apply.

There is a header setting for when building gcc or rather libgcc to 
specify that ctors and dtors are provided by the c runtime.

This is usually enabled for some embedded targets.

Alternatively I could only enable that when we build the crt with 
clang and not gcc.
This would then mean that we can't use compiler-rt with mingw-w64 crt 
built with gcc and that we can't use libgcc with a clang built 
mingw-w64 crt.

I can probably live with that.

The correct fix would be to upstream a patch into libgcc to assume it 
is external from now on.

Might be hard to get that merged because of legacy support though.

I will provide a follow up patch to enable this only when building 
with clang


On Tue, Mar 1, 2016 at 12:25 PM, Mateusz > wrote:


Hi,

I think we should revert commit [ca451a] Handle __CTOR_LIST__
internally within mingw-w64

It is not ready yet and makes serious problems for GCC.

Mateusz



--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/mingw-w64-public




--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140


___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Revert [ca451a] Handle __CTOR_LIST__ internally within mingw-w64

2016-03-02 Thread JonY
On 3/2/2016 04:25, Mateusz wrote:
> Hi,
> 
> I think we should revert commit [ca451a] Handle __CTOR_LIST__ internally
> within mingw-w64
> 
> It is not ready yet and makes serious problems for GCC.
> 

Go ahead, thanks.



0xD4EBC740.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Revert [ca451a] Handle __CTOR_LIST__ internally within mingw-w64

2016-03-01 Thread Carl Kleffner
I can confirm, that gcc5.3.0 also fails with this commit, see
https://github.com/mingwpy/mingwpy/issues/7.

carl

2016-03-01 21:31 GMT+01:00 Martell Malone :

> You have my go ahead to apply.
>
> There is a header setting for when building gcc or rather libgcc to
> specify that ctors and dtors are provided by the c runtime.
> This is usually enabled for some embedded targets.
>
> Alternatively I could only enable that when we build the crt with clang
> and not gcc.
> This would then mean that we can't use compiler-rt with mingw-w64 crt
> built with gcc and that we can't use libgcc with a clang built mingw-w64
> crt.
> I can probably live with that.
>
> The correct fix would be to upstream a patch into libgcc to assume it is
> external from now on.
> Might be hard to get that merged because of legacy support though.
>
> I will provide a follow up patch to enable this only when building with
> clang
>
> On Tue, Mar 1, 2016 at 12:25 PM, Mateusz  wrote:
>
>> Hi,
>>
>> I think we should revert commit [ca451a] Handle __CTOR_LIST__ internally
>> within mingw-w64
>>
>> It is not ready yet and makes serious problems for GCC.
>>
>> Mateusz
>>
>>
>>
>> --
>> Site24x7 APM Insight: Get Deep Visibility into Application Performance
>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
>> Monitor end-to-end web transactions and take corrective actions now
>> Troubleshoot faster and improve end-user experience. Signup Now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
>> ___
>> Mingw-w64-public mailing list
>> Mingw-w64-public@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>>
>>
>
>
> --
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Revert [ca451a] Handle __CTOR_LIST__ internally within mingw-w64

2016-03-01 Thread Martell Malone
You have my go ahead to apply.

There is a header setting for when building gcc or rather libgcc to specify
that ctors and dtors are provided by the c runtime.
This is usually enabled for some embedded targets.

Alternatively I could only enable that when we build the crt with clang and
not gcc.
This would then mean that we can't use compiler-rt with mingw-w64 crt built
with gcc and that we can't use libgcc with a clang built mingw-w64 crt.
I can probably live with that.

The correct fix would be to upstream a patch into libgcc to assume it is
external from now on.
Might be hard to get that merged because of legacy support though.

I will provide a follow up patch to enable this only when building with
clang

On Tue, Mar 1, 2016 at 12:25 PM, Mateusz  wrote:

> Hi,
>
> I think we should revert commit [ca451a] Handle __CTOR_LIST__ internally
> within mingw-w64
>
> It is not ready yet and makes serious problems for GCC.
>
> Mateusz
>
>
>
> --
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] Revert [ca451a] Handle __CTOR_LIST__ internally within mingw-w64

2016-03-01 Thread Mateusz

Hi,

I think we should revert commit [ca451a] Handle __CTOR_LIST__ internally 
within mingw-w64


It is not ready yet and makes serious problems for GCC.

Mateusz

diff --git a/mingw-w64-crt/crt/gccmain.c b/mingw-w64-crt/crt/gccmain.c
index ba50691..fc0e350 100644
--- a/mingw-w64-crt/crt/gccmain.c
+++ b/mingw-w64-crt/crt/gccmain.c
@@ -9,15 +9,8 @@
 #include 
 
 typedef void (*func_ptr) (void);
-#define STATIC static
-
-STATIC func_ptr __MINGW_CTOR_LIST__[1]
-  __attribute__ ((__used__, section(".ctors"), aligned(sizeof(func_ptr
-  = { (func_ptr) (-1) };
-
-STATIC func_ptr __MINGW_DTOR_LIST__[1]
-  __attribute__((section(".dtors"), aligned(sizeof(func_ptr
-  = { (func_ptr) (-1) };
+extern func_ptr __CTOR_LIST__[];
+extern func_ptr __DTOR_LIST__[];
 
 void __do_global_dtors (void);
 void __do_global_ctors (void);
@@ -26,7 +19,7 @@ void __main (void);
 void
 __do_global_dtors (void)
 {
-  static func_ptr *p = __MINGW_DTOR_LIST__ + 1;
+  static func_ptr *p = __DTOR_LIST__ + 1;
 
   while (*p)
 {
@@ -38,17 +31,17 @@ __do_global_dtors (void)
 void
 __do_global_ctors (void)
 {
-  unsigned long nptrs = (unsigned long) (ptrdiff_t) __MINGW_CTOR_LIST__[0];
+  unsigned long nptrs = (unsigned long) (ptrdiff_t) __CTOR_LIST__[0];
   unsigned long i;
 
   if (nptrs == (unsigned long) -1)
 {
-  for (nptrs = 0; __MINGW_CTOR_LIST__[nptrs + 1] != 0; nptrs++);
+  for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++);
 }
 
   for (i = nptrs; i >= 1; i--)
 {
-  __MINGW_CTOR_LIST__[i] ();
+  __CTOR_LIST__[i] ();
 }
 
   atexit (__do_global_dtors);
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public