Upload Tizen:Base source
[external/binutils.git] / debian / patches / xx_force_non-native.patch
1 diff --git a/bfd/acinclude.m4 b/bfd/acinclude.m4
2 index d9813bd..5ecaebf 100644
3 --- a/bfd/acinclude.m4
4 +++ b/bfd/acinclude.m4
5 @@ -61,7 +61,8 @@ AC_DEFUN([AM_INSTALL_LIBBFD],
6    # libbfd.a is a host library containing target dependent code
7    bfdlibdir='$(libdir)'
8    bfdincludedir='$(includedir)'
9 -  if test "${host}" != "${target}"; then
10 +### Force non-native build
11 +  if test "${host}" != "${target}" || true; then
12      bfdlibdir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/lib'
13      bfdincludedir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/include'
14    fi
15 diff --git a/bfd/configure b/bfd/configure
16 index d587593..d95999c 100755
17 --- a/bfd/configure
18 +++ b/bfd/configure
19 @@ -12298,7 +12298,8 @@ fi
20    # libbfd.a is a host library containing target dependent code
21    bfdlibdir='$(libdir)'
22    bfdincludedir='$(includedir)'
23 -  if test "${host}" != "${target}"; then
24 +### Force non-native build
25 +  if test "${host}" != "${target}" || true; then
26      bfdlibdir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/lib'
27      bfdincludedir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/include'
28    fi
29 @@ -13821,7 +13822,8 @@ COREFILE=
30  COREFLAG=
31  CORE_HEADER=
32  TRAD_HEADER=
33 -if test "${target}" = "${host}"; then
34 +### Force non-native build
35 +if test "${target}" = "${host}" && false; then
36    case "${host}" in
37    alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-*vms*)
38         COREFILE=''
39 diff --git a/bfd/configure.in b/bfd/configure.in
40 index eaba44c..3b468dc 100644
41 --- a/bfd/configure.in
42 +++ b/bfd/configure.in
43 @@ -221,7 +221,8 @@ COREFILE=
44  COREFLAG=
45  CORE_HEADER=
46  TRAD_HEADER=
47 -if test "${target}" = "${host}"; then
48 +### Force non-native build
49 +if test "${target}" = "${host}" && false; then
50    case "${host}" in
51    alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-*vms*)
52         COREFILE=''
53 diff --git a/configure b/configure
54 index 8a146e2..a0c12a1 100755
55 --- a/configure
56 +++ b/configure
57 @@ -2274,7 +2274,8 @@ esac
58  
59  
60  
61 -test "$host_noncanonical" = "$target_noncanonical" &&
62 +### Force non-native build
63 +test "$host_noncanonical" = "$target_noncanonical" && false &&
64    test "$program_prefix$program_suffix$program_transform_name" = \
65      NONENONEs,x,x, &&
66    program_transform_name=s,y,y,
67 @@ -2714,7 +2715,8 @@ appdirs=""
68  
69  # Define is_cross_compiler to save on calls to 'test'.
70  is_cross_compiler=
71 -if test x"${host}" = x"${target}" ; then
72 +### Force non-native build
73 +if test x"${host}" = x"${target}" && false; then
74    is_cross_compiler=no
75  else
76    is_cross_compiler=yes
77 diff --git a/configure.ac b/configure.ac
78 index 68208dc..72ac0e7 100644
79 --- a/configure.ac
80 +++ b/configure.ac
81 @@ -71,7 +71,8 @@ dnl Autoconf 2.5x and later will set a default program prefix if
82  dnl --target was used, even if it was the same as --host.  Disable
83  dnl that behavior.  This must be done before AC_CANONICAL_SYSTEM
84  dnl to take effect.
85 -test "$host_noncanonical" = "$target_noncanonical" &&
86 +### Force non-native build
87 +test "$host_noncanonical" = "$target_noncanonical" && false &&
88    test "$program_prefix$program_suffix$program_transform_name" = \
89      NONENONEs,x,x, &&
90    program_transform_name=s,y,y,
91 @@ -205,7 +206,8 @@ appdirs=""
92  
93  # Define is_cross_compiler to save on calls to 'test'.
94  is_cross_compiler=
95 -if test x"${host}" = x"${target}" ; then
96 +### Force non-native build
97 +if test x"${host}" = x"${target}" && false; then
98    is_cross_compiler=no
99  else
100    is_cross_compiler=yes
101 diff --git a/gas/configure b/gas/configure
102 index 52bc0cd..b4d185a 100755
103 --- a/gas/configure
104 +++ b/gas/configure
105 @@ -13176,9 +13176,10 @@ done
106  
107  # Put this here so that autoconf's "cross-compiling" message doesn't confuse
108  # people who are not cross-compiling but are compiling cross-assemblers.
109 +### Force non-native build
110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling a cross-assembler" >&5
111  $as_echo_n "checking whether compiling a cross-assembler... " >&6; }
112 -if test "${host}" = "${target}"; then
113 +if test "${host}" = "${target}" && false; then
114    cross_gas=no
115  else
116    cross_gas=yes
117 diff --git a/gas/configure.in b/gas/configure.in
118 index 69f5fcb..0cbe58f 100644
119 --- a/gas/configure.in
120 +++ b/gas/configure.in
121 @@ -630,8 +630,9 @@ AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h errno.h sys/types
122  
123  # Put this here so that autoconf's "cross-compiling" message doesn't confuse
124  # people who are not cross-compiling but are compiling cross-assemblers.
125 +### Force non-native build
126  AC_MSG_CHECKING(whether compiling a cross-assembler)
127 -if test "${host}" = "${target}"; then
128 +if test "${host}" = "${target}" && false; then
129    cross_gas=no
130  else
131    cross_gas=yes
132 diff --git a/gold/configure b/gold/configure
133 index 5a7268d..8697d5e 100755
134 --- a/gold/configure
135 +++ b/gold/configure
136 @@ -6080,7 +6080,8 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
137  
138  
139  
140 - if test "x$target_alias" = "x" -o "x$host_alias" = "x$target_alias"; then
141 +### Force non-native build
142 + if test "x$target_alias" = "x" -o "x$host_alias" = "x$target_alias" -a false; then
143    NATIVE_LINKER_TRUE=
144    NATIVE_LINKER_FALSE='#'
145  else
146 diff --git a/gold/configure.ac b/gold/configure.ac
147 index 7757d8c..16a2536 100644
148 --- a/gold/configure.ac
149 +++ b/gold/configure.ac
150 @@ -254,8 +254,9 @@ AC_C_BIGENDIAN
151  
152  AC_EXEEXT
153  
154 +### Force non-native build
155  AM_CONDITIONAL(NATIVE_LINKER,
156 -  test "x$target_alias" = "x" -o "x$host_alias" = "x$target_alias")
157 +  test "x$target_alias" = "x" -o "x$host_alias" = "x$target_alias" -a false)
158  AM_CONDITIONAL(GCC, test "$GCC" = yes)
159  
160  AM_CONDITIONAL(NATIVE_OR_CROSS_LINKER,
161 diff --git a/ld/emulparams/elf32bmipn32-defs.sh b/ld/emulparams/elf32bmipn32-defs.sh
162 index 45bfd5d..b8fc9e4 100644
163 --- a/ld/emulparams/elf32bmipn32-defs.sh
164 +++ b/ld/emulparams/elf32bmipn32-defs.sh
165 @@ -19,7 +19,8 @@ elf64*) ELFSIZE=64 ;;
166  *) echo $0: unhandled emulation $EMULATION_NAME >&2; exit 1 ;;
167  esac
168  
169 -if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then
170 +### Force non-native build
171 +if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//` && false; then
172    case " $EMULATION_LIBPATH " in
173      *" ${EMULATION_NAME} "*)
174        NATIVE=yes
175 diff --git a/ld/emulparams/elf32ppccommon.sh b/ld/emulparams/elf32ppccommon.sh
176 index 15cb3b1..9eef176 100644
177 --- a/ld/emulparams/elf32ppccommon.sh
178 +++ b/ld/emulparams/elf32ppccommon.sh
179 @@ -36,7 +36,8 @@ OTHER_GOT_RELOC_SECTIONS="
180  
181  # Treat a host that matches the target with the possible exception of "64"
182  # in the name as if it were native.
183 -if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then
184 +### Force non-native build
185 +if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//` && false; then
186    case " $EMULATION_LIBPATH " in
187      *" ${EMULATION_NAME} "*)
188        NATIVE=yes
189 diff --git a/ld/emulparams/elf64ppc.sh b/ld/emulparams/elf64ppc.sh
190 index c9337ea..4b7b54f 100644
191 --- a/ld/emulparams/elf64ppc.sh
192 +++ b/ld/emulparams/elf64ppc.sh
193 @@ -41,7 +41,8 @@ OTHER_READWRITE_SECTIONS="
194  
195  # Treat a host that matches the target with the possible exception of "64"
196  # in the name as if it were native.
197 -if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then
198 +### Force non-native build
199 +if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//` && false; then
200    case " $EMULATION_LIBPATH " in
201      *" ${EMULATION_NAME} "*)
202        NATIVE=yes
203 diff --git a/ld/emulparams/elf_l1om.sh b/ld/emulparams/elf_l1om.sh
204 index 1af2360..6f0c04c 100644
205 --- a/ld/emulparams/elf_l1om.sh
206 +++ b/ld/emulparams/elf_l1om.sh
207 @@ -16,7 +16,8 @@ NO_SMALL_DATA=yes
208  LARGE_SECTIONS=yes
209  SEPARATE_GOTPLT=24
210  
211 -if [ "x${host}" = "x${target}" ]; then
212 +### Force non-native build
213 +if [ "x${host}" = "x${target}" ] && false; then
214    case " $EMULATION_LIBPATH " in
215      *" ${EMULATION_NAME} "*)
216        NATIVE=yes
217 diff --git a/ld/emulparams/elf_x86_64.sh b/ld/emulparams/elf_x86_64.sh
218 index 0e93ad8..e114f2f 100644
219 --- a/ld/emulparams/elf_x86_64.sh
220 +++ b/ld/emulparams/elf_x86_64.sh
221 @@ -16,7 +16,8 @@ LARGE_SECTIONS=yes
222  SEPARATE_GOTPLT=24
223  IREL_IN_PLT=
224  
225 -if [ "x${host}" = "x${target}" ]; then
226 +### Force non-native build
227 +if [ "x${host}" = "x${target}" ] && false; then
228    case " $EMULATION_LIBPATH " in
229      *" ${EMULATION_NAME} "*)
230        NATIVE=yes
231 diff --git a/ld/emultempl/sunos.em b/ld/emultempl/sunos.em
232 index 567b8e2..4e3a46f 100644
233 --- a/ld/emultempl/sunos.em
234 +++ b/ld/emultempl/sunos.em
235 @@ -98,7 +98,8 @@ static void
236  gld${EMULATION_NAME}_set_symbols (void)
237  {
238  EOF
239 -if [ "x${host}" = "x${target}" ] ; then
240 +### Force non-native build
241 +if [ "x${host}" = "x${target}" ] && false; then
242    case " ${EMULATION_LIBPATH} " in
243    *" ${EMULATION_NAME} "*)
244  fragment <<EOF
245 @@ -463,7 +464,8 @@ gld${EMULATION_NAME}_after_open (void)
246             continue;
247         }
248  EOF
249 -if [ "x${host}" = "x${target}" ] ; then
250 +### Force non-native build
251 +if [ "x${host}" = "x${target}" ] && false ; then
252    case " ${EMULATION_LIBPATH} " in
253    *" ${EMULATION_NAME} "*)
254  fragment <<EOF
255 diff --git a/ld/genscripts.sh b/ld/genscripts.sh
256 index 61981bd..4f49168 100755
257 --- a/ld/genscripts.sh
258 +++ b/ld/genscripts.sh
259 @@ -122,9 +122,10 @@ fi
260  # may already have been set by the emulparams file, but that's OK
261  # (it'll just get set to "yes" twice).
262  
263 +### Force non-native build
264  case " $EMULATION_LIBPATH " in
265    *" ${EMULATION_NAME} "*)
266 -    if [ "x${host}" = "x${target}" ] ; then
267 +    if [ "x${host}" = "x${target}" ] && false; then
268        NATIVE=yes
269        USE_LIBPATH=yes
270      elif [ "x${use_sysroot}" = "xyes" ] ; then
271 diff --git a/opcodes/configure b/opcodes/configure
272 index 83ac9ae..e353992 100755
273 --- a/opcodes/configure
274 +++ b/opcodes/configure
275 @@ -11638,7 +11638,8 @@ fi
276    # libbfd.a is a host library containing target dependent code
277    bfdlibdir='$(libdir)'
278    bfdincludedir='$(includedir)'
279 -  if test "${host}" != "${target}"; then
280 +### Force non-native build
281 +  if test "${host}" != "${target}" || true; then
282      bfdlibdir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/lib'
283      bfdincludedir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/include'
284    fi