[OE-core] [PATCH 04/24] lsof: fix LSOF_CCV in version.h

Robert Yang liezhi.yang at windriver.com
Fri May 25 02:48:09 UTC 2018


From: Jian Liu <jian.liu at windriver.com>

When using cross compiler to build the package "lsof" on a host,
the value of LSOF_CCV in version.h genegrated by the Makefile
is the version of the compiler on the host while it should be
the version of cross compiler.

On Ubuntu host before fixed:
  #define LSOF_CCV        "4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) "

After fixed:
  #define   LSOF_CCV        "4.9.1 (GCC) "

Signed-off-by: Jian Liu <jian.liu at windriver.com>
Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
---
 .../files/Configure-fix-LSOF_CCV-assignment.patch  | 31 ++++++++++++++++++++++
 meta/recipes-extended/lsof/lsof_4.89.bb            |  4 ++-
 2 files changed, 34 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/lsof/files/Configure-fix-LSOF_CCV-assignment.patch

diff --git a/meta/recipes-extended/lsof/files/Configure-fix-LSOF_CCV-assignment.patch b/meta/recipes-extended/lsof/files/Configure-fix-LSOF_CCV-assignment.patch
new file mode 100644
index 0000000..a182925
--- /dev/null
+++ b/meta/recipes-extended/lsof/files/Configure-fix-LSOF_CCV-assignment.patch
@@ -0,0 +1,31 @@
+From c197389c9d8ccdbfcfe1dc31da6b4ce69b90ecf6 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan at windriver.com>
+Date: Thu, 23 Oct 2014 03:43:27 -0400
+Subject: [PATCH] Configure: fix LSOF_CCV assignment
+
+Allow to use specified LSOF_CC to get the version of linux compiler.
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
+---
+ Configure |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Configure b/Configure
+index 29c1292..e5a199f 100755
+--- a/Configure
++++ b/Configure
+@@ -2705,8 +2705,8 @@ LOCKF_OWNER4
+     if test "X$LSOF_CC" = "X"	# {
+     then
+       LSOF_CC=cc
+-      LSOF_CCV=`$LSOF_CC -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'`
+     fi	# }
++    LSOF_CCV=`$LSOF_CC -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'`
+     if test "X$LINUX_CONF_CC" = "X"	# {
+     then
+       LINUX_CONF_CC=$LSOF_CC
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/lsof/lsof_4.89.bb b/meta/recipes-extended/lsof/lsof_4.89.bb
index 14546db..52b40dc 100644
--- a/meta/recipes-extended/lsof/lsof_4.89.bb
+++ b/meta/recipes-extended/lsof/lsof_4.89.bb
@@ -13,7 +13,8 @@ LIC_FILES_CHKSUM = "file://00README;beginline=645;endline=679;md5=964df275d26429
 
 SRC_URI = "http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2 \
            file://lsof-remove-host-information.patch \
-          "
+           file://Configure-fix-LSOF_CCV-assignment.patch \
+"
 
 SRC_URI[md5sum] = "1b9cd34f3fb86856a125abbf2be3a386"
 SRC_URI[sha256sum] = "81ac2fc5fdc944793baf41a14002b6deb5a29096b387744e28f8c30a360a3718"
@@ -40,6 +41,7 @@ python do_unpack () {
 export LSOF_INCLUDE = "${STAGING_INCDIR}"
 
 do_configure () {
+	export LSOF_CC="${CC}"
 	export LSOF_AR="${AR} cr"
 	export LSOF_RANLIB="${RANLIB}"
 	if [ "x${GLIBCVERSION}" != "x" ]; then
-- 
2.7.4




More information about the Openembedded-core mailing list