aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/gcc-6-cross-environment-variables.patch
blob: 285e78f162f8438aa2472ed74a559178f3489ecb (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Search path environment variables for cross-compilers.  See the discussion
at <http://gcc.gnu.org/ml/gcc/2013-02/msg00124.html>.

Note: Touch 'C_INCLUDE_PATH' et al. rather than 'CPATH', as discussed
at <http://bugs.gnu.org/22186>.

--- 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[] =
-    { "C_INCLUDE_PATH", "CPLUS_INCLUDE_PATH",
-      "OBJC_INCLUDE_PATH", "OBJCPLUS_INCLUDE_PATH" };
+    { "CROSS_C_INCLUDE_PATH", "CROSS_CPLUS_INCLUDE_PATH",
+      "CROSS_OBJC_INCLUDE_PATH", "CROSS_OBJCPLUS_INCLUDE_PATH" };
   cpp_options *cpp_opts = cpp_get_options (pfile);
   size_t idx = (cpp_opts->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 ("CPATH", BRACKET);
+  add_env_var_paths ("CROSS_CPATH", 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 42bc509..af3b9ad 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -1063,4 +1063,6 @@ helper_const_non_const_cast (const char *p)
 /* Get definitions of HOST_WIDE_INT and HOST_WIDEST_INT.  */
 #include "hwint.h"
 
+#define LIBRARY_PATH_ENV "CROSS_LIBRARY_PATH"
+
 #endif /* ! GCC_SYSTEM_H */
diff --git a/gcc/tlink.c b/gcc/tlink.c
index bc358b8..ad6242f 100644
--- a/gcc/tlink.c
+++ b/gcc/tlink.c
@@ -458,7 +458,7 @@ recompile_files (void)
   file *f;
 
   putenv (xstrdup ("COMPILER_PATH="));
-  putenv (xstrdup ("LIBRARY_PATH="));
+  putenv (xstrdup (LIBRARY_PATH_ENV "="));
 
   while ((f = file_pop ()) != NULL)
     {
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 0f042b0..c23fb0b 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -4264,7 +4264,7 @@ process_command (unsigned int decoded_options_count,
     }
 
   temp = env.get (LIBRARY_PATH_ENV);
-  if (temp && *cross_compile == '0')
+  if (temp)
     {
       const char *startp, *endp;
       char *nstore = (char *) alloca (strlen (temp) + 3);
001e16d38cb35ce9eb38'>teams: Add Zhu Zihao.宋文武 * etc/teams.scm.in: Add Zhu Zihao. 2023-03-26etc: Add gnome team.Liliana Marie Prikler * etc/teams.scm.in (gnome): New team. ("Liliana Marie Prikler", "Raghav Gururajan"): Add to gnome. 2023-03-14teams: Add 宋文武 to xfce and lxqt teams.宋文武 * etc/teams.scm.in ("宋文武"): Add xfce and lxqt. 2023-03-14teams: Add Xfce and LXQt teams.宋文武 * etc/teams.scm.in (xfce, lxqt): New teams. 2023-03-11news: Add entry for the linux-libre 6.2 update.Leo Famulari * etc/news.scm: Add entry. 2023-03-05etc: Default to variables in tempel's git-reference... et al.Liliana Marie Prikler Since we encourage using variables rather than magic hashes in the commit fields, e.g. (commit version) and (commit commit), the default for tempel to use quoted strings is rather off. Thus, let the placeholder reflect actual usage. * etc/snippets/tempel/scheme-mode (git-reference...)[commit]: Use field name as placeholder and don't quote value. (svn-reference..., bzr-reference...)[revision]: Likewise. (hg-reference...)[changeset]: Likewise. 2023-02-19news: Fix commit for the guix pack new RPM format news.Maxim Cournoyer * etc/news.scm: Adjust latest news commit. 2023-02-19news: Add entry for the new 'rpm' guix pack format.Maxim Cournoyer * etc/news.scm: Add entry. 2023-02-19etc: Add a news entry snippet.Maxim Cournoyer * etc/snippets/yas/scheme-mode/guix-news-entry: New file. 2023-02-17guix-install.sh: Add GUIX_ALLOW_OVERWRITE environment variable.Maxim Cournoyer The need for this use case appeared when attempting to install Guix on a truly minimal image made with Buildroot, which lacked enough GNU components that I had to extract a guix pack to /gnu before attempting installation, which would then refuse to proceed because of the existing /gnu. * etc/guix-install.sh: Document environment variables. (sys_create_store) [GUIX_ALLOW_OVERWRITE]: Skip pre-existing installation checks and output a warning. Extract the tarball directly to /. 2023-02-13etc: Add TeX team.Ricardo Wurmus * etc/teams.scm.in (tex): New team; add Ricardo to the team. 2023-02-05gnu: Rename 'guile-3.0/fixed' to 'guile-3.0/pinned'.Simon Tournier * gnu/packages/guile.scm: Rename variable 'guile-3.0/fixed' to 'guile-3.0/pinned', add deprecation. * etc/release-manifest.scm (%packages-to-cross-build): Replace 'guile-3.0/fixed' with 'guile-3.0/pinned'. * gnu/packages/autotools.scm (make-autoconf-wrapper)[inputs]: Likewise. * gnu/packages/commencement.scm (guile-final): Likewise. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> 2023-01-16news: Fix formatting.Florian Pelz * etc/news.scm: Add backslash to '--with-version' entry. 2023-01-16news: Fix 'de' translation.Florian Pelz * etc/news.scm: Add heading. 2023-01-16etc: teams: Remove entry for Thiago Jung Bauermann.Thiago Jung Bauermann * etc/teams.scm.in ("Thiago Jung Bauermann"): Remove member. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> 2023-01-16news: Add entry for '--with-version'.Ludovic Courtès * etc/news.scm: Add entry. Co-authored-by: Florian Pelz <pelzflorian@pelzflorian.de> 2023-01-14news: Add 'de' translation.Florian Pelz * etc/news.scm: Add German translation of entry about linux-libre 6.0 removal. 2023-01-13news: Add entry about the removal of linux-libre 6.0.Leo Famulari * etc/news.scm: Add entry 2023-01-13news: Update 'de', 'fr', 'pt_BR' translation.Florian Pelz * etc/news.scm: Add the usual translations for kernel news. 2023-01-13news: Add entry for the linux-libre 6.1 update.Leo Famulari * etc/news.scm: Add entry. 2023-01-10teams: Add Vagrant Cascadian.Vagrant Cascadian * etc/teams.scm.in Add Vagrant Cascadian to Reproducible Builds team. 2023-01-10teams: Add Reproducible Builds team.Vagrant Cascadian * etc/teams.scm.in (reproduciblebuilds): New team. 2023-01-09news: Add 'de' translation.Florian Pelz * etc/news.scm: Add German translation of entry about linux-libre 4.9 removal. 2023-01-08news: Add entry about the removal of linux-libre 4.9.Leo Famulari * etc/news.scm: Add entry. 2023-01-06maint: Add missing modules to the kernel manifest.Leo Famulari * etc/kernels-manifest.scm: Add missing modules. 2022-12-29maint: Add a manifest for everything related to linux-libre.Leo Famulari * etc/kernels-manifest.scm: New file. * Makefile.am (EXTRA_DIST): Add it. 2022-12-28teams: Allow a patch-file argument to cc-members.Maxim Cournoyer * etc/teams.scm.in (git-patch->revisions): New procedure. (main) [cc-members]: New match pattern to support patch file argument. [get-maintainer]: Simplify using the newly introduced procedure from above. (main): Update usage doc. Series-changes: 2 - New: support passing a patch file to the cc-members command 2022-12-28teams: Add a "get-maintainer" command.Maxim Cournoyer This can be used as a compatibility mode with the get_maintainer.pl Perl script included in the Linux (or U-Boot) source tree. * etc/teams.scm.in (git-patch->commit-id): New procedure. (main) <get-maintainer>: Register new command. Document it. Series-changes: 2 - Move newline character (~%) in usage output to the bottom 2022-12-27snippets: Remove unwanted git-commit-mode invocation.Andrew Tropin We only need to check if git-commit-mode is t, not enable it in all text-mode buffers. * etc/snippets/tempel/text-mode: Remove unwanted git-commit-mode invocation. 2022-12-26teams: Add 宋文武.宋文武 * etc/team.scm.in: Add 宋文武. Signed-off-by: Ludovic Courtès <ludo@gnu.org> 2022-12-26teams: Add localization.宋文武 * etc/teams.scm.in (localization): New team. Signed-off-by: Ludovic Courtès <ludo@gnu.org> 2022-12-23etc: SELinux: Allow init process to setattr on profile directories.Ricardo Wurmus * etc/guix-daemon.cil.in: Add rule. 2022-12-23etc: SELinux: Allow daemon to search run state directories.Ricardo Wurmus * etc/guix-daemon.cil.in: Import types init_var_run_t and system_dbusd_var_run_t; add rules. 2022-12-23etc: SELinux: Label guix-daemon executable in profile.Ricardo Wurmus * etc/guix-daemon.cil.in: Add file rule for "guix-daemon" in current-guix profile.