This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PING: Re: [PATCH 05/05] Add command-line option-parsing to jit testcases
- From: David Malcolm <dmalcolm at redhat dot com>
- To: Mike Stump <mikestump at comcast dot net>
- Cc: gcc-patches at gcc dot gnu dot org, jit at gcc dot gnu dot org, Jeff Law <law at redhat dot com>
- Date: Mon, 08 Dec 2014 20:29:09 -0500
- Subject: Re: PING: Re: [PATCH 05/05] Add command-line option-parsing to jit testcases
- Authentication-results: sourceware.org; auth=none
- References: <546CCC00 dot 209 at redhat dot com> <1416965664-15360-1-git-send-email-dmalcolm at redhat dot com> <1416965664-15360-6-git-send-email-dmalcolm at redhat dot com> <1418071451 dot 11824 dot 148 dot camel at surprise> <1B88C10F-930B-4C8B-B1E4-CCB8D1807972 at comcast dot net>
On Mon, 2014-12-08 at 13:57 -0800, Mike Stump wrote:
> On Dec 8, 2014, at 12:44 PM, David Malcolm <dmalcolm@redhat.com>
> wrote:
> > On Tue, 2014-11-25 at 20:34 -0500, David Malcolm wrote:
> >> Add command-line option-parsing to the testcases, so that we can
> >> manipulate them without needing a recompile (e.g. varying
> >> optimization levels etc).
> >>
> >> This uses getopt_long, which is a GNU extension to libc. Is that
> >> acceptable?
> >
> > Ping. Specifically, is it acceptable to use getopt_long within the
> jit
> > testcases, or should I find another way to do this (e.g. just
> getopt)?
>
> So, the standard by which we measure, does it kill building or testing
> of ada on mingwin? If it does, then no, not acceptable. Iâd like to
> think there is nothing you can do in jit.exp that could do that. So,
> from this perspective, yeah, feel free to do what you want. Git it
> done first. The second person that wants to port your code to a new
> machine (a different machine) will trip over all the bad things you
> did, and someone will then have to fix them.
>
> If you only use what gcc already sues, you will be portable to
> everything gcc is portable to. If you use GNU extensions to libc,
> well, that isnât portable enough in general. Heck, even whatâs in
> libc isnât portable enough, thatâs half the reason why we have
> autoconf in the first place.
>
> If jit is on by default everywhere, then you need to be portable
> everywhere. If only on for linux, then well, it already has GNU
> extensions in libc. I donât know if it is on by default and you
> didnât say, so, hard to comment on it.
Thanks.
The only stuff I'm using getopt_long for is to make the binaries built
by jit.exp be more flexible e.g. so that I can turn down the number of
iterations they run when running under valgrind (and potentially other
tweaks, so e.g. I can experiment with them under gdb without having to
recompile them)
Hence I think we can simply fall back to ignoring argv on hosts that
don't support getopt_long; it should merely make the testsuite less
flexible. Not sure how best to encode such a test though - check for it
in jit.exp, or in configure, I suppose.
Dave