blob: fddfe9e5e860601c8764c9c657c3290c9ba0ab16 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001From f7d49ca445e60faa1b5256c6b4f96c1ee5c0e353 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 29 Mar 2013 09:17:25 +0400
4Subject: [PATCH 23/35] Use the defaults.h in ${B} instead of ${S}, and t-oe
5 in ${B}
6
7Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that
8the source can be shared between gcc-cross-initial,
9gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12
13Upstream-Status: Pending
14
15While compiling gcc-crosssdk-initial-x86_64 on some host, there is
16occasionally failure that test the existance of default.h doesn't
17work, the reason is tm_include_list='** defaults.h' rather than
18tm_include_list='** ./defaults.h'
19
20So we add the test condition for this situation.
21Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
22---
23 gcc/Makefile.in | 2 +-
24 gcc/configure | 4 ++--
25 gcc/configure.ac | 4 ++--
26 gcc/mkconfig.sh | 4 ++--
27 4 files changed, 7 insertions(+), 7 deletions(-)
28
29diff --git a/gcc/Makefile.in b/gcc/Makefile.in
30index d1ab22f..15fe4b6 100644
31--- a/gcc/Makefile.in
32+++ b/gcc/Makefile.in
33@@ -483,7 +483,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
34 TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
35
36 xmake_file=@xmake_file@
37-tmake_file=@tmake_file@
38+tmake_file=@tmake_file@ ./t-oe
39 TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
40 TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
41 TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
42diff --git a/gcc/configure b/gcc/configure
43index 5399b2b..60a04bd 100755
44--- a/gcc/configure
45+++ b/gcc/configure
46@@ -11631,8 +11631,8 @@ for f in $tm_file; do
47 tm_include_list="${tm_include_list} $f"
48 ;;
49 defaults.h )
50- tm_file_list="${tm_file_list} \$(srcdir)/$f"
51- tm_include_list="${tm_include_list} $f"
52+ tm_file_list="${tm_file_list} ./$f"
53+ tm_include_list="${tm_include_list} ./$f"
54 ;;
55 * )
56 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
57diff --git a/gcc/configure.ac b/gcc/configure.ac
58index f87c3b6..460e0d9 100644
59--- a/gcc/configure.ac
60+++ b/gcc/configure.ac
61@@ -1740,8 +1740,8 @@ for f in $tm_file; do
62 tm_include_list="${tm_include_list} $f"
63 ;;
64 defaults.h )
65- tm_file_list="${tm_file_list} \$(srcdir)/$f"
66- tm_include_list="${tm_include_list} $f"
67+ tm_file_list="${tm_file_list} ./$f"
68+ tm_include_list="${tm_include_list} ./$f"
69 ;;
70 * )
71 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
72diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
73index c7146ed..b153f45 100644
74--- a/gcc/mkconfig.sh
75+++ b/gcc/mkconfig.sh
76@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
77 if [ $# -ge 1 ]; then
78 echo '#ifdef IN_GCC' >> ${output}T
79 for file in "$@"; do
80- if test x"$file" = x"defaults.h"; then
81+ if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then
82 postpone_defaults_h="yes"
83 else
84 echo "# include \"$file\"" >> ${output}T
85@@ -106,7 +106,7 @@ esac
86
87 # If we postponed including defaults.h, add the #include now.
88 if test x"$postpone_defaults_h" = x"yes"; then
89- echo "# include \"defaults.h\"" >> ${output}T
90+ echo "# include \"./defaults.h\"" >> ${output}T
91 fi
92
93 # Add multiple inclusion protection guard, part two.
94--
951.9.1
96