0f7d40b244dc7d22ada64c548aa82187746ebe33
[openwrt/openwrt.git] / toolchain / gcc / patches / 12.1.0 / 920-specs_nonfatal_getenv.patch
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 @@ -10213,8 +10213,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