summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-08-09 15:13:54 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-09-02 16:06:19 +0200
commit89d11edc3571bf5709647a84ef600b649355be4c (patch)
tree63a8bd22d4f86f4ee171c70450f6662a9c18bcbe
parent527a7f379f9f4699d65e24598d228bbc18e16c4d (diff)
downloadOSELAS.Toolchain-89d11edc3571bf5709647a84ef600b649355be4c.tar.gz
OSELAS.Toolchain-89d11edc3571bf5709647a84ef600b649355be4c.tar.xz
ptxd_make_world_install_pack: customized for relocatable toolchain
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--scripts/lib/ptxd_make_world_install.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_make_world_install.sh b/scripts/lib/ptxd_make_world_install.sh
new file mode 100644
index 0000000..0e02c5d
--- /dev/null
+++ b/scripts/lib/ptxd_make_world_install.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+#
+# Copyright (C) 2019 by Michael Olbrich <m.olbrich@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# custom ptxd_make_world_install_pack
+#
+# * skip rpath fixup. Not needed and may cause problems with target file
+# in cross packages
+# * skip anything else that is not needed for the toolchain
+#
+ptxd_make_world_install_pack() {
+ ptxd_make_world_init &&
+
+ if [ -z "${pkg_pkg_dir}" ]; then
+ # no pkg dir -> assume the package has nothing to install.
+ return
+ fi &&
+
+ # remove empty dirs
+ test \! -e "${pkg_pkg_dir}" || \
+ find "${pkg_pkg_dir}" -depth -type d -print0 | xargs -r -0 -- \
+ rmdir --ignore-fail-on-non-empty -- &&
+ check_pipe_status &&
+
+ if [ \! -e "${pkg_pkg_dir}" ]; then
+ if [ -e "${pkg_dir}" ]; then
+ ptxd_warning "PKG didn't install anything to '${pkg_pkg_dir}'"
+ fi
+ return
+ fi &&
+
+ # remove la files. They are not needed
+ find "${pkg_pkg_dir}" \( -type f -o -type l \) -name "*.la" -print0 | xargs -r -0 rm &&
+ check_pipe_status
+}
+export -f ptxd_make_world_install_pack