summaryrefslogtreecommitdiffstats
path: root/patches/01_gcc-make-include-dirs-configurable.patch
blob: ea8aec3479a813bc9ef040bba194d72f5686638d (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
Author: Patrick McDermott <patrick.mcdermott@libiquity.com>
Subject: gcc: Make include dirs configurable

diff -Naurp src.orig/gcc/Makefile.in src/gcc/Makefile.in
--- src.orig/gcc/Makefile.in	2018-03-09 10:24:44.000000000 -0500
+++ src/gcc/Makefile.in	2019-05-18 19:36:16.109846883 -0400
@@ -664,9 +664,17 @@ dollar = @dollar@
 gcc_tooldir = @gcc_tooldir@
 # Since gcc_tooldir does not exist at build-time, use -B$(build_tooldir)/bin/
 build_tooldir = $(exec_prefix)/$(target_noncanonical)
+# Directory in which the compiler finds gcc private includes.
+gcc_gcc_include_dir = $(libsubdir)/include
+# Directory in which the compiler finds fixed includes.
+gcc_fixed_include_dir = $(libsubdir)/include-fixed
 # Directory in which the compiler finds target-independent g++ includes.
 gcc_gxx_include_dir = @gcc_gxx_include_dir@
 gcc_gxx_include_dir_add_sysroot = @gcc_gxx_include_dir_add_sysroot@
+# Directory in which the compiler finds target-dependent g++ includes.
+gcc_gxx_tool_include_dir = $(gcc_gxx_include_dir)/$(target_noncanonical)
+# Directory in which the compiler finds backward and deprecated g++ includes.
+gcc_gxx_backward_include_dir = $(gcc_gxx_include_dir)/backward
 # Directory to search for site-specific includes.
 local_includedir = $(local_prefix)/include
 includedir = $(prefix)/include
@@ -2869,12 +2877,12 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localed
 # Remake cpp.
 
 PREPROCESSOR_DEFINES = \
-  -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-  -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
+  -DGCC_INCLUDE_DIR=\"$(gcc_gcc_include_dir)\" \
+  -DFIXED_INCLUDE_DIR=\"$(gcc_fixed_include_dir)\" \
   -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
   -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
-  -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
-  -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
+  -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_tool_include_dir)\" \
+  -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_backward_include_dir)\" \
   -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
   -DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
   -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
diff -Naurp src.orig/Makefile.def src/Makefile.def
--- src.orig/Makefile.def	2017-11-28 05:35:37.000000000 -0500
+++ src/Makefile.def	2019-05-18 19:36:05.877857765 -0400
@@ -229,6 +229,11 @@ flags_to_pass = { flag= sysconfdir ; };
 flags_to_pass = { flag= tooldir ; };
 flags_to_pass = { flag= build_tooldir ; };
 flags_to_pass = { flag= target_alias ; };
+flags_to_pass = { flag= gcc_gcc_include_dir ; };
+flags_to_pass = { flag= gcc_fixed_include_dir ; };
+flags_to_pass = { flag= gcc_gxx_include_dir ; };
+flags_to_pass = { flag= gcc_gxx_tool_include_dir ; };
+flags_to_pass = { flag= gcc_gxx_backward_include_dir ; };
 
 // Build tools
 flags_to_pass = { flag= AWK ; };
diff -Naurp src.orig/Makefile.in src/Makefile.in
--- src.orig/Makefile.in	2017-11-28 05:35:37.000000000 -0500
+++ src/Makefile.in	2019-05-18 19:36:07.849855667 -0400
@@ -737,6 +737,11 @@ BASE_FLAGS_TO_PASS = \
 	"tooldir=$(tooldir)" \
 	"build_tooldir=$(build_tooldir)" \
 	"target_alias=$(target_alias)" \
+	"gcc_gcc_include_dir=$(gcc_gcc_include_dir)" \
+	"gcc_fixed_include_dir=$(gcc_fixed_include_dir)" \
+	"gcc_gxx_include_dir=$(gcc_gxx_include_dir)" \
+	"gcc_gxx_tool_include_dir=$(gcc_gxx_tool_include_dir)" \
+	"gcc_gxx_backward_include_dir=$(gcc_gxx_backward_include_dir)" \
 	"AWK=$(AWK)" \
 	"BISON=$(BISON)" \
 	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \