Web lists-archives.com

Re: [Mingw-users] GCC-4.9.3 is now our current release




The __EH_FRAME__ bug was fixed by reverting to the old behaviour,
so more of a hack around the fact that it refuses to link libgcc otherwise.
I noticed TDM used a little different approach by removing the static 
declaration of it in the header,
both ways work.

Relevant references:

https://gcc.gnu.org/ml/gcc-patches/2014-09/msg00409.html
http://gcc.gcc.gnu.narkive.com/RMY4RcbE/asm-output-section-name-cleanup-patch-problem

diff --git a/libgcc/libgcc2.c b/libgcc/libgcc2.c
index c737620..e5ab209 100644
--- a/libgcc/libgcc2.c
+++ b/libgcc/libgcc2.c
@@ -2211,7 +2211,7 @@ TRANSFER_FROM_TRAMPOLINE
  /* Some ELF crosses use crtstuff.c to provide __CTOR_LIST__, but use this
     code to run constructors.  In that case, we need to handle EH here, 
too.  */

-#ifdef __LIBGCC_EH_FRAME_SECTION_NAME__
+#ifdef EH_FRAME_SECTION_NAME
  #include "unwind-dw2-fde.h"
  extern unsigned char __EH_FRAME_BEGIN__[];
  #endif
@@ -2231,7 +2231,7 @@ __do_global_dtors (void)
        (*(p-1)) ();
      }
  #endif
-#if defined (__LIBGCC_EH_FRAME_SECTION_NAME__) && !defined 
(HAS_INIT_SECTION)
+#if defined (EH_FRAME_SECTION_NAME) && !defined (HAS_INIT_SECTION)
    {
      static int completed = 0;
      if (! completed)
@@ -2250,7 +2250,7 @@ __do_global_dtors (void)
  void
  __do_global_ctors (void)
  {
-#ifdef __LIBGCC_EH_FRAME_SECTION_NAME__
+#ifdef EH_FRAME_SECTION_NAME
    {
      static struct object object;
      __register_frame_info (__EH_FRAME_BEGIN__, &object);

thats the way used by the mingw-w64 devs.

# HG changeset patch
# Parent  e23fe8fb17a828b8c38062d4aaa0b98253e95353

diff -r e23fe8fb17a8 libgcc/config/i386/cygming-crtbegin.c
--- a/libgcc/config/i386/cygming-crtbegin.c    Sat Jun 20 15:20:29 2015 
-0600
+++ b/libgcc/config/i386/cygming-crtbegin.c    Sat Jun 20 17:45:39 2015 
-0600
@@ -94,7 +94,7 @@
  /* Stick a label at the beginning of the frame unwind info so we can
     register/deregister it with the exception handling library code.  */
  #if DWARF2_UNWIND_INFO
-static EH_FRAME_SECTION_CONST char __EH_FRAME_BEGIN__[]
+EH_FRAME_SECTION_CONST char __EH_FRAME_BEGIN__[]
    __attribute__((used, section(__LIBGCC_EH_FRAME_SECTION_NAME__), 
aligned(4)))
    = { };

TDM's version of it.

Was the 2.9.1 version i used, that might explain why it failed.
Was a rather obscure bug with this version, it did not even get to build 
neither libgomp nor libstdc++,
instead it bugged out while building xgcc itself with a pointer to some 
macro.

Ill give it a go with the git version.

If you want to put my version on your servers is entirely up to you :) ,
Ill happilly help with just patches if i manage to figure out what goes 
wrong with the builds, two heads are better than one (might look odd 
though) ;).

Regards Ralph Engels

Den 14-03-2016 kl. 20:29 skrev Keith Marshall:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 03/03/16 09:04, ralph engels wrote:
>> If you are interrested, i just uploaded a full build of
>> gcc-5.3.0-dwarf2 that does not depend on winpthreads. you are
>> welcome to put it in the contributed section.
> I'm much more interested to learn...
>
>> ...
>>
>> It did need some patching to get around the fact that the latest
>> gcc releases are targeted more at the mingw-w64 runtime, and some
>> bugs that where discovered later like the static __EH_FRAME__ bug
>> that caused the builds to fail even on mingw-w64.
> ...what you needed to do to get around this, which has been the show
> stopper for me, for every GCC-5.x I've tried to build.  Until I can
> build it consistently for *both* native deployment, *and* as a Linux
> hosted cross-compiler, I'm not willing to offer it for download from
> MinGW.org's SF file repositories.
>
>> Btw no gcc release after gcc-5.0.0 seem to be able to build
>> against pthreads-w32 not even if fixing the double definition of
>> timespec in pthread.h.
> What version of pthreads-w32 are you trying?  v2.9.1 has been a source
> of considerable trouble for me, but I'm having much more success with
> current git trunk, (in conjunction with GCC-4.9.3).
>
> - -- 
> Regards,
> Keith.
>
> Public key available from keys.gnupg.net
> Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.20 (GNU/Linux)
>
> iQIcBAEBAgAGBQJW5xEgAAoJEMCtNsY0flo/tC8QAIfK2jeOw/h06oXXQMFGO+4q
> flGRBNlDy2RBd4GPQIYvRhE/MXDJGoOZWKFhuM1INqUyc/+2CMybifDms9Oc4/PS
> 9p/5GANjxk1DjyQy6lk5SRiQtv8iYU0lWDi9PCU+ERn4VyKksDKqkJztQiB5vx+L
> HVtUArwmUvgm1m2pY3Rfmi92pw3uqCz0+dqM6tcH0DJ7ogVAew5RadBji7VgOKky
> Rh8ADzlQbHgiATeshM/kyc3QpqGWABbAJaEK5Zkl0Ep8tzB70xxc/TTCEpNa7vLr
> /DYVBGbALGENjLky820GSSt7vtNYcoL1b2hMZzA/l6Kh/xjQOtQ0+NjMrME+X+vA
> ZWvTdaYqTS1WgzYEeo2PpkzDxU5rxex0Y/Ojo9q2nk67BIyahZiXS7urzx9Hi+uC
> OETUXSoK200iAyFuSqT5g3AzbMvTvMZ55SvnvXR2F8GxNm4TnHP+z3oFQ9EPdsZO
> TZ84ubkEACO4rZasavbY/7wZYhDmD8ev5jnynnQEdfMhhgfqOa+RXqkV52isB/t+
> vg0E6T2rOeUktJIKwHUH1dv3VC6hWlLxYDkDVhrKN8weREUwY6ic5JNhGiWRBwdH
> 6EXfkQZl149MOGd4U8132btoYm8ExSqHxKaucd97Fj6uZNDO7ln88ATOTETPj2rx
> D1fc6M8585P88182uSUH
> =93o9
> -----END PGP SIGNATURE-----
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> _______________________________________________
> MinGW-users mailing list
> MinGW-users@xxxxxxxxxxxxxxxxxxxxx
>
> This list observes the Etiquette found at
> http://www.mingw.org/Mailing_Lists.
> We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.
>
> _______________________________________________
> You may change your MinGW Account Options or unsubscribe at:
> https://lists.sourceforge.net/lists/listinfo/mingw-users
> Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe