| Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 1 | From 6b363c2c1c089ee900efa6013aefba1003840a37 Mon Sep 17 00:00:00 2001 | 
| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 2 | From: Khem Raj <raj.khem@gmail.com> | 
|  | 3 | Date: Fri, 29 Mar 2013 09:33:04 +0400 | 
| Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 4 | Subject: [PATCH] Use the multilib config files from ${B} instead of using the | 
|  | 5 | ones from ${S} | 
| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 6 |  | 
|  | 7 | Use the multilib config files from ${B} instead of using the ones from ${S} | 
|  | 8 | so that 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 | Signed-off-by: Constantin Musca <constantinx.musca@intel.com> | 
|  | 13 |  | 
|  | 14 | Upstream-Status: Inappropriate [configuration] | 
|  | 15 | --- | 
|  | 16 | gcc/configure    | 22 ++++++++++++++++++---- | 
|  | 17 | gcc/configure.ac | 22 ++++++++++++++++++---- | 
|  | 18 | 2 files changed, 36 insertions(+), 8 deletions(-) | 
|  | 19 |  | 
|  | 20 | diff --git a/gcc/configure b/gcc/configure | 
| Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 21 | index 6080f86145e..825a9652329 100755 | 
| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 22 | --- a/gcc/configure | 
|  | 23 | +++ b/gcc/configure | 
| Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 24 | @@ -12685,10 +12685,20 @@ done | 
| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 25 | tmake_file_= | 
|  | 26 | for f in ${tmake_file} | 
|  | 27 | do | 
|  | 28 | -	if test -f ${srcdir}/config/$f | 
|  | 29 | -	then | 
|  | 30 | -		tmake_file_="${tmake_file_} \$(srcdir)/config/$f" | 
|  | 31 | -	fi | 
|  | 32 | +  case $f in | 
|  | 33 | +    */t-linux64 ) | 
|  | 34 | +       if test -f ./config/$f | 
|  | 35 | +       then | 
|  | 36 | +         tmake_file_="${tmake_file_} ./config/$f" | 
|  | 37 | +       fi | 
|  | 38 | +       ;; | 
|  | 39 | +    * ) | 
|  | 40 | +       if test -f ${srcdir}/config/$f | 
|  | 41 | +       then | 
|  | 42 | +         tmake_file_="${tmake_file_} \$(srcdir)/config/$f" | 
|  | 43 | +       fi | 
|  | 44 | +       ;; | 
|  | 45 | +  esac | 
|  | 46 | done | 
| Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 47 | tmake_file="${tmake_file_}${omp_device_property_tmake_file}" | 
| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 48 |  | 
| Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 49 | @@ -12699,6 +12709,10 @@ tm_file_list="options.h" | 
| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 50 | tm_include_list="options.h insn-constants.h" | 
|  | 51 | for f in $tm_file; do | 
|  | 52 | case $f in | 
|  | 53 | +    */linux64.h ) | 
|  | 54 | +       tm_file_list="${tm_file_list} ./config/$f" | 
|  | 55 | +       tm_include_list="${tm_include_list} ./config/$f" | 
|  | 56 | +       ;; | 
|  | 57 | ./* ) | 
|  | 58 | f=`echo $f | sed 's/^..//'` | 
|  | 59 | tm_file_list="${tm_file_list} $f" | 
|  | 60 | diff --git a/gcc/configure.ac b/gcc/configure.ac | 
| Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 61 | index 42be5252778..6099eb3251f 100644 | 
| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 62 | --- a/gcc/configure.ac | 
|  | 63 | +++ b/gcc/configure.ac | 
| Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 64 | @@ -2118,10 +2118,20 @@ done | 
| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 65 | tmake_file_= | 
|  | 66 | for f in ${tmake_file} | 
|  | 67 | do | 
|  | 68 | -	if test -f ${srcdir}/config/$f | 
|  | 69 | -	then | 
|  | 70 | -		tmake_file_="${tmake_file_} \$(srcdir)/config/$f" | 
|  | 71 | -	fi | 
|  | 72 | +  case $f in | 
|  | 73 | +    */t-linux64 ) | 
|  | 74 | +       if test -f ./config/$f | 
|  | 75 | +       then | 
|  | 76 | +         tmake_file_="${tmake_file_} ./config/$f" | 
|  | 77 | +       fi | 
|  | 78 | +       ;; | 
|  | 79 | +    * ) | 
|  | 80 | +       if test -f ${srcdir}/config/$f | 
|  | 81 | +       then | 
|  | 82 | +         tmake_file_="${tmake_file_} \$(srcdir)/config/$f" | 
|  | 83 | +       fi | 
|  | 84 | +       ;; | 
|  | 85 | +  esac | 
|  | 86 | done | 
| Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 87 | tmake_file="${tmake_file_}${omp_device_property_tmake_file}" | 
| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 88 |  | 
| Andrew Geissler | c182c62 | 2020-05-15 14:13:32 -0500 | [diff] [blame] | 89 | @@ -2132,6 +2142,10 @@ tm_file_list="options.h" | 
| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 90 | tm_include_list="options.h insn-constants.h" | 
|  | 91 | for f in $tm_file; do | 
|  | 92 | case $f in | 
|  | 93 | +    */linux64.h ) | 
|  | 94 | +       tm_file_list="${tm_file_list} ./config/$f" | 
|  | 95 | +       tm_include_list="${tm_include_list} ./config/$f" | 
|  | 96 | +       ;; | 
|  | 97 | ./* ) | 
|  | 98 | f=`echo $f | sed 's/^..//'` | 
|  | 99 | tm_file_list="${tm_file_list} $f" |