summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-08-12 04:50:17 +0000
committerMike Frysinger <vapier@gentoo.org>2012-08-12 04:50:17 +0000
commit6630a0904869f548eabdabefd37acb4b30f79368 (patch)
treee6991ab037234ba00fdf212b77b4551d1dae60bd /dev-util/mingw-runtime
parentAdd patch to fix LDBL_MIN_EXP build failures #395893 by Matthias Dahl. (diff)
downloadgentoo-2-6630a0904869f548eabdabefd37acb4b30f79368.tar.gz
gentoo-2-6630a0904869f548eabdabefd37acb4b30f79368.tar.bz2
gentoo-2-6630a0904869f548eabdabefd37acb4b30f79368.zip
Add fix for building with gcc-4.6 #419627 by Maciej Szmigiero.
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
Diffstat (limited to 'dev-util/mingw-runtime')
-rw-r--r--dev-util/mingw-runtime/ChangeLog6
-rw-r--r--dev-util/mingw-runtime/files/mingw-runtime-3.18-gcc-4.6.patch27
-rw-r--r--dev-util/mingw-runtime/mingw-runtime-3.18.ebuild5
3 files changed, 35 insertions, 3 deletions
diff --git a/dev-util/mingw-runtime/ChangeLog b/dev-util/mingw-runtime/ChangeLog
index 7dd7113d6bf4..a329ebb1057d 100644
--- a/dev-util/mingw-runtime/ChangeLog
+++ b/dev-util/mingw-runtime/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-util/mingw-runtime
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/mingw-runtime/ChangeLog,v 1.24 2012/08/12 04:49:07 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/mingw-runtime/ChangeLog,v 1.25 2012/08/12 04:50:17 vapier Exp $
+
+ 12 Aug 2012; Mike Frysinger <vapier@gentoo.org>
+ +files/mingw-runtime-3.18-gcc-4.6.patch, mingw-runtime-3.18.ebuild:
+ Add fix for building with gcc-4.6 #419627 by Maciej Szmigiero.
12 Aug 2012; Mike Frysinger <vapier@gentoo.org> mingw-runtime-3.20.ebuild,
+files/mingw-runtime-3.20-LDBL_MIN_EXP.patch:
diff --git a/dev-util/mingw-runtime/files/mingw-runtime-3.18-gcc-4.6.patch b/dev-util/mingw-runtime/files/mingw-runtime-3.18-gcc-4.6.patch
new file mode 100644
index 000000000000..8b2418178857
--- /dev/null
+++ b/dev-util/mingw-runtime/files/mingw-runtime-3.18-gcc-4.6.patch
@@ -0,0 +1,27 @@
+http://sourceforge.net/tracker/?func=detail&aid=3446009&group_id=2435&atid=302435
+https://bugs.gentoo.org/419627
+
+--- a/tlssup.c
++++ b/tlssup.c
+@@ -84,6 +84,7 @@ BOOL WINAPI
+ __dyn_tls_init (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
+ {
+ _PVFV *pfunc;
++ int nfuncs, ifunc;
+
+ /* We don't let us trick here. */
+ if (_CRT_MT != 2)
+@@ -96,8 +97,12 @@ __dyn_tls_init (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
+ return TRUE;
+ }
+
+- for (pfunc = &__xd_a + 1; pfunc != &__xd_z; ++pfunc)
++ /* Use the nfuncs variable to iterate the TLS functions instead of pfunc to
++ avoid nasty compiler optimizations when comparing two global pointers. */
++ nfuncs = &__xd_z - (&__xd_a + 1);
++ for (ifunc=0; ifunc < nfuncs; ++ifunc)
+ {
++ pfunc = (&__xd_a + 1) + ifunc;
+ if (*pfunc != NULL)
+ (*pfunc)();
+ }
diff --git a/dev-util/mingw-runtime/mingw-runtime-3.18.ebuild b/dev-util/mingw-runtime/mingw-runtime-3.18.ebuild
index ca291a921c0f..f9423aa21144 100644
--- a/dev-util/mingw-runtime/mingw-runtime-3.18.ebuild
+++ b/dev-util/mingw-runtime/mingw-runtime-3.18.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/mingw-runtime/mingw-runtime-3.18.ebuild,v 1.2 2010/09/22 22:22:49 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/mingw-runtime/mingw-runtime-3.18.ebuild,v 1.3 2012/08/12 04:50:17 vapier Exp $
export CBUILD=${CBUILD:-${CHOST}}
export CTARGET=${CTARGET:-${CHOST}}
@@ -41,6 +41,7 @@ pkg_setup() {
src_unpack() {
unpack ${A}
cd "${S}"
+ epatch "${FILESDIR}"/${P}-gcc-4.6.patch #419627
sed -i \
-e "/W32API_INCLUDE/s:=.*:='-I /usr/${CTARGET}/usr/include':" \
$(find -name configure) || die