https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70702
Bug ID: 70702 Summary: Build failure of ARM cross compiler under Cygwin - libc_name_p Product: gcc Version: 5.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: olivier at gautherot dot net Target Milestone: --- Created attachment 38296 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38296&action=edit Build script for reference I tried to build an ARM cross compiler under Cygwin64 and got an error (symbol not found) on libc_name_p. After some investigation, I tracked the root cause down to the files gcc/cp/cfns.{h,gperf}. I suggest the following fix: Replace "const char * libc_name_p (const char *, unsigned int);" with "static const char * libc_name_p (const char *, unsigned int);" By adding the "static" keyword, we ensure that the function is properly inlined. There are 3 occurrences in cfns.h and cfns.gperf. I attached my build scripts for reference. Note: The same build scripts worked fine under Linux (Ubuntu, Centos) and FreeBSD, with various versions of GCC and Clang/FreeBSD. The reason why GCC on Cygwin misbehaved is still unclear.