cornucopia: bump SRCREV
[openembedded.git] / recipes / binutils / binutils-2.20.1 / libtool-update.patch
blob00237475561cbf8294350e108776dcc032af1964
1 Index: binutils-2.20.1/libtool.m4
2 ===================================================================
3 --- binutils-2.20.1.orig/libtool.m4
4 +++ binutils-2.20.1/libtool.m4
5 @@ -89,7 +89,8 @@ _LT_SET_OPTIONS([$0], [$1])
6 LIBTOOL_DEPS="$ltmain"
8 # Always use our own libtool.
9 -LIBTOOL='$(SHELL) $(top_builddir)/libtool'
10 +LIBTOOL='$(SHELL) $(top_builddir)'
11 +LIBTOOL="$LIBTOOL/$host_alias-libtool"
12 AC_SUBST(LIBTOOL)dnl
14 _LT_SETUP
15 @@ -211,7 +212,7 @@ delay_single_quote_subst='s/'\''/'\'\\\\
16 no_glob_subst='s/\*/\\\*/g'
18 # Global variables:
19 -ofile=libtool
20 +ofile=${host_alias}-libtool
21 can_build_shared=yes
23 # All known linkers require a `.a' archive for static linking (except MSVC,
24 @@ -2445,7 +2446,7 @@ linux*oldld* | linux*aout* | linux*coff*
27 # This must be Linux ELF.
28 -linux* | k*bsd*-gnu | kopensolaris*-gnu)
29 +linux* | k*bsd*-gnu)
30 version_type=linux
31 need_lib_prefix=no
32 need_version=no
33 @@ -2454,21 +2455,16 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
34 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
35 shlibpath_var=LD_LIBRARY_PATH
36 shlibpath_overrides_runpath=no
38 # Some binutils ld are patched to set DT_RUNPATH
39 - AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
40 - [lt_cv_shlibpath_overrides_runpath=no
41 - save_LDFLAGS=$LDFLAGS
42 - save_libdir=$libdir
43 - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
44 - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
45 - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
46 - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
47 - [lt_cv_shlibpath_overrides_runpath=yes])])
48 - LDFLAGS=$save_LDFLAGS
49 - libdir=$save_libdir
50 - ])
51 - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
52 + save_LDFLAGS=$LDFLAGS
53 + save_libdir=$libdir
54 + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
55 + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
56 + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
57 + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
58 + [shlibpath_overrides_runpath=yes])])
59 + LDFLAGS=$save_LDFLAGS
60 + libdir=$save_libdir
62 # This implies no fast_install, which is unacceptable.
63 # Some rework will be needed to allow for fast_install
64 @@ -3077,7 +3073,7 @@ irix5* | irix6* | nonstopux*)
67 # This must be Linux ELF.
68 -linux* | k*bsd*-gnu | kopensolaris*-gnu)
69 +linux* | k*bsd*-gnu)
70 lt_cv_deplibs_check_method=pass_all
73 @@ -3698,7 +3694,7 @@ m4_if([$1], [CXX], [
75 esac
77 - linux* | k*bsd*-gnu | kopensolaris*-gnu)
78 + linux* | k*bsd*-gnu)
79 case $cc_basename in
80 KCC*)
81 # KAI C++ Compiler
82 @@ -3982,7 +3978,7 @@ m4_if([$1], [CXX], [
83 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
86 - linux* | k*bsd*-gnu | kopensolaris*-gnu)
87 + linux* | k*bsd*-gnu)
88 case $cc_basename in
89 # old Intel for x86_64 which still supported -KPIC.
90 ecc*)
91 @@ -4363,7 +4359,7 @@ _LT_EOF
92 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
95 - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
96 + gnu* | linux* | tpf* | k*bsd*-gnu)
97 tmp_diet=no
98 if test "$host_os" = linux-dietlibc; then
99 case $cc_basename in
100 @@ -5116,38 +5112,36 @@ x|xyes)
101 # Test whether the compiler implicitly links with -lc since on some
102 # systems, -lgcc has to come before -lc. If gcc already passes -lc
103 # to ld, don't add -lc before -lgcc.
104 - AC_CACHE_CHECK([whether -lc should be explicitly linked in],
105 - [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
106 - [$RM conftest*
107 - echo "$lt_simple_compile_test_code" > conftest.$ac_ext
109 - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
110 - soname=conftest
111 - lib=conftest
112 - libobjs=conftest.$ac_objext
113 - deplibs=
114 - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
115 - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
116 - compiler_flags=-v
117 - linker_flags=-v
118 - verstring=
119 - output_objdir=.
120 - libname=conftest
121 - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
122 - _LT_TAGVAR(allow_undefined_flag, $1)=
123 - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
124 - then
125 - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
126 - else
127 - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
128 - fi
129 - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
130 - else
131 - cat conftest.err 1>&5
132 - fi
133 - $RM conftest*
134 - ])
135 - _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
136 + AC_MSG_CHECKING([whether -lc should be explicitly linked in])
137 + $RM conftest*
138 + echo "$lt_simple_compile_test_code" > conftest.$ac_ext
140 + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
141 + soname=conftest
142 + lib=conftest
143 + libobjs=conftest.$ac_objext
144 + deplibs=
145 + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
146 + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
147 + compiler_flags=-v
148 + linker_flags=-v
149 + verstring=
150 + output_objdir=.
151 + libname=conftest
152 + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
153 + _LT_TAGVAR(allow_undefined_flag, $1)=
154 + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
155 + then
156 + _LT_TAGVAR(archive_cmds_need_lc, $1)=no
157 + else
158 + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
159 + fi
160 + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
161 + else
162 + cat conftest.err 1>&5
163 + fi
164 + $RM conftest*
165 + AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
167 esac
169 @@ -5848,7 +5842,7 @@ if test "$_lt_caught_CXX_error" != yes;
170 _LT_TAGVAR(inherit_rpath, $1)=yes
173 - linux* | k*bsd*-gnu | kopensolaris*-gnu)
174 + linux* | k*bsd*-gnu)
175 case $cc_basename in
176 KCC*)
177 # Kuck and Associates, Inc. (KAI) C++ Compiler
178 Index: binutils-2.20.1/ltmain.sh
179 ===================================================================
180 --- binutils-2.20.1.orig/ltmain.sh
181 +++ binutils-2.20.1/ltmain.sh
182 @@ -116,15 +116,15 @@ $lt_unset CDPATH
184 : ${CP="cp -f"}
185 : ${ECHO="echo"}
186 -: ${EGREP="/usr/bin/grep -E"}
187 -: ${FGREP="/usr/bin/grep -F"}
188 -: ${GREP="/usr/bin/grep"}
189 +: ${EGREP="/bin/grep -E"}
190 +: ${FGREP="/bin/grep -F"}
191 +: ${GREP="/bin/grep"}
192 : ${LN_S="ln -s"}
193 : ${MAKE="make"}
194 : ${MKDIR="mkdir"}
195 : ${MV="mv -f"}
196 : ${RM="rm -f"}
197 -: ${SED="/opt/local/bin/gsed"}
198 +: ${SED="/bin/sed"}
199 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
200 : ${Xsed="$SED -e 1s/^X//"}
202 @@ -170,151 +170,6 @@ func_dirname_and_basename ()
204 # Generated shell functions inserted here.
206 -# These SED scripts presuppose an absolute path with a trailing slash.
207 -pathcar="s,^/\([^/]*\).*$,\1,"
208 -pathcdr="s,^/[^/]*,,"
209 -removedotparts="s@/\(\./\)\{1,\}@/@g;s,/\.$,/,"
210 -collapseslashes="s@/\{1,\}@/@g"
211 -finalslash="s,/*$,/,"
213 -# func_normal_abspath PATH
214 -# Remove doubled-up and trailing slashes, "." path components,
215 -# and cancel out any ".." path components in PATH after making
216 -# it an absolute path.
217 -# value returned in "$func_normal_abspath_result"
218 -func_normal_abspath ()
220 - # Start from root dir and reassemble the path.
221 - func_normal_abspath_result=
222 - func_normal_abspath_tpath=$1
223 - func_normal_abspath_altnamespace=
224 - case $func_normal_abspath_tpath in
225 - "")
226 - # Empty path, that just means $cwd.
227 - func_stripname '' '/' "`pwd`"
228 - func_normal_abspath_result=$func_stripname_result
229 - return
230 - ;;
231 - # The next three entries are used to spot a run of precisely
232 - # two leading slashes without using negated character classes;
233 - # we take advantage of case's first-match behaviour.
234 - ///*)
235 - # Unusual form of absolute path, do nothing.
236 - ;;
237 - //*)
238 - # Not necessarily an ordinary path; POSIX reserves leading '//'
239 - # and for example Cygwin uses it to access remote file shares
240 - # over CIFS/SMB, so we conserve a leading double slash if found.
241 - func_normal_abspath_altnamespace=/
242 - ;;
243 - /*)
244 - # Absolute path, do nothing.
245 - ;;
246 - *)
247 - # Relative path, prepend $cwd.
248 - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
249 - ;;
250 - esac
251 - # Cancel out all the simple stuff to save iterations. We also want
252 - # the path to end with a slash for ease of parsing, so make sure
253 - # there is one (and only one) here.
254 - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
255 - -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
256 - while :; do
257 - # Processed it all yet?
258 - if test "$func_normal_abspath_tpath" = / ; then
259 - # If we ascended to the root using ".." the result may be empty now.
260 - if test -z "$func_normal_abspath_result" ; then
261 - func_normal_abspath_result=/
262 - fi
263 - break
264 - fi
265 - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
266 - -e "$pathcar"`
267 - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
268 - -e "$pathcdr"`
269 - # Figure out what to do with it
270 - case $func_normal_abspath_tcomponent in
271 - "")
272 - # Trailing empty path component, ignore it.
273 - ;;
274 - ..)
275 - # Parent dir; strip last assembled component from result.
276 - func_dirname "$func_normal_abspath_result"
277 - func_normal_abspath_result=$func_dirname_result
278 - ;;
279 - *)
280 - # Actual path component, append it.
281 - func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
282 - ;;
283 - esac
284 - done
285 - # Restore leading double-slash if one was found on entry.
286 - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
289 -# func_relative_path SRCDIR DSTDIR
290 -# generates a relative path from SRCDIR to DSTDIR, with a trailing
291 -# slash if non-empty, suitable for immediately appending a filename
292 -# without needing to append a separator.
293 -# value returned in "$func_relative_path_result"
294 -func_relative_path ()
296 - func_relative_path_result=
297 - func_normal_abspath "$1"
298 - func_relative_path_tlibdir=$func_normal_abspath_result
299 - func_normal_abspath "$2"
300 - func_relative_path_tbindir=$func_normal_abspath_result
302 - # Ascend the tree starting from libdir
303 - while :; do
304 - # check if we have found a prefix of bindir
305 - case $func_relative_path_tbindir in
306 - $func_relative_path_tlibdir)
307 - # found an exact match
308 - func_relative_path_tcancelled=
309 - break
310 - ;;
311 - $func_relative_path_tlibdir*)
312 - # found a matching prefix
313 - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
314 - func_relative_path_tcancelled=$func_stripname_result
315 - if test -z "$func_relative_path_result"; then
316 - func_relative_path_result=.
317 - fi
318 - break
319 - ;;
320 - *)
321 - func_dirname $func_relative_path_tlibdir
322 - func_relative_path_tlibdir=${func_dirname_result}
323 - if test "x$func_relative_path_tlibdir" = x ; then
324 - # Have to descend all the way to the root!
325 - func_relative_path_result=../$func_relative_path_result
326 - func_relative_path_tcancelled=$func_relative_path_tbindir
327 - break
328 - fi
329 - func_relative_path_result=../$func_relative_path_result
330 - ;;
331 - esac
332 - done
334 - # Now calculate path; take care to avoid doubling-up slashes.
335 - func_stripname '' '/' "$func_relative_path_result"
336 - func_relative_path_result=$func_stripname_result
337 - func_stripname '/' '/' "$func_relative_path_tcancelled"
338 - if test "x$func_stripname_result" != x ; then
339 - func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
340 - fi
342 - # Normalisation. If bindir is libdir, return empty string,
343 - # else relative path ending with a slash; either way, target
344 - # file name can be directly appended.
345 - if test ! -z "$func_relative_path_result"; then
346 - func_stripname './' '' "$func_relative_path_result/"
347 - func_relative_path_result=$func_stripname_result
348 - fi
351 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
352 # is ksh but when the shell is invoked as "sh" and the current value of
353 # the _XPG environment variable is not equal to 1 (one), the special
354 @@ -1703,8 +1558,6 @@ The following components of LINK-COMMAND
356 -all-static do not do any dynamic linking at all
357 -avoid-version do not add a version suffix if possible
358 - -bindir BINDIR specify path to binaries directory (for systems where
359 - libraries must be found in the PATH setting at runtime)
360 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
361 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
362 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
363 @@ -4219,7 +4072,6 @@ func_mode_link ()
364 new_inherited_linker_flags=
366 avoid_version=no
367 - bindir=
368 dlfiles=
369 dlprefiles=
370 dlself=no
371 @@ -4312,11 +4164,6 @@ func_mode_link ()
372 esac
374 case $prev in
375 - bindir)
376 - bindir="$arg"
377 - prev=
378 - continue
379 - ;;
380 dlfiles|dlprefiles)
381 if test "$preload" = no; then
382 # Add the symbol object into the linking commands.
383 @@ -4578,11 +4425,6 @@ func_mode_link ()
384 continue
387 - -bindir)
388 - prev=bindir
389 - continue
390 - ;;
392 -dlopen)
393 prev=dlfiles
394 continue
395 @@ -5570,8 +5412,14 @@ func_mode_link ()
396 absdir="$abs_ladir"
397 libdir="$abs_ladir"
398 else
399 - dir="$libdir"
400 - absdir="$libdir"
401 + # Adding 'libdir' from the .la file to our library search paths
402 + # breaks crosscompilation horribly. We cheat here and don't add
403 + # it, instead adding the path where we found the .la. -CL
404 + dir="$abs_ladir"
405 + absdir="$abs_ladir"
406 + libdir="$abs_ladir"
407 + #dir="$libdir"
408 + #absdir="$libdir"
410 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
411 else
412 @@ -5942,8 +5790,6 @@ func_mode_link ()
413 add="$libdir/$linklib"
415 else
416 - # We cannot seem to hardcode it, guess we'll fake it.
417 - add_dir="-L$libdir"
418 # Try looking first in the location we're being installed to.
419 if test -n "$inst_prefix_dir"; then
420 case $libdir in
421 @@ -6089,7 +5935,17 @@ func_mode_link ()
425 - path="-L$absdir/$objdir"
426 + # OE sets installed=no in staging. We need to look in $objdir and $absdir,
427 + # preferring $objdir. RP 31/04/2008
428 + if test -f "$absdir/$objdir/$depdepl" ; then
429 + depdepl="$absdir/$objdir/$depdepl"
430 + path="-L$absdir/$objdir"
431 + elif test -f "$absdir/$depdepl" ; then
432 + depdepl="$absdir/$depdepl"
433 + path="-L$absdir"
434 + else
435 + path="-L$absdir/$objdir"
436 + fi
438 esac
439 else
440 @@ -8279,27 +8135,9 @@ EOF
442 $RM $output
443 # place dlname in correct position for cygwin
444 - # In fact, it would be nice if we could use this code for all target
445 - # systems that can't hard-code library paths into their executables
446 - # and that have no shared library path variable independent of PATH,
447 - # but it turns out we can't easily determine that from inspecting
448 - # libtool variables, so we have to hard-code the OSs to which it
449 - # applies here; at the moment, that means platforms that use the PE
450 - # object format with DLL files. See the long comment at the top of
451 - # tests/bindir.at for full details.
452 tdlname=$dlname
453 case $host,$output,$installed,$module,$dlname in
454 - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
455 - # If a -bindir argument was supplied, place the dll there.
456 - if test "x$bindir" != x ;
457 - then
458 - func_relative_path "$install_libdir" "$bindir"
459 - tdlname=$func_relative_path_result$dlname
460 - else
461 - # Otherwise fall back on heuristic.
462 - tdlname=../bin/$dlname
463 - fi
464 - ;;
465 + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
466 esac
467 $ECHO > $output "\
468 # $outputname - a libtool library file
469 @@ -8579,3 +8417,4 @@ build_old_libs=`case $build_libtool_libs
470 # sh-indentation:2
471 # End:
472 # vi:sw=2