Ok, so whenever i inlcude math.h it has this crazy notion that mathinline.h needs be included as well, which causes compile problems. So after looking into this for a while i found that __USE_EXTERN_INLINE is either always defined somehow, even when using -U__USE__.. I changed the code in the math.h file from: #ifdef __USE_EXTERN_INLINES # include <bits/mathinline.h> #endif to: #if defined __USE_EXTERN_INLINES && !defined __NO_MATH_INLINES # include <bits/mathinline.h> #endif So when __NO_MATH_INLINES is defined, it won't use them. There is still something wacky about __USE_EXTERN_INLINES seeing that it is always being defined. Let me know if there is a different/better fix for this. thanks, Joe Paris Argonne National Labs
This is a glibc problem
USE_EXTERN_INLINES are defined if using optimization (check the features.h)