summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-04-11 11:32:22 +0000
committerRichard Purdie <richard@openedhand.com>2008-04-11 11:32:22 +0000
commit0f331d1d84b7a36aabe016198992642bc61f49bc (patch)
treef7d7f9f2073cf379a064ec4db398953df6d97ad3
parent92e6c2c549e1f46902fedf6cc8c3f90c769e32aa (diff)
downloadpoky-0f331d1d84b7a36aabe016198992642bc61f49bc.tar.gz
libtool-cross: Enable using dolt for the cases where it works, work around broken libtool fallback handling
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4230 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta/packages/libtool/libtool-1.5.10/add_dolt.patch15
-rw-r--r--meta/packages/libtool/libtool-1.5.10/dolt.m4130
-rw-r--r--meta/packages/libtool/libtool-cross_1.5.10.bb10
-rw-r--r--meta/packages/libtool/libtool_1.5.10.bb5
4 files changed, 157 insertions, 3 deletions
diff --git a/meta/packages/libtool/libtool-1.5.10/add_dolt.patch b/meta/packages/libtool/libtool-1.5.10/add_dolt.patch
new file mode 100644
index 0000000000..45dd78a812
--- /dev/null
+++ b/meta/packages/libtool/libtool-1.5.10/add_dolt.patch
@@ -0,0 +1,15 @@
1Index: libtool-1.5.10/libtool.m4
2===================================================================
3--- libtool-1.5.10.orig/libtool.m4 2008-04-10 16:08:19.000000000 +0100
4+++ libtool-1.5.10/libtool.m4 2008-04-10 16:08:44.000000000 +0100
5@@ -67,7 +67,9 @@
6 ifdef([LT_AC_PROG_GCJ],
7 [define([LT_AC_PROG_GCJ],
8 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
9-])])# AC_PROG_LIBTOOL
10+])
11+DOLT
12+])# AC_PROG_LIBTOOL
13
14
15 # _AC_PROG_LIBTOOL
diff --git a/meta/packages/libtool/libtool-1.5.10/dolt.m4 b/meta/packages/libtool/libtool-1.5.10/dolt.m4
new file mode 100644
index 0000000000..e7cf6809cb
--- /dev/null
+++ b/meta/packages/libtool/libtool-1.5.10/dolt.m4
@@ -0,0 +1,130 @@
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)
128fi
129# end dolt
130])
diff --git a/meta/packages/libtool/libtool-cross_1.5.10.bb b/meta/packages/libtool/libtool-cross_1.5.10.bb
index 0d0b90ac81..7029a3d0a8 100644
--- a/meta/packages/libtool/libtool-cross_1.5.10.bb
+++ b/meta/packages/libtool/libtool-cross_1.5.10.bb
@@ -1,7 +1,7 @@
1require libtool.inc 1require libtool.inc
2require libtool_${PV}.bb 2require libtool_${PV}.bb
3 3
4PR = "r10" 4PR = "r11"
5PACKAGES = "" 5PACKAGES = ""
6FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/libtool-${PV}" 6FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/libtool-${PV}"
7SRC_URI_append = " file://libdir-la.patch;patch=1 \ 7SRC_URI_append = " file://libdir-la.patch;patch=1 \
@@ -12,6 +12,13 @@ SRC_URI_append = " file://libdir-la.patch;patch=1 \
12 file://nmedit_fix.patch;patch=1 \ 12 file://nmedit_fix.patch;patch=1 \
13 file://nousrlib.patch;patch=1" 13 file://nousrlib.patch;patch=1"
14 14
15DOLT_PATCH = ""
16DOLT_PATCH_arm = " file://add_dolt.patch;patch=1"
17DOLT_PATCH_i586 = " file://add_dolt.patch;patch=1"
18
19SRC_URI_append_linux = "${DOLT_PATCH}"
20SRC_URI_append_linux-gnueabi = "${DOLT_PATCH}"
21
15S = "${WORKDIR}/libtool-${PV}" 22S = "${WORKDIR}/libtool-${PV}"
16 23
17prefix = "${STAGING_DIR_NATIVE}${layout_prefix}" 24prefix = "${STAGING_DIR_NATIVE}${layout_prefix}"
@@ -41,6 +48,7 @@ do_stage () {
41 install -c -m 0644 ltmain.sh ${STAGING_DATADIR}/libtool/ 48 install -c -m 0644 ltmain.sh ${STAGING_DATADIR}/libtool/
42 install -c -m 0644 libtool.m4 ${STAGING_DATADIR}/aclocal/ 49 install -c -m 0644 libtool.m4 ${STAGING_DATADIR}/aclocal/
43 install -c -m 0644 ltdl.m4 ${STAGING_DATADIR}/aclocal/ 50 install -c -m 0644 ltdl.m4 ${STAGING_DATADIR}/aclocal/
51 install -c -m 0644 ${WORKDIR}/dolt.m4 ${STAGING_DATADIR}/aclocal/
44} 52}
45 53
46do_install () { 54do_install () {
diff --git a/meta/packages/libtool/libtool_1.5.10.bb b/meta/packages/libtool/libtool_1.5.10.bb
index 5419450c7d..c78cfefab2 100644
--- a/meta/packages/libtool/libtool_1.5.10.bb
+++ b/meta/packages/libtool/libtool_1.5.10.bb
@@ -4,8 +4,9 @@ PR = "r5"
4 4
5SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \ 5SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
6 file://autotools.patch;patch=1 \ 6 file://autotools.patch;patch=1 \
7 file://uclibc.patch;patch=1 \ 7 file://uclibc.patch;patch=1 \
8 file://3figures.patch;patch=1" 8 file://3figures.patch;patch=1 \
9 file://dolt.m4"
9S = "${WORKDIR}/libtool-${PV}" 10S = "${WORKDIR}/libtool-${PV}"
10 11
11PACKAGES =+ "libltdl libltdl-dev libltdl-dbg" 12PACKAGES =+ "libltdl libltdl-dev libltdl-dbg"