Re: m68k allmodconfig build errors

From: Finn Thain
Date: Fri Jul 27 2018 - 00:44:34 EST


On Thu, 26 Jul 2018, Randy Dunlap wrote:

> >
> > The untested patch below may work. It seems that it may be relevant to
> > both arc and m68k:
>
>
> I got back to looking at the build errors. I agree with Andreas that
> all of the fields in question are null-terminated, so Finn's patch looks
> good to me.
>
>

That patch is insufficient:

ERROR: "strcmp" [fs/hfsplus/hfsplus.ko] undefined!

And I haven't even attempted "make ARCH=m68k ... allyesconfig" let alone
"make ARCH=arc ... allyesconfig".

And we have to anticipate an ongoing game of whack-a-mole here, as new
library calls get added to linux and new optimizations get added to gcc.

The real problem here seems to be a compiler bug: converting strncmp to
strcmp is bogus. Some implicit assumptions in that code transformation:
1. that strcmp is equivalient to strncmp in this case
2. that strcmp is faster than strncmp in this case
3. that strcmp is actually available to the linker

Why doesn't gcc convert strncmp to __builtin_strcmp? That would require
fewer assumptions, and it would actually link, and we wouldn't have to
keep patching things...

--