aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/gcc-cross-gxx-include-dir.patch
blob: d6c4ffddc43451f466bde915df3f99a569462c53 (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
66
67
68
69
70
71
72
73
This patch reverts upstream commit b4d3485e4fc1d:

  https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b4d3485e4fc1d029e620a59deb54b3f4f3f6b209

Otherwise, GCC ends up searching the wrong target directory for cross-headers.

diff --git a/gcc/configure b/gcc/configure
--- a/gcc/configure
+++ b/gcc/configure
@@ -3689,11 +3689,6 @@ esac
 fi
 
 
-# If both --with-sysroot and --with-gxx-include-dir are passed, we interpolate
-# the former in the latter and, upon success, compute gcc_gxx_include_dir as
-# relative to the sysroot.
-gcc_gxx_include_dir_add_sysroot=0
-
 # This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
 if test x${gcc_gxx_include_dir} = x; then
   if test x${enable_version_specific_runtime_libs} = xyes; then
@@ -3705,10 +3700,15 @@ if test x${gcc_gxx_include_dir} = x; then
     fi
     gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir"
   fi
-elif test "${with_sysroot+set}" = set; then
+fi
+
+gcc_gxx_include_dir_add_sysroot=0
+if test "${with_sysroot+set}" = set; then
   gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
   if test "${gcc_gxx_without_sysroot}"; then
-    gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
+    if test x${with_sysroot} != x/; then
+      gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
+    fi
     gcc_gxx_include_dir_add_sysroot=1
   fi
 fi
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 715fcba0482..88136e232df 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -204,11 +204,6 @@ no)	;;
 *)	gcc_gxx_include_dir=$with_gxx_include_dir ;;
 esac])
 
-# If both --with-sysroot and --with-gxx-include-dir are passed, we interpolate
-# the former in the latter and, upon success, compute gcc_gxx_include_dir as
-# relative to the sysroot.
-gcc_gxx_include_dir_add_sysroot=0
-
 # This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
 if test x${gcc_gxx_include_dir} = x; then
   if test x${enable_version_specific_runtime_libs} = xyes; then
@@ -220,10 +215,15 @@ if test x${gcc_gxx_include_dir} = x; then
     fi
     gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir"
   fi
-elif test "${with_sysroot+set}" = set; then
+fi
+
+gcc_gxx_include_dir_add_sysroot=0
+if test "${with_sysroot+set}" = set; then
   gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
   if test "${gcc_gxx_without_sysroot}"; then
-    gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
+    if test x${with_sysroot} != x/; then
+      gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
+    fi
     gcc_gxx_include_dir_add_sysroot=1
   fi
 fi
ocaml-pyml): New variable. Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com> Signed-off-by: Ludovic Courtès <ludo@gnu.org> Jean-Pierre De Jesus DIAZ 2023-06-02gnu: Add ocaml-stdcompat....* gnu/packages/ocaml.scm (ocaml-stdcompat): New variable. Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com> Signed-off-by: Ludovic Courtès <ludo@gnu.org> Jean-Pierre De Jesus DIAZ 2023-06-02gnu: Add ocaml-parmap....* gnu/packages/ocaml.scm (ocaml-parmap): New variable. Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com> Signed-off-by: Ludovic Courtès <ludo@gnu.org> Jean-Pierre De Jesus DIAZ 2023-04-25gnu: ocaml-lwt: Add ocaml4.07 variant....* gnu/packages/ocaml.scm (ocaml-lwt)[properties]: New field. (ocaml4.07-lwt): New variable. Efraim Flashner 2023-04-14Merge branch 'master' into core-updates....Conflicts: gnu/local.mk gnu/packages/build-tools.scm gnu/packages/certs.scm gnu/packages/check.scm gnu/packages/compression.scm gnu/packages/cups.scm gnu/packages/fontutils.scm gnu/packages/gnuzilla.scm gnu/packages/guile.scm gnu/packages/ibus.scm gnu/packages/image-processing.scm gnu/packages/linux.scm gnu/packages/music.scm gnu/packages/nss.scm gnu/packages/pdf.scm gnu/packages/python-xyz.scm gnu/packages/qt.scm gnu/packages/ruby.scm gnu/packages/shells.scm gnu/packages/tex.scm gnu/packages/video.scm gnu/packages/vulkan.scm gnu/packages/web.scm gnu/packages/webkit.scm gnu/packages/wm.scm Maxim Cournoyer 2023-04-12gnu: ocaml-mdx: Fix tests....* gnu/packages/ocaml.scm (ocaml-mdx)[arguments]: Substitue obsolete 'egrep' by 'grep -E'. Signed-off-by: Julien Lepiller <julien@lepiller.eu> Simon Tournier 2023-04-12gnu: ocaml-ppxlib: Fix tests....* gnu/packages/ocaml.scm (ocaml-ppxlib)[arguments]: Substitue obsolete 'egrep' by 'grep -E'. Signed-off-by: Julien Lepiller <julien@lepiller.eu> Simon Tournier 2023-03-27gnu: hevea: Update to 2.36....* gnu/packages/ocaml.scm (hevea): Update to 2.36. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Philippe SWARTVAGHER 2023-03-20Merge remote-tracking branch 'origin/master' into core-updatesAndreas Enge