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?
lib/msun/Makefile only defines fmodl on select architectures: 97 .if ${LDBL_PREC} != 53 98 # If long double != double use these; otherwise, we alias the double versions. 99 COMMON_SRCS+= e_acoshl.c e_acosl.c e_asinl.c e_atan2l.c e_atanhl.c \ 100 e_coshl.c e_fmodl.c e_hypotl.c \ This seems to support what I've seen. Is there a list of functions that are only partially implemented on some architectures, so I can modify the testcases accordingly to skip them?
I'm not aware of any overall list, you'll have to handle it on a case by case basis. That said, I think there's an actual error here -- fmodl should be an alias for fmod when long double == double.
(In reply to Ed Maste from comment #2) The NetBSD testcases poke directly at fmodl and friends in t_fmod.c, so it's a problem with the testcases. Thanks for the clarification :).
(In reply to Garrett Cooper,425-314-3911 from comment #3) > so it's a problem with the testcases I don't follow; the tests in t_fmod.c should build and pass on all architectures. > ATF_CHECK(fmodl(2.0, 1.0) == 0);
Nevermind. I just reread that. You're right -- it's an issue with libc.
(In reply to Garrett Cooper,425-314-3911 from comment #5) msun, not libc.
As an aside, by the same logic it looks like r274601 should be reverted
Yes. Part or all of the logic I committed in that revision should be committed depending on the outcome...
A commit references this bug: Author: ngie Date: Thu Apr 16 08:50:42 UTC 2015 New revision: 281597 URL: https://svnweb.freebsd.org/changeset/base/281597 Log: the fmodl compat shims on arm/mips/powerpc don't seem to be all there #if 0 the code for now PR: 199422 Changes: user/ngie/more-tests/contrib/netbsd-tests/lib/libm/t_fmod.c
A commit references this bug: Author: ngie Date: Mon Apr 27 06:46:34 UTC 2015 New revision: 282056 URL: https://svnweb.freebsd.org/changeset/base/282056 Log: The fmodl compat shims on arm/mips/powerpc aren't complete Disable the test code for now on those architectures MFC after: 1 week PR: 199422 Changes: _U head/ head/contrib/netbsd-tests/lib/libm/t_fmod.c
A commit references this bug: Author: ngie Date: Wed May 13 10:12:17 UTC 2015 New revision: 282836 URL: https://svnweb.freebsd.org/changeset/base/282836 Log: MFC r282056: The fmodl compat shims on arm/mips/powerpc aren't complete Disable the test code for now on those architectures PR: 199422 Changes: _U stable/10/ stable/10/contrib/netbsd-tests/lib/libm/t_fmod.c
A commit references this bug: Author: bde Date: Sun Sep 4 12:01:32 UTC 2016 New revision: 305380 URL: https://svnweb.freebsd.org/changeset/base/305380 Log: Fix missing fmodl() on arches with 53-bit long doubles. PR: 199422, 211965 MFC after: 1 week Changes: head/lib/msun/src/e_fmod.c
A commit references this bug: Author: bde Date: Mon Sep 19 12:34:29 UTC 2016 New revision: 305971 URL: https://svnweb.freebsd.org/changeset/base/305971 Log: MFC r305380: Fix missing fmodl() on arches with 53-bit long doubles. PR: 199422, 211965 Changes: stable/11/lib/msun/src/e_fmod.c
There is a commit referencing this PR, but it's still not closed and has been inactive for some time. Closing the PR as fixed but feel free to re-open it if the issue hasn't been completely resolved. Thanks
Test hasn't been fixed. Reopening.