0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch 3.2 KB

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