stress-ng: workaround sparc64 gcc ICE
PATCH 1/1 stress-ng: workaround sparc64 gcc ICE
Disable vector code to avoid gcc ICE while
cross-compiling for sparc64.
Fixes autobuilder failures:
http://autobuild.buildroot.net/results/b527ccdbdfeaba6789528e68df93d9c7216e758a/
http://autobuild.buildroot.net/results/d658f82c66d93515276dcb6cec8d3690459fbf05/
--- package/stress-ng/0001-disable-vector-sparc64.patch | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 package/stress-ng/0001-disable-vector-sparc64.patch
package/stress-ng/0001-disable-vector-sparc64.patch new file +21 -0
@@ -0,0 +1,21 @@ +Reported upstream: +https://bugs.launchpad.net/ubuntu/+source/stress-ng/+bug/1581843 + +Signed-off-by: Waldemar Brodkorb <[email protected]> + +diff -Nur stress-ng-0.04.16.orig/stress-ng.h stress-ng-0.04.16/stress-ng.h +--- stress-ng-0.04.16.orig/stress-ng.h 2015-09-07 11:04:09.000000000 +0200 ++++ stress-ng-0.04.16/stress-ng.h 2016-05-14 20:16:10.543917851 +0200 +@@ -457,9 +457,12 @@ + #define STRESS_X86 1 + #endif + ++/* triggers gcc ICE */ ++#if !defined(__sparc_v9__) + #if NEED_GNUC(4,7,0) + #define STRESS_VECTOR 1 + #endif ++#endif + + /* NetBSD does not define MAP_ANONYMOUS */ + #if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
Signature · 1 line
2.1.4
PATCH 1/1 stress-ng: workaround sparc64 gcc ICE
Hello,
package/stress-ng/0001-disable-vector-sparc64.patch line 2
Quoted 8 lines · Waldemar Brodkorb
package/stress-ng/0001-disable-vector-sparc64.patch new file +2
-0@@ -0,0 +1,21 @@ +Reported upstream: +https://bugs.launchpad.net/ubuntu/+source/stress-ng/+bug/1581843
It was weird to report a gcc bug against the package that fails to build.
Quoted 6 lines
package/stress-ng/0001-disable-vector-sparc64.patch new file +6
-0+diff -Nur stress-ng-0.04.16.orig/stress-ng.h stress-ng-0.04.16/stress-ng.h +--- stress-ng-0.04.16.orig/stress-ng.h 2015-09-07 11:04:09.000000000 +0200 ++++ stress-ng-0.04.16/stress-ng.h 2016-05-14 20:16:10.543917851 +0200 +@@ -457,9 +457,12 @@ + #define STRESS_X86 1 + #endif
package/stress-ng/0001-disable-vector-sparc64.patch line 21
Quoted 10 lines
package/stress-ng/0001-disable-vector-sparc64.patch new file +10
-0+ ++/* triggers gcc ICE */ ++#if !defined(__sparc_v9__) + #if NEED_GNUC(4,7,0) + #define STRESS_VECTOR 1 + #endif ++#endif + + /* NetBSD does not define MAP_ANONYMOUS */ + #if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
What about using the patch that was actually committed upstream, i.e
http://kernel.ubuntu.com/git/cking/stress-ng.git/commit/?id=9b5a3aaffdd613f03c10ebe3550b89193e9993ef
according to the bug report you're pointing to?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 stress-ng: workaround sparc64 gcc ICE
Hi Thomas,
Thomas Petazzoni wrote,
Quoted 4 lines
Hello,
On Sat, 14 May 2016 20:42:27 +0200, Waldemar Brodkorb wrote:
Quoted 11 lines
package/stress-ng/0001-disable-vector-sparc64.patch line 2
Quoted 8 lines
package/stress-ng/0001-disable-vector-sparc64.patch new file +2
-0@@ -0,0 +1,21 @@ +Reported upstream: +https://bugs.launchpad.net/ubuntu/+source/stress-ng/+bug/1581843It was weird to report a gcc bug against the package that fails to build.
Why? I think ICE must be reported to GCC upstream.
I reported a bug to stress-ng, and someone else reported some time ago a gcc bug regarding the same code failing for powerpc. What is weird here?
Quoted 17 lines
Quoted 6 lines
package/stress-ng/0001-disable-vector-sparc64.patch new file +6
-0+diff -Nur stress-ng-0.04.16.orig/stress-ng.h stress-ng-0.04.16/stress-ng.h +--- stress-ng-0.04.16.orig/stress-ng.h 2015-09-07 11:04:09.000000000 +0200 ++++ stress-ng-0.04.16/stress-ng.h 2016-05-14 20:16:10.543917851 +0200 +@@ -457,9 +457,12 @@ + #define STRESS_X86 1 + #endifpackage/stress-ng/0001-disable-vector-sparc64.patch line 21
Quoted 10 lines
package/stress-ng/0001-disable-vector-sparc64.patch new file +10
-0+ ++/* triggers gcc ICE */ ++#if !defined(__sparc_v9__) + #if NEED_GNUC(4,7,0) + #define STRESS_VECTOR 1 + #endif ++#endif + + /* NetBSD does not define MAP_ANONYMOUS */ + #if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
Quoted 3 lines
What about using the patch that was actually committed upstream, i.e
http://kernel.ubuntu.com/git/cking/stress-ng.git/commit/?id=9b5a3aaffdd613f03c10ebe3550b89193e9993ef
according to the bug report you're pointing to?
First, it was committed after my buildroot submission, second it does not apply for the old version used in buildroot and can't be used. Either we update to latest and add the patch, or we add my hack.
best regards
Waldemar
PATCH 1/1 stress-ng: workaround sparc64 gcc ICE
Hello,
Quoted 12 lines · Waldemar Brodkorb
Quoted 11 lines
package/stress-ng/0001-disable-vector-sparc64.patch line 2
Quoted 8 lines
package/stress-ng/0001-disable-vector-sparc64.patch new file +2
-0@@ -0,0 +1,21 @@ +Reported upstream: +https://bugs.launchpad.net/ubuntu/+source/stress-ng/+bug/1581843It was weird to report a gcc bug against the package that fails to build.
Quoted 4 lines
Why? I think ICE must be reported to GCC upstream.
I reported a bug to stress-ng, and someone else reported some time ago a gcc bug regarding the same code failing for powerpc. What is weird here?
That you reported the bug to stress-ng.
When I have a compiler failure, I never report the bug to the package causing the compiler failure, but directly to the gcc developers.
Quoted 10 lines
Quoted 6 lines
package/stress-ng/0001-disable-vector-sparc64.patch line 21
Quoted 2 lines
package/stress-ng/0001-disable-vector-sparc64.patch new file +2
-0+ /* NetBSD does not define MAP_ANONYMOUS */ + #if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)What about using the patch that was actually committed upstream, i.e
http://kernel.ubuntu.com/git/cking/stress-ng.git/commit/?id=9b5a3aaffdd613f03c10ebe3550b89193e9993ef
according to the bug report you're pointing to?First, it was committed after my buildroot submission, second it does not apply for the old version used in buildroot and can't be used.
And the backport is complicated?
Quoted 2 lines
Either we update to latest and add the patch, or we add my hack.
What I dislike with adding the hack is that we will most likely forget about it and never update to the latest upstream version. And when we'll update (if we ever do), since the hack is not the same as what was done upstream, we'll be confused.
Or at least, could you send an updated version of your patch that points to the better upstream patch, so that we remember about dropping your hack when bumping stress-ng?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com