[PATCH v2] Enable -mrop-protect through configure command
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Wed Apr 30 13:58:35 GMT 2025
On 30/04/25 10:16, Peter Bergner wrote:
> On 4/30/25 6:47 AM, Florian Weimer wrote:
>> Ohhh. In this case, wouldn't it make sense to drop building those
>> files at all if the baseline is POWER8 or higher?
>
> We'd have to make sure those are not actually used when running on
> newer hardware. As you know, if we don't have a cpu tuned routine
> for function FUNC, we fall back to the previous cpu's FUNC routine.
> We're not sure yet whether that is the case here. I have asked Sachin
> to look into that, but for now we're playing it safe and assuming it is.
Another option is evaluate if providing optimized strncasecmp routines
really improve realworld cases. Only x86 and powerpc does this
currently, and my guess is aarch64 and other architectures did not
focus on these routines because either they are rarely used or projects
use other functions or implementations. The gnulib documentation
(doc/strings.texi), for instance, does not recommend them:
Gnulib has functions @func{mbscasecmp}, @func{mbsncasecmp},
@func{mbspcasecmp}, and @func{mbscasestr} that are like
@posixfunc{strcasecmp}, @posixfunc{strncasecmp}, and
@posixfunc{strcasestr}, but work in multibyte locales. Still, the
function @code{ulc_casecmp} is preferable to these functions.
More information about the Libc-alpha
mailing list