powerpc: Blacklist GCC 5.4 6.1 and 6.2
PATCH 1/1 powerpc: Blacklist GCC 5.4 6.1 and 6.2
A bug in the -02 optimisation of GCC 5.4 6.1 and 6.2 causes setup_command_line() to not pass the correct first argument to strcpy and therefore not actually copy the command_line.
A workaround patch was proposed: http://patchwork.ozlabs.org/patch/673130/
some discussion ensued.
A GCC bug was raised: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71709
The bug has been fixed in 7.0 and backported to GCC 5 and GCC 6.
At the time of writing GCC 5.4 is the most recent and is affected. GCC 6.3 contains the backported fix, has been tested and appears safe to use.
--- arch/powerpc/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/powerpc/Makefile +9 -0
@@ -414,6 +414,15 @@ checkbin: echo -n '*** Please use a different binutils version.' ; \ false ; \ fi + @if test "$(cc-version)" = "0504" \ + || test "$(cc-version)" = "0601" \ + || test "$(cc-version)" = "0602" ; then \ + echo -n '*** GCC-5.4 6.1 6.2 have a bad -O2 optimisation ' ; \ + echo 'which will cause lost commandline options (at least).' ; \ + echo '*** Please use a different GCC version.' ; \ + false ; \ + fi + CLEAN_FILES += $(TOUT)
Signature · 1 line
2.11.1
Quoted 27 lines · Cyril Bur
A bug in the -02 optimisation of GCC 5.4 6.1 and 6.2 causes
setup_command_line()to not pass the correct first argument to strcpy and therefore not actually copy thecommand_line.A workaround patch was proposed: http://patchwork.ozlabs.org/patch/673130/
some discussion ensued.A GCC bug was raised: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71709
The bug has been fixed in 7.0 and backported to GCC 5 and GCC 6.At the time of writing GCC 5.4 is the most recent and is affected. GCC 6.3 contains the backported fix, has been tested and appears safe to use.
Heavy-lifting-by Akshay Adiga <[email protected]>Signed-off-by Cyril Bur <[email protected]>--- arch/powerpc/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+)arch/powerpc/Makefile +0
-0@@ -414,6 +414,15 @@ checkbin: echo -n '*** Please use a different binutils version.' ; \ false ; \
arch/powerpc/Makefile checkbin: · line 425
Quoted 10 lines
arch/powerpc/Makefile +9
-0fi + @if test "$(cc-version)" = "0504" \ + || test "$(cc-version)" = "0601" \ + || test "$(cc-version)" = "0602" ; then \ + echo -n '*** GCC-5.4 6.1 6.2 have a bad -O2 optimisation ' ; \ + echo 'which will cause lost commandline options (at least).' ; \ + echo '*** Please use a different GCC version.' ; \ + false ; \ + fi +
According to the GCC bug report, this bug applies to powerpc64le Why force all targets to not use those versions of GCC ?
Christophe
Quoted 34 lines · Christophe LEROY
Quoted 32 lines · Cyril Bur
A bug in the -02 optimisation of GCC 5.4 6.1 and 6.2 causes
setup_command_line()to not pass the correct first argument to strcpy and therefore not actually copy thecommand_line.A workaround patch was proposed: http://patchwork.ozlabs.org/patch/673130/
some discussion ensued.A GCC bug was raised: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71709
The bug has been fixed in 7.0 and backported to GCC 5 and GCC 6.At the time of writing GCC 5.4 is the most recent and is affected. GCC 6.3 contains the backported fix, has been tested and appears safe to use.
Heavy-lifting-by Akshay Adiga <[email protected]>Signed-off-by Cyril Bur <[email protected]>--- arch/powerpc/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+)arch/powerpc/Makefile +4
-0@@ -414,6 +414,15 @@ checkbin: echo -n '*** Please use a different binutils version.' ; \ false ; \ fi + @if test "$(cc-version)" = "0504" \ + || test "$(cc-version)" = "0601" \ + || test "$(cc-version)" = "0602" ; then \ + echo -n '*** GCC-5.4 6.1 6.2 have a bad -O2 optimisation ' ; \
Quoted 9 lines
arch/powerpc/Makefile checkbin: · line 425
Quoted 5 lines
arch/powerpc/Makefile +5
-0+ echo 'which will cause lost commandline options (at least).' ; \ + echo '*** Please use a different GCC version.' ; \ + false ; \ + fi +According to the GCC bug report, this bug applies to powerpc64le Why force all targets to not use those versions of GCC ?
True, I'll double check on BE, these days BE does suffer from, "oops I didn't check that". If it is only LE, I'll add another condition.
Thanks,
Cyril
Quoted 1 line
Christophe