<!DOCTYPE html>
<html lang='en'>
<head>
<title>guix - Wojtek's customized Guix</title>
<meta name='generator' content='cgit v1.2.3'/>
<meta name='robots' content='noindex, nofollow'/>
<link rel='stylesheet' type='text/css' href='/cgit-static/cgit.css'/>
<link rel='stylesheet' type='text/css' href='/cgit-static/better-cgit-markdown-heading-color.css'/>
<link rel='shortcut icon' href='/cgit-static/favicon.ico'/>
<link rel='alternate' title='Atom feed' href='https://git.koszko.org/guix/atom/CODE-OF-CONDUCT?h=koszko' type='application/atom+xml'/>
</head>
<body>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/'><img src='https://git.koszko.org/cgit-static/cgit.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/'>index</a> : <a href='/guix/'>guix</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='fe33375b25d025428f44fe01968e6e1b829b055e'/><select name='h' onchange='this.form.submit();'>
<option value='koszko' selected='selected'>koszko</option>
<option value='koszko-scripts'>koszko-scripts</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>Wojtek's customized Guix</td><td class='sub right'>Guix</td><td class='sub right'></td></tr></table>
<table class='tabs'><tr><td>
<a class='active' href='/guix/about/'>about</a><a href='/guix/'>summary</a><a href='/guix/refs/?id=c4d769d359c67680fe55c3b71e659cd31837f3ec'>refs</a><a href='/guix/log/'>log</a><a href='/guix/tree/?id=c4d769d359c67680fe55c3b71e659cd31837f3ec'>tree</a><a href='/guix/commit/?id=c4d769d359c67680fe55c3b71e659cd31837f3ec'>commit</a><a href='/guix/diff/?id=c4d769d359c67680fe55c3b71e659cd31837f3ec'>diff</a></td><td class='form'><form class='right' method='get' action='/guix/log/'>
<input type='hidden' name='id' value='c4d769d359c67680fe55c3b71e659cd31837f3ec'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='content'><div id='summary'><pre>
Search path environment variables for cross-compilers.  See the discussion
at &lt;http://gcc.gnu.org/ml/gcc/2013-02/msg00124.html&gt;.

Note: Touch &apos;C_INCLUDE_PATH&apos; et al. rather than &apos;CPATH&apos;, as discussed
at &lt;http://bugs.gnu.org/22186&gt;.

diff --git a/gcc/gcc.c b/gcc/gcc.c
index eced0d5..08dec2b 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -4317,7 +4317,7 @@ process_command (unsigned int decoded_options_count,
     }
 
   temp = env.get (LIBRARY_PATH_ENV);
-  if (temp &amp;&amp; *cross_compile == &apos;0&apos;)
+  if (temp)
     {
       const char *startp, *endp;
       char *nstore = (char *) alloca (strlen (temp) + 3);
diff --git a/gcc/incpath.c b/gcc/incpath.c
index 98fe5ec..96aff65 100644
--- a/gcc/incpath.c
+++ b/gcc/incpath.c
@@ -461,8 +461,8 @@ register_include_chains (cpp_reader *pfile, const char *sysroot,
 			 int stdinc, int cxx_stdinc, int verbose)
 {
   static const char *const lang_env_vars[] =
-    { &quot;C_INCLUDE_PATH&quot;, &quot;CPLUS_INCLUDE_PATH&quot;,
-      &quot;OBJC_INCLUDE_PATH&quot;, &quot;OBJCPLUS_INCLUDE_PATH&quot; };
+    { &quot;CROSS_C_INCLUDE_PATH&quot;, &quot;CROSS_CPLUS_INCLUDE_PATH&quot;,
+      &quot;CROSS_OBJC_INCLUDE_PATH&quot;, &quot;CROSS_OBJCPLUS_INCLUDE_PATH&quot; };
   cpp_options *cpp_opts = cpp_get_options (pfile);
   size_t idx = (cpp_opts-&gt;objc ? 2: 0);
 
@@ -473,7 +473,7 @@ register_include_chains (cpp_reader *pfile, const char *sysroot,
 
   /* CPATH and language-dependent environment variables may add to the
      include chain.  */
-  add_env_var_paths (&quot;CPATH&quot;, BRACKET);
+  add_env_var_paths (&quot;CROSS_CPATH&quot;, BRACKET);
   add_env_var_paths (lang_env_vars[idx], SYSTEM);
 
   target_c_incpath.extra_pre_includes (sysroot, iprefix, stdinc);
diff --git a/gcc/system.h b/gcc/system.h
index 0cbf60a..3242c68 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -1169,4 +1169,6 @@ helper_const_non_const_cast (const char *p)
 /* Get definitions of HOST_WIDE_INT.  */
 #include &quot;hwint.h&quot;
 
+#define LIBRARY_PATH_ENV &quot;CROSS_LIBRARY_PATH&quot;
+
 #endif /* ! GCC_SYSTEM_H */
diff --git a/gcc/tlink.c b/gcc/tlink.c
index a2a7db0..2d96872 100644
--- a/gcc/tlink.c
+++ b/gcc/tlink.c
@@ -456,7 +456,7 @@ recompile_files (void)
   file *f;
 
   putenv (xstrdup (&quot;COMPILER_PATH=&quot;));
-  putenv (xstrdup (&quot;LIBRARY_PATH=&quot;));
+  putenv (xstrdup (LIBRARY_PATH_ENV &quot;=&quot;));
 
   while ((f = file_pop ()) != NULL)
     {
</pre>
</div></div> <!-- class=content -->
                         <div class=footer>generated by
                             <a href="https://git.zx2c4.com/cgit/about/">
                                 cgit
                             </a>
                         </div>
                        </div> <!-- id=cgit -->
</body>
</html>
