https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81907
Bug ID: 81907 Summary: undefined reference to `memset' Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: dongkyun.s at samsung dot com Target Milestone: --- Created attachment 42013 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42013&action=edit memset_test Compiling the attached source without memset trivial implementation, Failed by undefined reference to `memset' OPTFLAGS = -Os -g -mabi=aapcs -fno-function-sections -Wall -mfloat-abi=soft -mtune=cortex-a9 Succeeded with option OPTFLAGS = -Os -g -mabi=aapcs -fno-function-sections -Wall -mfloat-abi=soft -mtune=cortex-a12 Using -O2 instead of -Os (Optimization level) also fix this fail. What is different optimization behavior(implementation) in GCC between cortex-a9 and cortex-a12 -given by mcpu or mtune option ? Found related issue in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888.