Aurelien Jarno <aure...@debian.org> writes: > Yes, the 0020-Always-define-gmalloc-etc.-in-src-gmalloc.c.patch actually > comes from upstream commit 4b1436b702d56eedd27a0777fc7232cdfb7ac4f6.
Ahh, yes, quite close, so I think this may be sufficient: Author: Wolfgang Jenkner <wjenk...@inode.at> Date: Sat Dec 26 12:12:02 2015 -0800 Emacs should work with gcc 5.2 and newer This patch, backported from upstream by Aurelien Jarno <aure...@debian.org>, has been added: Always define gmalloc etc. in src/gmalloc.c This is a work-around to prevent the compiler from using semantic knowledge about malloc for optimization purposes. E.g., gcc 5.2 with -O2 replaces most of calloc's definition by a call to calloc; see Bug#22085. * src/gmalloc.c [!HYBRID_MALLOC] (malloc, realloc, calloc) (aligned_alloc, free): Do not undef. Instead, define these as functions (perhaps renamed to gmalloc etc.) in terms of gmalloc etc. Origin: backport, commit: 4b1436b702d56eedd27a0777fc7232cdfb7ac4f6 Bug-Debian: http://bugs.debian.org/833727 ...and for the glibc patch, this looks like the origin: e95b023163e96538b15f030b7176b7ec59cf86f5 Thanks again -- Rob Browning rlb @defaultvalue.org and @debian.org GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4