This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: Dynamic VFP support and math/test-fpucw
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: <libc-ports at sourceware dot org>
- Date: Mon, 17 Jun 2013 15:03:09 -0700 (PDT)
- Subject: Re: Dynamic VFP support and math/test-fpucw
- References: <Pine dot LNX dot 4 dot 64 dot 1306171909380 dot 15498 at digraph dot polyomino dot org dot uk> <20130617194154 dot 2287E2C095 at topped-with-meat dot com> <Pine dot LNX dot 4 dot 64 dot 1306172135580 dot 15498 at digraph dot polyomino dot org dot uk>
> The trouble is, those options seem rather fragile as well.
Sure. I was just offering potential paths given the status quo. We now
that the eventual solution will be to clean up how we build test programs.
That's not something you can rely on any time soon, but perhaps that being
the plan for the future is sufficient to worry less than you might
otherwise about fragility in a solution that is just a workaround pending
that future.
> Maybe the least bad is overriding the test with a file that just defines
> e.g. _LIBC_TEST and includes the main test-fpucw.c (with fpu_control.h
> then checking _LIBC_TEST).
That is indeed tolerable.
> The difficulty with the second is that dynamic VFP detection is used in
> both libc and libm, so NOT_IN_libc isn't sufficient on its own.
If this is saying something more subtle than that you'll want:
#if !defined NOT_IN_libc && !defined IS_IN_libm
then I am not following.
> Really I suppose what's wanted, in the absence of not defining _LIBC for
> tests, would be a macro such as IN_tests that gets automatically defined
> for testcase code; then at least fpu_control.h could test that after
> _LIBC (if it's only tested conditional on _LIBC, namespace issues
> wouldn't matter for IN_tests because no user application should ever
> define _LIBC).
Defining IN_tests is easy enough. Having an installed header refer to an
IN_* identifier (even if technically "safe") is beyond the pale, IMHO.
Thanks,
Roland