From: James Bottomley <James.Bottomley@suse.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>,
scsi <linux-scsi@vger.kernel.org>,
Linux-Next <linux-next@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [-next] ERROR: "strchr" [drivers/target/target_core_mod.ko] undefined!
Date: Fri, 07 Jan 2011 09:44:04 -0600 [thread overview]
Message-ID: <1294415045.4895.16.camel@mulgrave.site> (raw)
In-Reply-To: <AANLkTinhrj38rbEt7ds971D9g-UF+xS0jmzO7X15ZaLn@mail.gmail.com>
On Fri, 2011-01-07 at 11:57 +0100, Geert Uytterhoeven wrote:
> Since a few days, linux-next shows:
>
> | ERROR: "strchr" [drivers/target/target_core_mod.ko] undefined!
>
> in m68k allmodconfig builds
> (http://kisskb.ellerman.id.au/kisskb/buildresult/3754323/).
>
> I guess this is caused by the following 3 calls to strstr():
>
> drivers/target/target_core_configfs.c:
> + ptr = strstr(page, "1");
>
> + str = strstr(buf, "_");
>
> + str2 = strstr(str+1, "_");
>
> Some versions of gcc replace calls to strstr() with single-character
> "needle" string parameters by calls to strchr() behind our back.
> This causes linking errors if strchr() is defined as an inline function
> in <asm/string.h> (e.g. on m68k).
>
> You can prevent this by explicitly calling strchr() instead.
>
> Cfr. commit 59d309f9c8ef0bd01bf93cc0e758f1d810417bdb
> ("kgdb: Replace strstr() by strchr() for single-character needles).
>
> Gr{oetje,eeting}s,
Surely the fix for this is not to inline it in m68k? If gcc is growing
the capability to make these types of transformations, it's not going to
stop at single entry string strstr().
If you want to keep the fast inline, there is a way (which I forget) to
drop an external reference as well, just in case.
James
next prev parent reply other threads:[~2011-01-07 15:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-07 10:57 [-next] ERROR: "strchr" [drivers/target/target_core_mod.ko] undefined! Geert Uytterhoeven
2011-01-07 15:44 ` James Bottomley [this message]
2011-01-07 21:04 ` Nicholas A. Bellinger
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=1294415045.4895.16.camel@mulgrave.site \
--to=james.bottomley@suse.de \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.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