aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-6.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
blob: 0dbabd9e93d1daeda796de8617b7ad87de355d7e (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
From 67123a306880af997a99ae514677c2da4973bd1a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 09:17:25 +0400
Subject: [PATCH 17/46] Use the defaults.h in ${B} instead of ${S}, and t-oe in
 ${B}

Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that
the source can be shared between gcc-cross-initial,
gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.

Signed-off-by: Khem Raj <raj.khem@gmail.com>

Upstream-Status: Pending

While compiling gcc-crosssdk-initial-x86_64 on some host, there is
occasionally failure that test the existance of default.h doesn't
work, the reason is tm_include_list='** defaults.h' rather than
tm_include_list='** ./defaults.h'

So we add the test condition for this situation.
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 gcc/Makefile.in  | 2 +-
 gcc/configure    | 4 ++--
 gcc/configure.ac | 4 ++--
 gcc/mkconfig.sh  | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 6c5adc0..9a1d466 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -517,7 +517,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
 TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
 
 xmake_file=@xmake_file@
-tmake_file=@tmake_file@
+tmake_file=@tmake_file@ ./t-oe
 TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
 TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
 TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
diff --git a/gcc/configure b/gcc/configure
index 5e72f17..389b6d5 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -12130,8 +12130,8 @@ for f in $tm_file; do
        tm_include_list="${tm_include_list} $f"
        ;;
     defaults.h )
-       tm_file_list="${tm_file_list} \$(srcdir)/$f"
-       tm_include_list="${tm_include_list} $f"
+       tm_file_list="${tm_file_list} ./$f"
+       tm_include_list="${tm_include_list} ./$f"
        ;;
     * )
        tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
diff --git a/gcc/configure.ac b/gcc/configure.ac
index dd8f6fa..91ac800 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1883,8 +1883,8 @@ for f in $tm_file; do
        tm_include_list="${tm_include_list} $f"
        ;;
     defaults.h )
-       tm_file_list="${tm_file_list} \$(srcdir)/$f"
-       tm_include_list="${tm_include_list} $f"
+       tm_file_list="${tm_file_list} ./$f"
+       tm_include_list="${tm_include_list} ./$f"
        ;;
     * )
        tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
index 67dfac6..b73e08d 100644
--- a/gcc/mkconfig.sh
+++ b/gcc/mkconfig.sh
@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
     if [ $# -ge 1 ]; then
 	echo '#ifdef IN_GCC' >> ${output}T
 	for file in "$@"; do
-	    if test x"$file" = x"defaults.h"; then
+	    if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then
 		postpone_defaults_h="yes"
 	    else
 		echo "# include \"$file\"" >> ${output}T
@@ -109,7 +109,7 @@ esac
 
 # If we postponed including defaults.h, add the #include now.
 if test x"$postpone_defaults_h" = x"yes"; then
-    echo "# include \"defaults.h\"" >> ${output}T
+    echo "# include \"./defaults.h\"" >> ${output}T
 fi
 
 # Add multiple inclusion protection guard, part two.
-- 
2.8.2