http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55061
Ian Lance Taylor <ian at airs dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ian at airs dot com --- Comment #4 from Ian Lance Taylor <ian at airs dot com> 2012-10-24 18:12:29 UTC --- If I'm reading this correctly, we are invoking the Xcode gcc compiler with a perfectly ordinary static function, and it is choking on it. The only references I see to xstrnlen in the preprocessed file are the static function and the calls to it. In the assembler file I see a bunch of symbols listed as FUNCTION.eh = 0 followed farther down in the file by FUNCTION.eh:. xstrnlen just happens to be the first. So I guess this has nothing to do with xstrnlen as such. Looking at the command line, I'm guessing that there is some bug with the -funwind-tables option in the compiler you are using. Does it work to compile static int i() { return 0; } int j() { return i; } with -funwind-tables? If that does not work, then I guess we need a configure test to see whether the host GCC supports -funwind-tables with static functions.