920-specs_nonfatal_getenv.patch 479 B

123456789101112131415
  1. --- a/gcc/gcc.c
  2. +++ b/gcc/gcc.c
  3. @@ -8807,8 +8807,10 @@ getenv_spec_function (int argc, const ch
  4. value = getenv (argv[0]);
  5. if (!value)
  6. - fatal_error (input_location,
  7. - "environment variable %qs not defined", argv[0]);
  8. + {
  9. + warning (input_location, "environment variable %qs not defined", argv[0]);
  10. + value = "";
  11. + }
  12. /* We have to escape every character of the environment variable so
  13. they are not interpreted as active spec characters. A