From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Vineet Gupta <Vineet.Gupta1@synopsys.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>
Subject: Re: [PATCH] frv: fix build failure
Date: Thu, 23 Nov 2017 23:01:37 +0000 [thread overview]
Message-ID: <20171123230137.GA4525@sudip-laptop> (raw)
In-Reply-To: <1511457437.32422.6.camel@synopsys.com>
[-- Attachment #1: Type: text/plain, Size: 1209 bytes --]
Hi Alexey,
On Thu, Nov 23, 2017 at 05:17:19PM +0000, 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 <sudipm.mukherjee@gmail.com>
> > ---
>
> I'm seeing the same issue building for ARC from today's Linus' tree.
> 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.
Do you mean define it for every arch or define it in a common place so
that all arch can use it?
I did a quick try with the attached patch on two different arch, one of
them (m32r) has the 'abort' defined and the other (frv) was failing due
to lack of abort, and they both built without any warnings or errors.
But I am not sure if 'kernel/exit.c' is the right place for it.
Any suggestion?
--
Regards
Sudip
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 242 bytes --]
diff --git a/kernel/exit.c b/kernel/exit.c
index af6c245..75ae35a 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1759,3 +1759,7 @@ COMPAT_SYSCALL_DEFINE5(waitid,
return -EFAULT;
}
#endif
+
+__weak void abort(void) {
+ BUG();
+}
next prev parent reply other threads:[~2017-11-23 23:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-21 22:10 [PATCH] frv: fix build failure Sudip Mukherjee
2017-11-23 17:17 ` Alexey Brodkin
2017-11-23 23:01 ` Sudip Mukherjee [this message]
2017-11-24 5:02 ` Alexey Brodkin
2017-11-27 18:25 ` Vineet Gupta
2017-12-03 22:32 ` Sudip Mukherjee
2017-12-06 22:00 ` Vineet Gupta
2017-11-27 18:49 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171123230137.GA4525@sudip-laptop \
--to=sudipm.mukherjee@gmail.com \
--cc=Alexey.Brodkin@synopsys.com \
--cc=Vineet.Gupta1@synopsys.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).