Skip to content

Commit

Permalink
app-emulation/wine: works with gcc-5.2.0 with latest patchset
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tetromino committed Oct 3, 2015
1 parent 503a33e commit 28604e0
Show file tree
Hide file tree
Showing 40 changed files with 504 additions and 234 deletions.
36 changes: 36 additions & 0 deletions app-emulation/wine/files/pr66838.c
Original file line number Diff line number Diff line change
@@ -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;
}
18 changes: 12 additions & 6 deletions app-emulation/wine/wine-1.6.2-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions app-emulation/wine/wine-1.6.2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions app-emulation/wine/wine-1.7.10-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions app-emulation/wine/wine-1.7.11-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions app-emulation/wine/wine-1.7.12-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions app-emulation/wine/wine-1.7.13-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions app-emulation/wine/wine-1.7.14-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions app-emulation/wine/wine-1.7.15-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions app-emulation/wine/wine-1.7.16-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions app-emulation/wine/wine-1.7.17-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions app-emulation/wine/wine-1.7.18-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions app-emulation/wine/wine-1.7.19-r2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions app-emulation/wine/wine-1.7.20-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions app-emulation/wine/wine-1.7.21-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 28604e0

Please sign in to comment.