Skip to content
Snippets Groups Projects
Commit f79bfe60 authored by Jo-Philipp Wich's avatar Jo-Philipp Wich
Browse files

gcc: add patch to make the getenv() spec function nonfatal if requested...

gcc: add patch to make the getenv() spec function nonfatal if requested environment variable is unset

SVN-Revision: 31390
parent 2624d67c
No related branches found
No related tags found
No related merge requests found
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -8583,7 +8583,10 @@ getenv_spec_function (int argc, const ch
value = getenv (argv[0]);
if (!value)
- fatal ("environment variable \"%s\" not defined", argv[0]);
+ {
+ warning (0, "environment variable \"%s\" not defined", argv[0]);
+ value = "";
+ }
/* We have to escape every character of the environment variable so
they are not interpreted as active spec characters. A
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -7772,7 +7772,10 @@ getenv_spec_function (int argc, const ch
value = getenv (argv[0]);
if (!value)
- fatal_error ("environment variable %qs not defined", argv[0]);
+ {
+ warning (0, "environment variable %qs not defined", argv[0]);
+ value = "";
+ }
/* We have to escape every character of the environment variable so
they are not interpreted as active spec characters. A
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -7772,7 +7772,10 @@ getenv_spec_function (int argc, const ch
value = getenv (argv[0]);
if (!value)
- fatal_error ("environment variable %qs not defined", argv[0]);
+ {
+ warning (0, "environment variable %qs not defined", argv[0]);
+ value = "";
+ }
/* We have to escape every character of the environment variable so
they are not interpreted as active spec characters. A
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -7814,7 +7814,10 @@ getenv_spec_function (int argc, const ch
value = getenv (argv[0]);
if (!value)
- fatal_error ("environment variable %qs not defined", argv[0]);
+ {
+ warning (0, "environment variable %qs not defined", argv[0]);
+ value = "";
+ }
/* We have to escape every character of the environment variable so
they are not interpreted as active spec characters. A
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment