Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752358AbdLKV0e (ORCPT ); Mon, 11 Dec 2017 16:26:34 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:46485 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750929AbdLKV0c (ORCPT ); Mon, 11 Dec 2017 16:26:32 -0500 X-Google-Smtp-Source: ACJfBouZ1R1kcNHHLGjwXI50FIXgSBTTKgO1oJmpK8e5OgJvi1NTBroECmYs8B2QW5zLBjGTh+bBrA== From: Sudip Mukherjee To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Vineet Gupta , Sudip Mukherjee , Alexey Brodkin Subject: [PATCH] arch: define weak abort Date: Mon, 11 Dec 2017 21:26:08 +0000 Message-Id: <1513027568-4800-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 948 Lines: 34 gcc was generating abort due to 'divide by zero' and if it is not defined in the toolchain the build fails. Currently 'frv' and 'arc' are failing. Previously other arch was also broken like m32r was fixed by d22e3d69ee1a ("m32r: fix build failure"). Lets define this weak function which is common for all arch and fix the problem permanently. We can even remove the arch specific 'abort' after this is done. Cc: Alexey Brodkin Signed-off-by: Sudip Mukherjee --- kernel/exit.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kernel/exit.c b/kernel/exit.c index af6c245..90c6869 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -1759,3 +1759,11 @@ long kernel_wait4(pid_t upid, int __user *stat_addr, int options, return -EFAULT; } #endif + +__weak void abort(void) +{ + BUG(); + + /* if that doesn't kill us, halt */ + panic("Oops failed to kill thread"); +} -- 1.9.1