On Tue, 25 Sep 2018, Michael Schmitz wrote:
Hi Finn,
has this been resolved in the meantime?
My compiler is too old (4.4.6) to be affected. Also, I didn't pursue a
patch because I don't really know how you fix this properly.
It seems that multiple architectures have multiple issues. Each
architecture may implement a different set of __HAVE_ARCH builtins (which
is complicated enough). Now we have different compiler releases
compounding the problem with different sets of __builtins.
This may require portable build-time feature tests like autoconf uses.
--
I'm running into a little dilemma when working on yet another spin on
the RDB partition patch (the patch that just won't die): either use old
gcc 4.6.3, and lack __udivdi3 support, or new and shiny 8.10 with its
strncmp mess.
Cheers,
??? Michael
On 28/07/18 00:51, Finn Thain wrote:
On Fri, 27 Jul 2018, Andreas Schwab wrote:
On Jul 27 2018, Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx> wrote:
Why doesn't gcc convert strncmp to __builtin_strcmp?
It does. In fact, it first converts strncmp to __builtin_strncmp, then
optimizes it to __builtin_strcmp. Finally, __bultin_strcmp is expanded
to a call to strcmp.
So either the static inline strcmp routine has to be dropped from
arch/m68k/include/asm/string.h (along with #define __HAVE_ARCH_STRCMP), or
else a static inline strncmp has to be added (along with #define
__HAVE_ARCH_STRNCMP)?