1
0

920-specs_nonfatal_getenv.patch 677 B

12345678910111213141516171819202122
  1. Author: Jo-Philipp Wich <jow@openwrt.org>
  2. Date: Sat Apr 21 03:02:39 2012 +0000
  3. gcc: add patch to make the getenv() spec function nonfatal if requested environment variable is unset
  4. SVN-Revision: 31390
  5. --- a/gcc/gcc.c
  6. +++ b/gcc/gcc.c
  7. @@ -10106,8 +10106,10 @@ getenv_spec_function (int argc, const ch
  8. }
  9. if (!value)
  10. - fatal_error (input_location,
  11. - "environment variable %qs not defined", varname);
  12. + {
  13. + warning (input_location, "environment variable %qs not defined", varname);
  14. + value = "";
  15. + }
  16. /* We have to escape every character of the environment variable so
  17. they are not interpreted as active spec characters. A