This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Replace match.pd DEFINE_MATH_FNs with auto-generated lists
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Richard Sandiford <richard dot sandiford at arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 10 Nov 2015 21:24:44 +0100
- Subject: Re: Replace match.pd DEFINE_MATH_FNs with auto-generated lists
- Authentication-results: sourceware.org; auth=none
- References: <87h9kyose0 dot fsf at e105548-lin dot cambridge dot arm dot com> <CAFiYyc1W3e=Y7SsiWzOvrvH_s_S5nC2eotxoXBeZQd769at-kQ at mail dot gmail dot com> <87bnb1mx3u dot fsf at e105548-lin dot cambridge dot arm dot com>
On November 10, 2015 9:13:25 PM GMT+01:00, Richard Sandiford <richard.sandiford@arm.com> wrote:
>Richard Biener <richard.guenther@gmail.com> writes:
>> On Sat, Nov 7, 2015 at 2:23 PM, Richard Sandiford
>> <richard.sandiford@arm.com> wrote:
>>> diff --git a/gcc/genmatch.c b/gcc/genmatch.c
>>> index cff32b0..7139476 100644
>>> --- a/gcc/genmatch.c
>>> +++ b/gcc/genmatch.c
>>> @@ -4638,6 +4638,11 @@ main (int argc, char **argv)
>>> cpp_callbacks *cb = cpp_get_callbacks (r);
>>> cb->error = error_cb;
>>>
>>> + /* Add the build directory to the #include "" search path. */
>>> + cpp_dir *dir = XCNEW (cpp_dir);
>>> + dir->name = ASTRDUP (".");
>>> + cpp_set_include_chains (r, dir, NULL, false);
>>
>> Does that work on non-UNIX hosts?
>
>Bah, hadn't thought about that.
>
>> I wonder if there is sth
>> better we can use by passing some -DXXX=... to the genmatch
>> build command from the Makefile?
>
>toplev.c has:
>
> src_pwd = getpwd ();
> if (!src_pwd)
> src_pwd = ".";
>
>where getpwd is a libiberty function. Maybe we can use that?
Looks like so.
Richard.
>Thanks,
>Richard