This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [3/6] nvptx testsuite patches: stdio
- From: Mike Stump <mikestump at comcast dot net>
- To: Bernd Schmidt <bernds at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 21 Oct 2014 12:01:44 -0700
- Subject: Re: [3/6] nvptx testsuite patches: stdio
- Authentication-results: sourceware.org; auth=none
- References: <5446694A dot 1010705 at codesourcery dot com> <54466B03 dot 6030706 at codesourcery dot com>
On Oct 21, 2014, at 7:17 AM, Bernd Schmidt <bernds@codesourcery.com> wrote:
> Some tests use stdio functions which are unavaiable with the cut-down newlib I'm using for ptx testing. I'm somewhat uncertain what to do with these; they are by no means the only unavailable library functions the testsuite tries to use (signal is another example). Here's a patch which deals with parts of the problem, but I wouldn't mind leaving this one out if it doesn't seem worthwhile.
So, it is nice if an entire newlib port can be done, then, you don’t have to worry about subsets of it.
I think the patch is Ok, I would change:
+#ifndef __nvptx__
fprintf (stderr, "Test failed: %s\n", msg);
+#endif
to just comment out the line.
If you want to try your hand at removing stdio in some fashion, you can try, I am skeptical that there is a meaningful way to do that and it seems larger and harder then the patch you have. The usual fashion I would recommend would be a stub library for testing that simply disappears such calls as uninteresting. int fpritnf (…) { return 0; } would go a long way. For test cases that someone care about what fprintf actually does, those can be marked as stdio and likely, those would be a far smaller set to so mark.