Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 1 | From 88e728dad53d48c4a19f15e19f66fd23f4820b4a Mon Sep 17 00:00:00 2001 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Fri, 29 Mar 2013 09:17:25 +0400 |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 4 | Subject: [PATCH 07/36] Use the defaults.h in ${B} instead of ${S}, and t-oe in |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 5 | ${B} |
| 6 | |
| 7 | Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that |
| 8 | the source can be shared between gcc-cross-initial, |
| 9 | gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. |
| 10 | |
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 12 | |
| 13 | Upstream-Status: Pending |
| 14 | |
| 15 | While compiling gcc-crosssdk-initial-x86_64 on some host, there is |
| 16 | occasionally failure that test the existance of default.h doesn't |
| 17 | work, the reason is tm_include_list='** defaults.h' rather than |
| 18 | tm_include_list='** ./defaults.h' |
| 19 | |
| 20 | So we add the test condition for this situation. |
| 21 | Signed-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 | |
| 29 | diff --git a/gcc/Makefile.in b/gcc/Makefile.in |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 30 | index 5f43d9de00e..41f0f592ff4 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 31 | --- a/gcc/Makefile.in |
| 32 | +++ b/gcc/Makefile.in |
| 33 | @@ -540,7 +540,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@ |
| 42 | diff --git a/gcc/configure b/gcc/configure |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 43 | index a6ea3a8a84c..e3bcf8abe9a 100755 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 44 | --- a/gcc/configure |
| 45 | +++ b/gcc/configure |
| 46 | @@ -12341,8 +12341,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" |
| 57 | diff --git a/gcc/configure.ac b/gcc/configure.ac |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 58 | index d42bbd4fd1c..2ebc377a74d 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 59 | --- a/gcc/configure.ac |
| 60 | +++ b/gcc/configure.ac |
| 61 | @@ -1968,8 +1968,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" |
| 72 | diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh |
| 73 | index 308b87d0cc1..19068cbc24a 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 | -- |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 95 | 2.22.1 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 96 | |