http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888
--- Comment #28 from Rich Felker <bugdal at aerifal dot cx> --- On Tue, Apr 29, 2014 at 02:16:38PM +0000, rguenth at gcc dot gnu.org wrote: > Honza, is there a more "fancy" way of doing this? The only correct way to fix this is to honor -ffreestanding and never generate references to hosted-C functions (which include memset) when -ffreestanding is used.