From: "NP Hardass" <np-hardass@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine/, app-emulation/wine/files/
Date: Sat, 12 Mar 2016 21:10:46 +0000 (UTC) [thread overview]
Message-ID: <1457817000.f7ab9735aad27334ff3cca67aa177f24e0fb45df.np-hardass@gentoo> (raw)
commit: f7ab9735aad27334ff3cca67aa177f24e0fb45df
Author: NP-Hardass <NP-Hardass <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 12 21:09:22 2016 +0000
Commit: NP Hardass <np-hardass <AT> gentoo <DOT> org>
CommitDate: Sat Mar 12 21:10:00 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7ab9735
app-emulation/wine: Check and warn about GCC-5.3 compile bug. #574044
Package-Manager: portage-2.2.26
app-emulation/wine/files/pr69140.c | 24 ++++++++++++++++++++++++
app-emulation/wine/wine-1.9.4.ebuild | 14 ++++++++++++++
app-emulation/wine/wine-1.9.5.ebuild | 14 ++++++++++++++
app-emulation/wine/wine-9999.ebuild | 14 ++++++++++++++
4 files changed, 66 insertions(+)
diff --git a/app-emulation/wine/files/pr69140.c b/app-emulation/wine/files/pr69140.c
new file mode 100644
index 0000000..2c345dd
--- /dev/null
+++ b/app-emulation/wine/files/pr69140.c
@@ -0,0 +1,24 @@
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-O2 -mincoming-stack-boundary=3" } */
+
+typedef struct {
+ unsigned int buf[4];
+ unsigned char in[64];
+} MD4_CTX;
+
+static void
+MD4Transform (unsigned int buf[4], const unsigned int in[16])
+{
+ unsigned int a, b, c, d;
+ (b) += ((((c)) & ((d))) | ((~(c)) & ((a)))) + (in[7]);
+ (a) += ((((b)) & ((c))) | ((~(b)) & ((d)))) + (in[8]);
+ (d) += ((((a)) & ((b))) | ((~(a)) & ((c)))) + (in[9]);
+ buf[3] += d;
+}
+
+void __attribute__((ms_abi))
+MD4Update (MD4_CTX *ctx, const unsigned char *buf)
+{
+ MD4Transform( ctx->buf, (unsigned int *)ctx->in);
+ MD4Transform( ctx->buf, (unsigned int *)ctx->in);
+}
diff --git a/app-emulation/wine/wine-1.9.4.ebuild b/app-emulation/wine/wine-1.9.4.ebuild
index 6388a5b..e47fe62 100644
--- a/app-emulation/wine/wine-1.9.4.ebuild
+++ b/app-emulation/wine/wine-1.9.4.ebuild
@@ -174,6 +174,20 @@ wine_build_environment_check() {
return 1
fi
fi
+ # bug #574044
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
+ einfo "Checking for gcc-5-3 stack realignment compiler bug ..."
+ $(tc-getCC) -O2 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 || die
+ # Run in subshell to prevent "Aborted" message
+ if ! ( "${T}"/69140 || false ) >/dev/null 2>&1; then
+ eerror "Wine cannot be built with this version of gcc-5.3"
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
+ eerror "or use gcc-config to select a different compiler version."
+ eerror "See https://bugs.gentoo.org/574044"
+ eerror
+ return 1
+ fi
+ fi
if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
eerror "You need gcc-4.4+ to build 64-bit wine"
diff --git a/app-emulation/wine/wine-1.9.5.ebuild b/app-emulation/wine/wine-1.9.5.ebuild
index 2c75d7b..5abc380 100644
--- a/app-emulation/wine/wine-1.9.5.ebuild
+++ b/app-emulation/wine/wine-1.9.5.ebuild
@@ -174,6 +174,20 @@ wine_build_environment_check() {
return 1
fi
fi
+ # bug #574044
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
+ einfo "Checking for gcc-5-3 stack realignment compiler bug ..."
+ $(tc-getCC) -O2 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 || die
+ # Run in subshell to prevent "Aborted" message
+ if ! ( "${T}"/69140 || false ) >/dev/null 2>&1; then
+ eerror "Wine cannot be built with this version of gcc-5.3"
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
+ eerror "or use gcc-config to select a different compiler version."
+ eerror "See https://bugs.gentoo.org/574044"
+ eerror
+ return 1
+ fi
+ fi
if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
eerror "You need gcc-4.4+ to build 64-bit wine"
diff --git a/app-emulation/wine/wine-9999.ebuild b/app-emulation/wine/wine-9999.ebuild
index 2c75d7b..5abc380 100644
--- a/app-emulation/wine/wine-9999.ebuild
+++ b/app-emulation/wine/wine-9999.ebuild
@@ -174,6 +174,20 @@ wine_build_environment_check() {
return 1
fi
fi
+ # bug #574044
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
+ einfo "Checking for gcc-5-3 stack realignment compiler bug ..."
+ $(tc-getCC) -O2 "${FILESDIR}"/pr69140.c -o "${T}"/pr69140 || die
+ # Run in subshell to prevent "Aborted" message
+ if ! ( "${T}"/69140 || false ) >/dev/null 2>&1; then
+ eerror "Wine cannot be built with this version of gcc-5.3"
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
+ eerror "or use gcc-config to select a different compiler version."
+ eerror "See https://bugs.gentoo.org/574044"
+ eerror
+ return 1
+ fi
+ fi
if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
eerror "You need gcc-4.4+ to build 64-bit wine"
next reply other threads:[~2016-03-12 21:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-12 21:10 NP Hardass [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-01-06 10:45 [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine/, app-emulation/wine/files/ Mikle Kolyada
2016-07-10 5:29 NP Hardass
2016-06-06 2:07 Austin English
2016-04-22 4:48 NP Hardass
2016-04-19 7:20 Mike Frysinger
2016-03-14 6:37 NP Hardass
2016-03-06 2:57 NP Hardass
2015-10-03 5:43 Alexandre Rostovtsev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457817000.f7ab9735aad27334ff3cca67aa177f24e0fb45df.np-hardass@gentoo \
--to=np-hardass@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox