diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-08-12 04:50:17 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-08-12 04:50:17 +0000 |
commit | 159e8daea76b00d26ea6da6704776eb9fadc6710 (patch) | |
tree | 1b391fc8bba0514c13b6b478b32d301941a29707 /dev-util/mingw-runtime/files | |
parent | Add patch to fix LDBL_MIN_EXP build failures #395893 by Matthias Dahl. (diff) | |
download | historical-159e8daea76b00d26ea6da6704776eb9fadc6710.tar.gz historical-159e8daea76b00d26ea6da6704776eb9fadc6710.tar.bz2 historical-159e8daea76b00d26ea6da6704776eb9fadc6710.zip |
Add fix for building with gcc-4.6 #419627 by Maciej Szmigiero.
Package-Manager: portage-2.2.0_alpha120/cvs/Linux x86_64
Diffstat (limited to 'dev-util/mingw-runtime/files')
-rw-r--r-- | dev-util/mingw-runtime/files/mingw-runtime-3.18-gcc-4.6.patch | 27 |
1 files changed, 27 insertions, 0 deletions
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)(); + } |