app-emulation/wine: works with gcc-5.2.0 with latest patchset
authorAlexandre Rostovtsev <tetromino@gentoo.org>
Sat, 3 Oct 2015 05:40:26 +0000 (01:40 -0400)
committerAlexandre Rostovtsev <tetromino@gentoo.org>
Sat, 3 Oct 2015 05:41:22 +0000 (01:41 -0400)
Instead of a simple version check, run the upstream test case to check
whether the installed gcc ebuild has the ms_abi bug or not.

Gentoo-Bug: 549768
Package-Manager: portage-2.2.22

40 files changed:
app-emulation/wine/files/pr66838.c [new file with mode: 0644]
app-emulation/wine/wine-1.6.2-r1.ebuild
app-emulation/wine/wine-1.6.2.ebuild
app-emulation/wine/wine-1.7.10-r1.ebuild
app-emulation/wine/wine-1.7.11-r1.ebuild
app-emulation/wine/wine-1.7.12-r1.ebuild
app-emulation/wine/wine-1.7.13-r1.ebuild
app-emulation/wine/wine-1.7.14-r1.ebuild
app-emulation/wine/wine-1.7.15-r1.ebuild
app-emulation/wine/wine-1.7.16-r1.ebuild
app-emulation/wine/wine-1.7.17-r1.ebuild
app-emulation/wine/wine-1.7.18-r1.ebuild
app-emulation/wine/wine-1.7.19-r2.ebuild
app-emulation/wine/wine-1.7.20-r1.ebuild
app-emulation/wine/wine-1.7.21-r1.ebuild
app-emulation/wine/wine-1.7.22-r1.ebuild
app-emulation/wine/wine-1.7.28-r1.ebuild
app-emulation/wine/wine-1.7.29-r1.ebuild
app-emulation/wine/wine-1.7.3-r1.ebuild
app-emulation/wine/wine-1.7.33-r1.ebuild
app-emulation/wine/wine-1.7.34.ebuild
app-emulation/wine/wine-1.7.35.ebuild
app-emulation/wine/wine-1.7.36.ebuild
app-emulation/wine/wine-1.7.37.ebuild
app-emulation/wine/wine-1.7.38-r1.ebuild
app-emulation/wine/wine-1.7.39-r1.ebuild
app-emulation/wine/wine-1.7.4-r1.ebuild
app-emulation/wine/wine-1.7.40-r1.ebuild
app-emulation/wine/wine-1.7.41.ebuild
app-emulation/wine/wine-1.7.42.ebuild
app-emulation/wine/wine-1.7.43.ebuild
app-emulation/wine/wine-1.7.44.ebuild
app-emulation/wine/wine-1.7.45.ebuild
app-emulation/wine/wine-1.7.46.ebuild
app-emulation/wine/wine-1.7.47.ebuild
app-emulation/wine/wine-1.7.50.ebuild
app-emulation/wine/wine-1.7.51.ebuild
app-emulation/wine/wine-1.7.8-r1.ebuild
app-emulation/wine/wine-1.7.9-r1.ebuild
app-emulation/wine/wine-9999.ebuild

diff --git a/app-emulation/wine/files/pr66838.c b/app-emulation/wine/files/pr66838.c
new file mode 100644 (file)
index 0000000..cd61685
--- /dev/null
@@ -0,0 +1,36 @@
+/* From gcc svn, /branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/pr66838.c */
+/* Copyrighted and distributed under the same terms as gcc */
+
+void abort (void);
+
+char global;
+
+__attribute__((sysv_abi, noinline, noclone))
+void sysv_abi_func(char const *desc, void *local)
+{
+  register int esi asm ("esi");
+  register int edi asm ("edi");
+  
+  if (local != &global)
+    abort ();
+
+  /* Clobber some of the extra SYSV ABI registers.  */
+  asm volatile ("movl\t%2, %0\n\tmovl\t%2, %1"
+               : "=r" (esi), "=r" (edi)
+               : "i" (0xdeadbeef));
+}
+
+__attribute__((ms_abi, noinline, noclone))
+void ms_abi_func ()
+{
+  sysv_abi_func ("1st call", &global);
+  sysv_abi_func ("2nd call", &global);
+  sysv_abi_func ("3rd call", &global);
+}
+
+int
+main(void)
+{
+  ms_abi_func();
+  return 0;
+}
index cd806c0684a272a14c9e8b4d488391e2aefe7de8..7890da716df532808eef0649985ec3909b2f5f3f 100644 (file)
@@ -145,12 +145,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 3b620b1f9fd51e59d5c0f2dff115a5fed0d5c0c5..e990228e1af37e5a151214707f7ad72f2617c83b 100644 (file)
@@ -174,12 +174,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 8dd499670d14be12e8c22719678a0b24f71c74db..9cd19bdcba2c95185cb55249865100316ad33934 100644 (file)
@@ -146,12 +146,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 8dd499670d14be12e8c22719678a0b24f71c74db..9cd19bdcba2c95185cb55249865100316ad33934 100644 (file)
@@ -146,12 +146,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index a672bc81acc3283ce54cc7fa1c3cfe4822554292..16697c5c4b249fb402c839471eaf222891b73bd5 100644 (file)
@@ -146,12 +146,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index a672bc81acc3283ce54cc7fa1c3cfe4822554292..16697c5c4b249fb402c839471eaf222891b73bd5 100644 (file)
@@ -146,12 +146,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index a672bc81acc3283ce54cc7fa1c3cfe4822554292..16697c5c4b249fb402c839471eaf222891b73bd5 100644 (file)
@@ -146,12 +146,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index a672bc81acc3283ce54cc7fa1c3cfe4822554292..16697c5c4b249fb402c839471eaf222891b73bd5 100644 (file)
@@ -146,12 +146,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index a672bc81acc3283ce54cc7fa1c3cfe4822554292..16697c5c4b249fb402c839471eaf222891b73bd5 100644 (file)
@@ -146,12 +146,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index a672bc81acc3283ce54cc7fa1c3cfe4822554292..16697c5c4b249fb402c839471eaf222891b73bd5 100644 (file)
@@ -146,12 +146,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index a672bc81acc3283ce54cc7fa1c3cfe4822554292..16697c5c4b249fb402c839471eaf222891b73bd5 100644 (file)
@@ -146,12 +146,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 0569dd93ff569d4fcaf49dd5e13aac3db2390878..90fb710377325da41d171c796dbe4ceeb26fb2a1 100644 (file)
@@ -159,12 +159,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index baa882c1ee6d2cae68ebea1f56af80bbaed84009..39a57ab49f6891ded9c9abfe0ecf0c140dc16870 100644 (file)
@@ -161,12 +161,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 73436402e63e3a7b1da5682f4c0bc83386e3af0d..3e8845408490cb5e0de5eb0b3b6846f4d3b4b2ef 100644 (file)
@@ -161,12 +161,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 73436402e63e3a7b1da5682f4c0bc83386e3af0d..3e8845408490cb5e0de5eb0b3b6846f4d3b4b2ef 100644 (file)
@@ -161,12 +161,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 54d6481fa2996ce4570d9c407359ac266e608241..9963e5bc2db86c42f389bd3891ebc678f11c6a15 100644 (file)
@@ -161,12 +161,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 54d6481fa2996ce4570d9c407359ac266e608241..9963e5bc2db86c42f389bd3891ebc678f11c6a15 100644 (file)
@@ -161,12 +161,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 8ac9a7d468a6fd5281a18918c4384f707552e27f..aecbaf3b75f99674353a29a628967b7085bd3f89 100644 (file)
@@ -145,12 +145,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index f6af72780f4eaa31ee217b070d4e901c7fb9fc36..f38cb492923e74d4548744df9f57336e38cb8f03 100644 (file)
@@ -163,12 +163,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 91fbdfa04522e72687ed4ca890a3cebb21070a72..09684950e5a9ed55be20dab5696a13f690b770e7 100644 (file)
@@ -163,12 +163,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 137912ea262dc7b66a9cf2014a77a3e0717b6b74..8f493b046b74446bc041c9de50442e2847cf6a86 100644 (file)
@@ -163,12 +163,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 9c7bba65d4271212984ee7cb6f1a84a0005471aa..3d79ebd04cc3b64285fc8747011d46404b7bdfe5 100644 (file)
@@ -162,12 +162,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 2e2c0d0c085fdd5a2552fb82297a9a86cc2a8788..a5371660e6b8ef02965138c3788f8dab43c5b3e9 100644 (file)
@@ -165,12 +165,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 1ba468d05a3ec63aca3a9ca175d081c470c42dc5..e8bff656679519bc78d5083d89f29639bcbee482 100644 (file)
@@ -165,12 +165,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 6fd525b4068bcbbe0933e8420bb49b34f6ee4915..cba75014d06b2a39fc0691520ce523803daa554c 100644 (file)
@@ -165,12 +165,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 5ca4da7e4ddc7d76b823cdf8e0ba27fcdb5561dc..e157195ba6517cbb9cb3b8de3d1f780e34006b33 100644 (file)
@@ -145,12 +145,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 6fd525b4068bcbbe0933e8420bb49b34f6ee4915..cba75014d06b2a39fc0691520ce523803daa554c 100644 (file)
@@ -165,12 +165,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 6fd525b4068bcbbe0933e8420bb49b34f6ee4915..cba75014d06b2a39fc0691520ce523803daa554c 100644 (file)
@@ -165,12 +165,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 6fd525b4068bcbbe0933e8420bb49b34f6ee4915..cba75014d06b2a39fc0691520ce523803daa554c 100644 (file)
@@ -165,12 +165,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 6fd525b4068bcbbe0933e8420bb49b34f6ee4915..cba75014d06b2a39fc0691520ce523803daa554c 100644 (file)
@@ -165,12 +165,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 6fd525b4068bcbbe0933e8420bb49b34f6ee4915..cba75014d06b2a39fc0691520ce523803daa554c 100644 (file)
@@ -165,12 +165,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 8930da943b27b3a3a38ab718eec00e9ced3bc737..555a7d1773b4bbb33fa0a86669c71867037436ce 100644 (file)
@@ -165,12 +165,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 6fd525b4068bcbbe0933e8420bb49b34f6ee4915..cba75014d06b2a39fc0691520ce523803daa554c 100644 (file)
@@ -165,12 +165,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 6b89273a5b79786fd2777bfe43c342ca246fe94d..4f5cc8e30178928fe1bdb55fe9ef07727c933d0f 100644 (file)
@@ -165,12 +165,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index d78c249d5b5e4dae4d7b4765934d531c3b015942..8a8d5c1cfe013383c4b1a0b1bf53ca56747618a5 100644 (file)
@@ -166,12 +166,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index d78c249d5b5e4dae4d7b4765934d531c3b015942..8a8d5c1cfe013383c4b1a0b1bf53ca56747618a5 100644 (file)
@@ -166,12 +166,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 501513787d764ece1459e805799affb8e3d82632..090fb1c204bd6ecd56c43de3a238d61d7f24c98e 100644 (file)
@@ -146,12 +146,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index 501513787d764ece1459e805799affb8e3d82632..090fb1c204bd6ecd56c43de3a238d61d7f24c98e 100644 (file)
@@ -146,12 +146,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then
index d78c249d5b5e4dae4d7b4765934d531c3b015942..8a8d5c1cfe013383c4b1a0b1bf53ca56747618a5 100644 (file)
@@ -166,12 +166,18 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
-               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to compiler bugs;"
-               eerror "you may use gcc-config to select an older compiler version."
-               eerror "See https://bugs.gentoo.org/549768"
-               eerror
-               return 1
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
+               einfo "Checking for gcc-5 ms_abi compiler bug ..."
+               $(tc-getCC) -O2 "${FILESDIR}"/pr66838.c -o "${T}"/pr66838 || die
+               # Run in subshell to prevent "Aborted" message
+               if ! ( "${T}"/pr66838 || false ) >/dev/null 2>&1; then
+                       eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
+                       eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
+                       eerror "or use gcc-config to select a different compiler version."
+                       eerror "See https://bugs.gentoo.org/549768"
+                       eerror
+                       return 1
+               fi
        fi
 
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + $(gcc-minor-version) )) -lt 404 ]]; then