------- Comment #26 from howarth at nitro dot med dot uc dot edu 2009-12-09 18:40 ------- I am still a bit confused about this bug. When we leave -lm out of the linkage of builtin-math-7.exe, where does the ___divdc3 call get resolved from? Shouldn't it be coming libSystem since that always appears first on the command line?
http://developer.apple.com/mac/library/documentation/Porting/Conceptual/PortingUnix/compiling/compiling.html suggests that should be the case... The libSystem library also includes functions that you would normally expect to find in libc and libm, RPC services, and a name resolver. Because libSystem is automatically linked into your application, you do not need to explicitly add it to the compilers link line. For your convenience, many of these libraries exist as symbolic links to libSystem, so while explicitly linking against -lm (for example) is not needed, it will not cause an error. So this sounds more like an darwin linker bug. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42333