On Mon, 13 Apr 2015 [email protected] wrote:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199422
I testing out a change to build lib/msun/tests on all architectures, and I
lib/msun/tests/fmod_test failed to compile on MACHINE == {arm,mips,powerpc}
with the following error:
t_fmod.o: In function `atfu_fmod_body':
t_fmod.c:(.text+0x200): undefined reference to `fmodl'
t_fmod.c:(.text+0x204): undefined reference to `fmodl'
t_fmod.c:(.text+0x2f0): undefined reference to `fmodl'
t_fmod.c:(.text+0x2f4): undefined reference to `fmodl'
t_fmod.c:(.text+0x434): undefined reference to `fmodl'
t_fmod.o:t_fmod.c:(.text+0x438): more undefined references to `fmodl' follow
--- fmod_test ---
*** [fmod_test] Error code 1
make[8]: stopped in /home/ngie/head/lib/msun/tests
Are these functions supposed to be fully defined?
fmodl just seems to be missing a weak definition. Try this fix.
X diff -u2 e_fmod.c~ e_fmod.c
X --- e_fmod.c~ 2013-05-30 08:14:16.000000000 +0000
X +++ e_fmod.c 2015-04-13 17:18:19.493921000 +0000
X @@ -21,4 +21,6 @@
X */
X
X +#include <float.h>
X +
X #include "math.h"
X #include "math_private.h"
X @@ -131,2 +133,6 @@
X return x; /* exact output */
X }
X +
X +#if (LDBL_MANT_DIG == 53)
X +__weak_reference(fmod, fmodl);
X +#endif
Testing weak aliases is mostly redundant, but it is
probably easier to not have special cases for them.
The special cases would still need existence tests.
Bruce
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"