summaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorReinette Chatre <reinette.chatre@intel.com>2016-08-30 12:45:46 -0700
committerReinette Chatre <reinette.chatre@intel.com>2016-09-07 12:29:43 -0700
commit0a93a92a9b3937a48dba29e8c8b3ca8c636b1663 (patch)
tree9a1301640e3df6d6016ab6a2e994de2c1327653e /recipes-devtools
parent29cf332b7c044312fee880f33f48dc3f1fd9bba8 (diff)
downloadmeta-systemdev-0a93a92a9b3937a48dba29e8c8b3ca8c636b1663.tar.gz
meta-systemdev-0a93a92a9b3937a48dba29e8c8b3ca8c636b1663.tar.bz2
meta-systemdev-0a93a92a9b3937a48dba29e8c8b3ca8c636b1663.zip
iotools: support build/install on different architecture
When building for a different architecture bitbake ensures that CC is set to correct compiler. Modify the Makefile to accept the value of CC from environment. The binary self is used during installation to create symlinks to appropriate names - it is thus not possible to complete installation on build system when it is of different architecture. Modify the installation rule to only install the binary and create a post install function that will be run on target. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Reviewed-by: Joe Konno <joe.konno@intel.com> Acked-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/iotools/iotools/Makefile.patch24
-rw-r--r--recipes-devtools/iotools/iotools_1.5.bb15
2 files changed, 34 insertions, 5 deletions
diff --git a/recipes-devtools/iotools/iotools/Makefile.patch b/recipes-devtools/iotools/iotools/Makefile.patch
new file mode 100644
index 0000000..7ec67e0
--- /dev/null
+++ b/recipes-devtools/iotools/iotools/Makefile.patch
@@ -0,0 +1,24 @@
+From: Reinette Chatre <reinette.chatre@intel.com>
+Date: Tue, 30 Aug 12:12:50 PDT 2016
+Subject: [PATCH] Makefile: only modify CC if unset
+
+When cross compiling bitbake sets the value of CC to correct compiler.
+
+Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile b/Makefile
+--- a/Makefile
++++ b/Makefile
+@@ -17,7 +17,7 @@
+ VER_MAJOR = 1
+ VER_MINOR = 5
+
+-CC=$(CROSS_COMPILE)gcc
++CC ?= $(CROSS_COMPILE)gcc
+
+ # build options
+ DEBUG ?= 1
+--
diff --git a/recipes-devtools/iotools/iotools_1.5.bb b/recipes-devtools/iotools/iotools_1.5.bb
index c49bf8a..bc980fa 100644
--- a/recipes-devtools/iotools/iotools_1.5.bb
+++ b/recipes-devtools/iotools/iotools_1.5.bb
@@ -5,6 +5,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
SRC_URI = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/iotools/iotools-1.5.tar.gz"
+SRC_URI += "file://Makefile.patch"
SRC_URI[md5sum] = "64c27488a70866577cf99044aa01e28d"
SRC_URI[sha256sum] = "3186ba296072f644dda881b78d77e3774b79e8cef3e828fffc947d558b08830d"
@@ -17,9 +18,13 @@ do_compile () {
do_install () {
install -d ${D}${sbindir}
- oe_runmake SBINDIR=${D}${sbindir} install
- #The Makefile installs files with "cp -a" which preserves ownership
- #of user running bitbake resulting in QA Issue "host-user-contaminated"
- #Fixup permissions
- chown -R root:root ${D}${sbindir}
+ install -m 0755 ${B}/iotools ${D}${sbindir}/iotools
+}
+
+pkg_postinst_${PN} () {
+if [ -n "$D" ]; then
+ exit 1
+fi
+
+${sbindir}/iotools --make-links
}