public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
* Dynamic VFP support and math/test-fpucw
@ 2013-06-17 19:18 Joseph S. Myers
  2013-06-17 19:41 ` Roland McGrath
  0 siblings, 1 reply; 4+ messages in thread
From: Joseph S. Myers @ 2013-06-17 19:18 UTC (permalink / raw)
  To: libc-ports

On ARM systems without VFP hardware, the test math/test-fpucw fails 
because it tries to use _FPU_GETCW, so using unsupported VFP instructions.

Normal user programs using _FPU_GETCW in a soft-float configuration would 
get the fallback soft-float version of that macro and so not have that 
issue.  But the condition for the soft-float version is

#if !defined(_LIBC) && defined(__SOFTFP__)

and _LIBC is defined when testcases are built, not just for building the 
installed libraries.

Really I think most testcases should be built using an environment more 
like that for ordinary user programs, not using internal headers 
(including include/ wrappers) or defining _LIBC unless there is a specific 
need to do so in a particular testcase.  But in the absence of such a 
testsuite overhaul, how might one best stop this testcase failing?  One 
obvious possibility is to use e.g. _LIBC_DYNAMIC_VFP rather than just 
_LIBC in fpu_control.h, and then to define _LIBC_DYNAMIC_VFP in another 
header (not used in the testcase), e.g. arm-features.h.  But that would 
introduce a header ordering dependency (arm-features.h needs to be 
included before fpu_control.h), and while one could make arm-features.h 
use #error if fpu_control.h was included first, this still seems rather 
fragile.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-17 22:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-17 19:18 Dynamic VFP support and math/test-fpucw Joseph S. Myers
2013-06-17 19:41 ` Roland McGrath
2013-06-17 21:40   ` Joseph S. Myers
2013-06-17 22:03     ` Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).