blob: 4a43867b3ec0b95212449002a9d673151b1b2783 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001require libtool-${PV}.inc
2
3PACKAGES = ""
4SRC_URI += "file://prefix.patch"
5SRC_URI += "file://fixinstall.patch"
6
7datadir = "${STAGING_DIR_TARGET}${target_datadir}"
8
Andrew Geisslerf0343792020-11-18 10:42:21 -06009inherit nopackages
10
Patrick Williams213cb262021-08-07 19:21:33 -050011do_configure:prepend () {
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012 # Remove any existing libtool m4 since old stale versions would break
13 # any upgrade
14 rm -f ${STAGING_DATADIR}/aclocal/libtool.m4
15 rm -f ${STAGING_DATADIR}/aclocal/lt*.m4
16}
17
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080018#
19# ccache may or may not be INHERITED, we remove references to it so the sstate
20# artefact works on a machine where its not present. libtool-cross isn't used
21# heavily so any performance issue is minor.
22# Find references to LTCC="ccache xxx-gcc" and CC="ccache xxx-gcc"
23#
Patrick Williamsc124f4f2015-09-15 14:41:29 -050024do_install () {
25 install -d ${D}${bindir_crossscripts}/
26 install -m 0755 ${HOST_SYS}-libtool ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050027 sed -e 's@^\(predep_objects="\).*@\1"@' \
28 -e 's@^\(postdep_objects="\).*@\1"@' \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080029 -e 's@^CC="ccache.@CC="@' \
30 -e 's@^LTCC="ccache.@LTCC="@' \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050031 -i ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
32 sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
33 sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
Patrick Williamsc124f4f2015-09-15 14:41:29 -050034 GREP='/bin/grep' SED='sed' ${S}/build-aux/inline-source libtoolize > ${D}${bindir_crossscripts}/libtoolize
35 chmod 0755 ${D}${bindir_crossscripts}/libtoolize
36 install -d ${D}${target_datadir}/libtool/build-aux/
37 install -d ${D}${target_datadir}/aclocal/
38 install -c ${S}/build-aux/compile ${D}${target_datadir}/libtool/build-aux/
39 install -c ${S}/build-aux/config.guess ${D}${target_datadir}/libtool/build-aux/
40 install -c ${S}/build-aux/config.sub ${D}${target_datadir}/libtool/build-aux/
41 install -c ${S}/build-aux/depcomp ${D}${target_datadir}/libtool/build-aux/
42 install -c ${S}/build-aux/install-sh ${D}${target_datadir}/libtool/build-aux/
43 install -c ${S}/build-aux/missing ${D}${target_datadir}/libtool/build-aux/
44 install -c -m 0644 ${S}/build-aux/ltmain.sh ${D}${target_datadir}/libtool/build-aux/
45 install -c -m 0644 ${S}/m4/*.m4 ${D}${target_datadir}/aclocal/
46}
47
Patrick Williamsc0f7c042017-02-23 20:41:17 -060048SYSROOT_DIRS += "${bindir_crossscripts} ${target_datadir}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050049
50SSTATE_SCAN_FILES += "libtoolize *-libtool"