From e8cbb33ee403647f69cc06399ddfcde16728f930 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 18 May 2019 19:40:58 -0400 Subject: patches/01_gcc-make-include-dirs-configurable.patch: New patch --- (limited to 'patches') diff --git a/patches/01_gcc-make-include-dirs-configurable.patch b/patches/01_gcc-make-include-dirs-configurable.patch new file mode 100644 index 0000000..ea8aec3 --- /dev/null +++ b/patches/01_gcc-make-include-dirs-configurable.patch @@ -0,0 +1,71 @@ +Author: Patrick McDermott +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)" \ -- cgit v0.9.1