Richard Biener <richard.guent...@gmail.com> writes:
> On Sat, Nov 7, 2015 at 2:23 PM, Richard Sandiford
> <richard.sandif...@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?

Thanks,
Richard

Reply via email to