This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: -fno-builtin-function doesn't work?
On 04/19/2010 12:19 AM, Pan ruochen wrote:
$mips-linux-gnu-gcc -mips32r2 -EL -O2 -muclibc -msoft-float 1.c
/tmp/ccufhMGF.o: In function `main':
1.c:(.text+0x28): undefined reference to `sincos'
1.c:(.text+0x38): undefined reference to `sincos'
This isn't a linker issue, it is a gcc issue.
GCC has a macro TARGET_HAS_SINCOS which is defined in config/linux.h as
/* Whether we have sincos that follows the GNU extension. */
#define TARGET_HAS_SINCOS (OPTION_GLIBC)
The tree-ssa-math.c file performs this optimization if this is true.
So if you configure for a linux (glibc) target, then gcc will assume it
can emit calls to sincos. You can configure for a uclibc target instead
of configuring for a linux target, if one exists. Or you can submit a
gcc bug report pointing out that -muclibc doesn't work right with
respect to the sincos support. Or you could submit a uclibc bug report
asking that they add sincos support.
You can also point out that -fno-builtins doesn't disable this
optimization, as it should.
Jim