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