δΊ 2012/3/6 3:57, Ruben Van Boxem ει:
Hi guys,
niXman has pointed me to a workaround which is as good as a fix for
the shared libstdc++ std::thread problem. It's been fixed in this build.
I have used for this build:
- GCC 4.6 (currently 4.6.4 prerelease, so it's 4.6.3 with a few minor
patches from upstream)
- binutils/gdb trunk
- mingw-w64 trunk: it's stable enough and has some cool stuff added.
- LLVM/Clang trunk.
If the person having trouble with OpenMP crashes please retest (and if
the problem is still present, please give a testcase, as simple as
possible!), I'd appreciate it.
I've left out Mac and Cygwin builds, as I've switched to Arch Linux
for these and all future builds. This also means you might need a
newer glibc than your Linux distro installs, as Arch is on 2.15. I
can't help this. If you really need my toolchain on your linux, it's
quite easy to build yourself from source, albeit time-consuming.
Enjoy,
Ruben
Downloads in their usual places:
http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/4.6.4/
http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/4.6.4/
http://sourceforge.net/projects/mingw-w64/files/Toolchain%20sources%20Win64/Personal%20Builds/rubenvb/
And I recall some binutils patch from Kai, the patch can solve the bug:
http://sourceware.org/bugzilla/show_bug.cgi?id=12762
Because of some reasons, the sections are not approved by binutils
maintainers.
--
Best Regards,
xunxun
diff -ruNa binutils-2.22.51/bfd/coffgen.c binutils-new/bfd/coffgen.c
--- binutils-2.22.51/bfd/coffgen.c 2011-10-06 16:59:36 +0800
+++ binutils-new/bfd/coffgen.c 2011-10-31 21:19:14 +0800
@@ -921,6 +921,9 @@
void * buf;
bfd_size_type symesz;
+ if ((bfd_get_section_flags (abfd, symbol->section) & SEC_LINK_ONCE) != 0
+ && symbol->section->output_section == bfd_abs_section_ptr)
+ return TRUE;
if (native->u.syment.n_sclass == C_FILE)
symbol->flags |= BSF_DEBUGGING;
diff -ruNa binutils-2.22.51/bfd/cofflink.c binutils-new/bfd/cofflink.c
--- binutils-2.22.51/bfd/cofflink.c 2011-08-17 08:39:38 +0800
+++ binutils-new/bfd/cofflink.c 2011-10-31 21:19:36 +0800
@@ -392,7 +392,10 @@
section = coff_section_from_bfd_index (abfd, sym.n_scnum);
if (! obj_pe (abfd))
value -= section->vma;
- break;
+ if (bfd_is_abs_section (section)
+ || section->output_section != bfd_abs_section_ptr)
+ break;
+ /* Fall through */
case COFF_SYMBOL_UNDEFINED:
flags = 0;
@@ -410,6 +413,12 @@
break;
}
+ /*if (obj_pe (abfd) && _bfd_coff_section_already_linked (abfd,
section, info))
+ {
+ flags = 0;
+ section = bfd_und_section_ptr;
+ }*/
+
if (IS_WEAK_EXTERNAL (abfd, sym))
flags = BSF_WEAK;
@@ -2318,7 +2327,9 @@
if ((o->flags & SEC_LINKER_CREATED) != 0)
continue;
-
+ if (!bfd_is_abs_section (o)
+ && o->output_section == bfd_abs_section_ptr)
+ continue;
if ((o->flags & SEC_HAS_CONTENTS) == 0
|| (o->size == 0 && (o->flags & SEC_RELOC) == 0))
{
@@ -2386,7 +2397,10 @@
if (ps == NULL)
continue;
/* Complain if definition comes from an excluded section. */
- if (ps->flags & SEC_EXCLUDE)
+ if ((ps->flags & SEC_EXCLUDE) != 0
+ && (ps->owner->flags & BFD_PLUGIN) == 0
+ && !bfd_is_abs_section (ps)
+ && bfd_is_abs_section ((ps)->output_section))
(*finfo->info->callbacks->einfo)
(_("%X`%s' referenced in section `%A' of %B: "
"defined in discarded section `%A' of %B\n"),
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public