Received: by 10.223.164.202 with SMTP id h10csp2008464wrb; Mon, 27 Nov 2017 10:27:11 -0800 (PST) X-Google-Smtp-Source: AGs4zMbvQMtZ16YbofCT2qLQfh+lKMPe3BdMnbtCtslEta+1kYPaR+UZuzVm5BK5o8TnZAb+p0oP X-Received: by 10.159.206.131 with SMTP id bg3mr39985965plb.124.1511807231614; Mon, 27 Nov 2017 10:27:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511807231; cv=none; d=google.com; s=arc-20160816; b=jkGN3Y3IPMeTQf4XF6yvz4IfALKS9RWp4iJ5dZF7m9j6gZnrtTSqHhyHYtRD8Mthpb JWWxRg+dfztkYTVLmwhk+MTQvJ5xFQgcEFr4fW7JBY3dIqTJmPnwBAV2piN5Urk3NPS0 qzkw1CsmFA6qx96/lvQWYtTU4OuFQUjshA/lkHXTbaq6DLekbTRyJuzsV9LhN06TbNqs F9RGpLFFffRy1bUxctB7PibiqWBUC9kfGhO+92MbH0NWNDTo0ZRqNpZLMPxUR9mOrFLN 7dU7tPXe0UqmQiUXaNROm9MEOaxix35u/lDWyWAjazzmOWIIMezzP06PBSe6JtCg9dIg dmMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=8MgGBm5oDL0X6s/W0d3ZSpAm7GXUApNnNChH+kerNgY=; b=Tra0Fiw1axreQxilb/VR5yqS2GF7rW2JtO/pmEz8Lwlg1nzMMUz8psoAQw9kPKp28s wliU/+IuGpF2StbS1Nxe/mev/dxySBU6C7CwrvUmnZWYEooHU4K3mAiDqsAien2Z6CI/ wCbZa1AAE1MOcYZW+Bp/weXPRYhSeIAxC9eYhvhNf6AxDFhjCvpNd/QfPzBaA7g9/Pso eQbBEwyiHadrTkKJxP7dAacND7ri8Oh1ayJ73fa09Ba0ekJtyqeAHoPO8m5nbTd1rMqA nukC3nVNQncwwCAes7fiIQYvdFVHzQ7qwIp74VDjNY8yRRA/zV+O+aj32APua1kKNgzO xXkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z6si22952244plo.11.2017.11.27.10.26.58; Mon, 27 Nov 2017 10:27:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752903AbdK0S0U (ORCPT + 78 others); Mon, 27 Nov 2017 13:26:20 -0500 Received: from smtprelay4.synopsys.com ([198.182.47.9]:34070 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752566AbdK0S0S (ORCPT ); Mon, 27 Nov 2017 13:26:18 -0500 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 66D3A24E0D85; Mon, 27 Nov 2017 10:26:18 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id E6ADA5C3; Mon, 27 Nov 2017 10:26:17 -0800 (PST) Received: from US01WXQAHTC1.internal.synopsys.com (us01wxqahtc1.internal.synopsys.com [10.12.238.230]) by mailhost.synopsys.com (Postfix) with ESMTP id C0DE95BF; Mon, 27 Nov 2017 10:26:17 -0800 (PST) Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by US01WXQAHTC1.internal.synopsys.com (10.12.238.230) with Microsoft SMTP Server (TLS) id 14.3.266.1; Mon, 27 Nov 2017 10:25:24 -0800 Received: from IN01WEHTCA.internal.synopsys.com (10.144.199.103) by IN01WEHTCB.internal.synopsys.com (10.144.199.105) with Microsoft SMTP Server (TLS) id 14.3.266.1; Mon, 27 Nov 2017 23:55:22 +0530 Received: from [10.10.161.62] (10.10.161.62) by IN01WEHTCA.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.266.1; Mon, 27 Nov 2017 23:55:21 +0530 Subject: Re: [PATCH] frv: fix build failure To: Alexey Brodkin , "sudipm.mukherjee@gmail.com" CC: "linux-kernel@vger.kernel.org" , "Vineet Gupta" , "akpm@linux-foundation.org" , "linux-snps-arc@lists.infradead.org" , "linux-arch@vger.kernel.org" , Arnd Bergmann References: <1511302233-5008-1-git-send-email-sudipm.mukherjee@gmail.com> <1511457437.32422.6.camel@synopsys.com> From: Vineet Gupta Message-ID: <3a6fe86e-7a66-56df-3b1d-e2e8cd3e6eae@synopsys.com> Date: Mon, 27 Nov 2017 10:25:16 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1511457437.32422.6.camel@synopsys.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.10.161.62] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +CC linux-arch, Arnd On 11/23/2017 09:17 AM, Alexey Brodkin wrote: > Hi Sudip, > > On Tue, 2017-11-21 at 22:10 +0000, Sudip Mukherjee wrote: >> The frv defconfig build is failing with the error: >> lib/mpi/mpih-div.o: In function `mpihelp_divrem': >> mpih-div.c:(.text+0x30c): undefined reference to `abort' >> >> The function 'abort' was never defined for the frv architecture. >> Create 'abort' as is done in other arch like 'arm' and 'unicore32'. >> >> Signed-off-by: Sudip Mukherjee >> --- > > I'm seeing the same issue building for ARC from today's Linus' tree. With which compiler ? Claudiu implemented __builtin_trap recently so ARC builds should not get abort() but a trap 5 instruction instead. > Maybe it worth implementing abort() as a weak function for every arch/platform > that doesn't have it explicitly defined? Otherwise we'll end-up with > useless code duplication. I understand the case/need for adding a weak/common abort() as a quick fix for handling such cases, but perhaps we should not and instead fix the rootcause. In this specific case, Claudiu mentioned that gcc was generating abort due to something like this (flagging a possible divide by zero due to -fno-isolate-erroneous-paths-dereference. a; fn1() { switch (a) case 0: return 1 / a; } Sudeep can you confirm that removing this hacking FRV build to not have this toggle fixes the abort issue. So the offending code needs to be fixed as in the end when that code path is taken system is hosed. -Vineet From 1584922600569132914@xxx Fri Nov 24 05:06:17 +0000 2017 X-GM-THRID: 1584715385015652246 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread