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]

don't complain about undefined env vars in self specs on gcc -v


Hello,

This is a follow-up improvement over the change
introduced from

https://gcc.gnu.org/ml/gcc-patches/2016-01/msg00414.html

<< self-specs setup with configure --with-specs are allowed to contain %:getenv
   environment variable references. We are using this capability in a few cases
   for cross ports.

   In such configurations, gcc --help or gcc --version fail if the variables
   aren't defined [...]
 
   It is a bit annoying to have to define environment variables just to
   be able to retrieve version info.
>>

The attached patch adjusts the code to allow a lone "gcc -v" as well,
for the same reason.

I verified that it works as intended on ports configured with
self specs as described above, that it doesn't change the behavior
of a lone "gcc -v" on a regular x86-linux compiler, and that is
bootstraps + regtests clean on x86_64-linux.

OK to commit ?

Thanks in advance,

With Kind Regards,

Olivier

2017-06-09  Olivier Hainque  <hainque@adacore.com>

        * gcc.c (process_command): When deciding if undefined variables
        should be ignored when processing specs, accept "gcc -v" as well.


Attachment: undef-var-gcc-v.diff
Description: Binary data


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