Am 03.05.2017 um 11:46 schrieb Duy Nguyen:
On Tue, May 2, 2017 at 2:22 AM, Jeff King <peff@xxxxxxxx> wrote:
On Mon, May 01, 2017 at 01:23:28PM +0200, René Scharfe wrote:
I can only get gcc and clang to call memcpy instead of inlining it by
specifying -fno-builtin. Do you use that option? If yes, why? (Just
curious.)
I do my normal edit-compile cycles with -O0 because it's fast, and
because it makes debugging much easier.
Same here. My CFLAGS (without lots of -Wstuff)
CFLAGS = -g -O0 -fstack-protector
Maybe it's -fstack-protector then? This is gcc 4.9.3. I think Gentoo
does not add any distro-specific patches on this particular version.
gcc 4.9.2 on Debian i386 still inlines memcpy for me with these options.
https://packages.debian.org/jessie/gcc-4.9 links to a 5MB diff, and it
adds these lines to NEWS.gcc (plus changing a whole lot of other files,
of course):
+ - Better inlining of memcpy and memset that is aware of value ranges
+ and produces shorter alignment prologues.
That might be it.
René