This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Replace match.pd DEFINE_MATH_FNs with auto-generated lists


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]