This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH 6/6] Compile sched_getaffinity.c with -fno-builtin-memset
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 14 Aug 2015 08:33:17 -0700
- Subject: Re: [PATCH 6/6] Compile sched_getaffinity.c with -fno-builtin-memset
- Authentication-results: sourceware.org; auth=none
- References: <20150814121907 dot GF28610 at gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1508141519370 dot 16651 at digraph dot polyomino dot org dot uk>
On Fri, Aug 14, 2015 at 8:27 AM, Joseph Myers <firstname.lastname@example.org> wrote:
> On Fri, 14 Aug 2015, H.J. Lu wrote:
>> Since sched_getaffinity.c calls memset which may not be inlined, we
>> should compile it with -fno-builtin-memset so that the internal hidden
>> memset is called without PLT.
>> OK for master?
> memset is called all over the place. I don't like hardcoding special
> options for particular files based on calls to memset, and especially not
> based on what some particular compiler version happens to do with a
> particular call. Why doesn't the call to libc_hidden_builtin_proto
> (memset) in include/string.h suffice? Can you devise some set of
> declarations / toplevel asms to put in a header that will ensure memset
> calls go via a hidden alias (ideally with the compiler knowing it's
> hidden, not just the assembler / linker, so the compiler can do any
> optimizations based on it being an intra-library call)?
has no impact on memset inlined by compiler.