From patchwork Fri Feb 10 05:31:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Bur X-Patchwork-Id: 726410 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vKNtY222Hz9s1y for ; Fri, 10 Feb 2017 16:34:45 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3vKNtY1BDqzDqKk for ; Fri, 10 Feb 2017 16:34:45 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vKNsN2rRjzDq8g for ; Fri, 10 Feb 2017 16:33:44 +1100 (AEDT) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v1A5Sd3u047870 for ; Fri, 10 Feb 2017 00:33:41 -0500 Received: from e23smtp01.au.ibm.com (e23smtp01.au.ibm.com [202.81.31.143]) by mx0b-001b2d01.pphosted.com with ESMTP id 28gyp6f3wn-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 10 Feb 2017 00:33:41 -0500 Received: from localhost by e23smtp01.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 10 Feb 2017 15:33:38 +1000 Received: from d23dlp02.au.ibm.com (202.81.31.213) by e23smtp01.au.ibm.com (202.81.31.207) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 10 Feb 2017 15:33:36 +1000 Received: from d23relay10.au.ibm.com (d23relay10.au.ibm.com [9.190.26.77]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id F11712BB0057 for ; Fri, 10 Feb 2017 16:33:35 +1100 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay10.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v1A5XRqU39059526 for ; Fri, 10 Feb 2017 16:33:35 +1100 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v1A5X39M025739 for ; Fri, 10 Feb 2017 16:33:03 +1100 Received: from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.192.253.14]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v1A5X3FL025139; Fri, 10 Feb 2017 16:33:03 +1100 Received: from camb691.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 2E7DAA01AB; Fri, 10 Feb 2017 16:32:39 +1100 (AEDT) From: Cyril Bur To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH] powerpc: Blacklist GCC 5.4 6.1 and 6.2 Date: Fri, 10 Feb 2017 16:31:15 +1100 X-Mailer: git-send-email 2.11.1 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17021005-1617-0000-0000-000001A67333 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17021005-1618-0000-0000-000047B569E5 Message-Id: <20170210053115.20565-1-cyrilbur@gmail.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-02-10_02:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702100056 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: akshay.adiga@linux.vnet.ibm.com Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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. Heavy-lifting-by: Akshay Adiga Signed-off-by: Cyril Bur --- arch/powerpc/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 31286fa7873c..a4b886694391 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -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)