summaryrefslogtreecommitdiffstats
path: root/meta/packages/libtool/libtool-2.2.6
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/libtool/libtool-2.2.6')
-rw-r--r--meta/packages/libtool/libtool-2.2.6/add_dolt.patch12
-rw-r--r--meta/packages/libtool/libtool-2.2.6/cross_compile.patch55
-rw-r--r--meta/packages/libtool/libtool-2.2.6/dolt.m4129
-rw-r--r--meta/packages/libtool/libtool-2.2.6/prefix.patch103
4 files changed, 299 insertions, 0 deletions
diff --git a/meta/packages/libtool/libtool-2.2.6/add_dolt.patch b/meta/packages/libtool/libtool-2.2.6/add_dolt.patch
new file mode 100644
index 0000000000..2c5df96031
--- /dev/null
+++ b/meta/packages/libtool/libtool-2.2.6/add_dolt.patch
@@ -0,0 +1,12 @@
1Index: libtool-2.2.2/libltdl/m4/libtool.m4
2===================================================================
3--- libtool-2.2.2.orig/libltdl/m4/libtool.m4 2008-04-13 22:40:30.000000000 +0100
4+++ libtool-2.2.2/libltdl/m4/libtool.m4 2008-04-13 23:38:45.000000000 +0100
5@@ -97,6 +97,7 @@
6
7 # Only expand once:
8 m4_define([LT_INIT])
9+DOLT
10 ])# LT_INIT
11
12 # Old names:
diff --git a/meta/packages/libtool/libtool-2.2.6/cross_compile.patch b/meta/packages/libtool/libtool-2.2.6/cross_compile.patch
new file mode 100644
index 0000000000..b4bacbd12f
--- /dev/null
+++ b/meta/packages/libtool/libtool-2.2.6/cross_compile.patch
@@ -0,0 +1,55 @@
1Tweaks to make cross-compiling work combined and updated from various
2older patches, some by Chris Larson.
3Not upstreable in this form.
4
5RP - 01/05/2008
6
7Index: libtool-2.2.2/libltdl/config/ltmain.m4sh
8===================================================================
9--- libtool-2.2.2.orig/libltdl/config/ltmain.m4sh 2008-05-01 21:48:42.000000000 +0100
10+++ libtool-2.2.2/libltdl/config/ltmain.m4sh 2008-05-01 21:51:41.000000000 +0100
11@@ -4454,8 +4454,14 @@
12 absdir="$abs_ladir"
13 libdir="$abs_ladir"
14 else
15- dir="$libdir"
16- absdir="$libdir"
17+ # Adding 'libdir' from the .la file to our library search paths
18+ # breaks crosscompilation horribly. We cheat here and don't add
19+ # it, instead adding the path where we found the .la. -CL
20+ dir="$abs_ladir"
21+ absdir="$abs_ladir"
22+ libdir="$abs_ladir"
23+ #dir="$libdir"
24+ #absdir="$libdir"
25 fi
26 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
27 else
28@@ -4825,8 +4831,6 @@
29 add="$libdir/$linklib"
30 fi
31 else
32- # We cannot seem to hardcode it, guess we'll fake it.
33- add_dir="-L$libdir"
34 # Try looking first in the location we're being installed to.
35 if test -n "$inst_prefix_dir"; then
36 case $libdir in
37@@ -4972,7 +4976,17 @@
38 fi
39 ;;
40 *)
41- path="-L$absdir/$objdir"
42+ # OE sets installed=no in staging. We need to look in $objdir and $absdir,
43+ # preferring $objdir. RP 31/04/2008
44+ if test -f "$absdir/$objdir/$depdepl" ; then
45+ depdepl="$absdir/$objdir/$depdepl"
46+ path="-L$absdir/$objdir"
47+ elif test -f "$absdir/$depdepl" ; then
48+ depdepl="$absdir/$depdepl"
49+ path="-L$absdir"
50+ else
51+ path="-L$absdir/$objdir"
52+ fi
53 ;;
54 esac
55 else
diff --git a/meta/packages/libtool/libtool-2.2.6/dolt.m4 b/meta/packages/libtool/libtool-2.2.6/dolt.m4
new file mode 100644
index 0000000000..9bedecf273
--- /dev/null
+++ b/meta/packages/libtool/libtool-2.2.6/dolt.m4
@@ -0,0 +1,129 @@
1dnl dolt, a replacement for libtool
2dnl Copyright © 2007-2008 Josh Triplett <josh@freedesktop.org>
3dnl Copying and distribution of this file, with or without modification,
4dnl are permitted in any medium without royalty provided the copyright
5dnl notice and this notice are preserved.
6dnl
7dnl To use dolt, invoke the DOLT macro immediately after the libtool macros.
8dnl Optionally, copy this file into acinclude.m4, to avoid the need to have it
9dnl installed when running autoconf on your project.
10
11AC_DEFUN([DOLT], [
12AC_REQUIRE([AC_CANONICAL_HOST])
13# dolt, a replacement for libtool
14# Josh Triplett <josh@freedesktop.org>
15AC_PATH_PROG(DOLT_BASH, bash)
16AC_MSG_CHECKING([if dolt supports this host])
17dolt_supported=yes
18if test x$DOLT_BASH = x; then
19 AC_MSG_ERROR([dolt: Bash not found, fatal error])
20fi
21if test x$GCC != xyes; then
22 AC_MSG_ERROR([dolt: gcc not found, fatal error])
23fi
24case $host in
25i?86-*-linux*|x86_64-*-linux*|arm-*-linux*) ;;
26*) AC_MSG_ERROR([dolt: incompatible host, fatal error]) ;;
27esac
28AC_MSG_RESULT([yes, replacing libtool])
29
30dnl Start writing out doltcompile.
31 cat <<__DOLTCOMPILE__EOF__ >doltcompile
32#!$DOLT_BASH
33__DOLTCOMPILE__EOF__
34 cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
35args=("$[]@")
36for ((arg=0; arg<${#args@<:@@@:>@}; arg++)) ; do
37 if test x"${args@<:@$arg@:>@}" = x-o ; then
38 objarg=$((arg+1))
39 break
40 fi
41done
42if test x$objarg = x ; then
43 echo 'Error: no -o on compiler command line' 1>&2
44 exit 1
45fi
46lo="${args@<:@$objarg@:>@}"
47obj="${lo%.lo}"
48if test x"$lo" = x"$obj" ; then
49 echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2
50 exit 1
51fi
52objbase="${obj##*/}"
53__DOLTCOMPILE__EOF__
54
55dnl Write out shared compilation code.
56 if test x$enable_shared = xyes; then
57 cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
58libobjdir="${obj%$objbase}.libs"
59if test ! -d "$libobjdir" ; then
60 mkdir "$libobjdir"
61 mkdir_ret=$?
62 if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then
63 exit $mkdir_ret
64 fi
65fi
66pic_object="$libobjdir/$objbase.o"
67args@<:@$objarg@:>@="$pic_object"
68"${args@<:@@@:>@}" -fPIC -DPIC
69__DOLTCOMPILE__EOF__
70 fi
71
72dnl Write out static compilation code.
73dnl Avoid duplicate compiler output if also building shared objects.
74 if test x$enable_static = xyes; then
75 cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
76non_pic_object="$obj.o"
77args@<:@$objarg@:>@="$non_pic_object"
78__DOLTCOMPILE__EOF__
79 if test x$enable_shared = xyes; then
80 cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
81"${args@<:@@@:>@}" >/dev/null 2>&1
82__DOLTCOMPILE__EOF__
83 else
84 cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
85"${args@<:@@@:>@}"
86__DOLTCOMPILE__EOF__
87 fi
88 fi
89
90dnl Write out the code to write the .lo file.
91dnl The second line of the .lo file must match "^# Generated by .*libtool"
92 cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
93{
94echo "# $lo - a libtool object file"
95echo "# Generated by doltcompile, not libtool"
96__DOLTCOMPILE__EOF__
97
98 if test x$enable_shared = xyes; then
99 cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
100echo "pic_object='$pic_object'"
101__DOLTCOMPILE__EOF__
102 else
103 cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
104echo pic_object=none
105__DOLTCOMPILE__EOF__
106 fi
107
108 if test x$enable_static = xyes; then
109 cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
110echo "non_pic_object='$non_pic_object'"
111__DOLTCOMPILE__EOF__
112 else
113 cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
114echo non_pic_object=none
115__DOLTCOMPILE__EOF__
116 fi
117
118 cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
119} > "$lo"
120__DOLTCOMPILE__EOF__
121
122dnl Done writing out doltcompile; substitute it for libtool compilation.
123 chmod +x doltcompile
124 LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)'
125 AC_SUBST(LTCOMPILE)
126 LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)'
127 AC_SUBST(LTCXXCOMPILE)
128# end dolt
129])
diff --git a/meta/packages/libtool/libtool-2.2.6/prefix.patch b/meta/packages/libtool/libtool-2.2.6/prefix.patch
new file mode 100644
index 0000000000..639feb7456
--- /dev/null
+++ b/meta/packages/libtool/libtool-2.2.6/prefix.patch
@@ -0,0 +1,103 @@
1Renames "libtool" -> "${TARGET_PREFIX}libtool" which makes sure
2it can't be confused with the host libtool.
3
4Index: libtool-2.2.2/libltdl/m4/libtool.m4
5===================================================================
6--- libtool-2.2.2.orig/libltdl/m4/libtool.m4 2008-04-13 22:43:05.000000000 +0100
7+++ libtool-2.2.2/libltdl/m4/libtool.m4 2008-04-13 22:43:05.000000000 +0100
8@@ -89,7 +89,8 @@
9 LIBTOOL_DEPS="$ltmain"
10
11 # Always use our own libtool.
12-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
13+LIBTOOL='$(SHELL) $(top_builddir)'
14+LIBTOOL="$LIBTOOL/$host_alias-libtool"
15 AC_SUBST(LIBTOOL)dnl
16
17 _LT_SETUP
18@@ -211,7 +212,7 @@
19 no_glob_subst='s/\*/\\\*/g'
20
21 # Global variables:
22-ofile=libtool
23+ofile=${host_alias}-libtool
24 can_build_shared=yes
25
26 # All known linkers require a `.a' archive for static linking (except MSVC,
27Index: libtool-2.2.2/Makefile.am
28===================================================================
29--- libtool-2.2.2.orig/Makefile.am 2008-04-01 19:06:08.000000000 +0100
30+++ libtool-2.2.2/Makefile.am 2008-04-13 22:49:17.000000000 +0100
31@@ -31,7 +31,7 @@
32 DIST_SUBDIRS = .
33 EXTRA_DIST =
34
35-BUILT_SOURCES = libtool
36+BUILT_SOURCES = $(host_alias)-libtool
37
38 CLEANFILES =
39 MOSTLYCLEANFILES =
40@@ -64,7 +64,7 @@
41 ## ---------------- ##
42
43 # The libtool distributor and the standalone libtool script.
44-bin_SCRIPTS = libtoolize libtool
45+bin_SCRIPTS = libtoolize $(host_alias)-libtool
46
47 libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
48 rm -f libtoolize.tmp libtoolize
49@@ -90,8 +90,8 @@
50 # We used to do this with a 'stamp-vcl' file, but non-gmake builds
51 # would rerun configure on every invocation, so now we manually
52 # check the version numbers from the build rule when necessary.
53-libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
54- @target=libtool; $(rebuild); \
55+$(host_alias)-libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
56+ @target=$(host_alias)-libtool; $(rebuild); \
57 if test -f "$$target"; then \
58 set dummy `./$$target --version | sed 1q`; actualver="$$5"; \
59 test "$$actualver" = "$$correctver" && rebuild=false; \
60@@ -100,8 +100,8 @@
61 case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \
62 done; \
63 if $$rebuild; then \
64- echo $(SHELL) ./config.status $$target; \
65- cd $(top_builddir) && $(SHELL) ./config.status $$target; \
66+ echo $(SHELL) ./config.status libtool; \
67+ cd $(top_builddir) && $(SHELL) ./config.status libtool; \
68 fi
69
70 .PHONY: configure-subdirs
71@@ -145,7 +145,7 @@
72 ChangeLog.1999 ChangeLog.2000 ChangeLog.2001 \
73 ChangeLog.2002 ChangeLog.2003 ChangeLog.2004 \
74 ChangeLog.2005 ChangeLog.2006 ChangeLog.2007
75-CLEANFILES += libtool libtoolize libtoolize.tmp \
76+CLEANFILES += $(host_alias)-libtool libtoolize libtoolize.tmp \
77 $(auxdir)/ltmain.tmp $(m4dir)/ltversion.tmp
78
79 ## We build ltversion.m4 here, instead of from config.status,
80@@ -483,12 +483,12 @@
81
82 BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \
83 LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \
84- LIBTOOL="$(abs_top_builddir)/libtool" \
85+ LIBTOOL="$(abs_top_builddir)/$(host_alias)-libtool" \
86 tst_aclocaldir="$(abs_top_srcdir)/libltdl/m4"
87
88 INSTALLCHECK_ENVIRONMENT = \
89 LIBTOOLIZE="$(bindir)/`echo libtoolize | sed '$(program_transform_name)'`" \
90- LIBTOOL="$(bindir)/`echo libtool | sed '$(program_transform_name)'`" \
91+ LIBTOOL="$(bindir)/`echo $(host_alias)-libtool | sed '$(program_transform_name)'`" \
92 LTDLINCL="-I$(includedir)" \
93 LIBLTDL="$(libdir)/libltdl.la" \
94 tst_aclocaldir="$(aclocaldir)"
95@@ -620,7 +620,7 @@
96 TESTS += $(FC_TESTS)
97 endif
98
99-tests/demo-conf.test: libtool
100+tests/demo-conf.test: $(host_alias)-libtool
101
102 EXTRA_DIST += $(srcdir)/tests/defs.in tests/defs.m4sh \
103 $(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS) $(FC_TESTS)