Hi Ross,

On 06/06/2018 07:52 PM, Burton, Ross wrote:
I really wish I didn't look at the lsof recipe...

To my reading if you pass LSOF_CC in do_configure (as you do in this
patch) then we don't need to patch Configure to move the LSOF_CCV
assignment at all, and can also drop the CC=${CC} from do_compile.

(I'm now going to scoop up the brain that oozed out of my ears off the floor)

Thanks for pointing this out, after more investigations, the issue had been
fixed by another patch:

meta/recipes-extended/lsof/files/lsof-remove-host-information.patch

So this patch is not needed any more, I've removed if from the PULL repo.

// Robert


Ross

On 6 June 2018 at 03:54, Robert Yang <[email protected]> wrote:
From: Jian Liu <[email protected]>

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 <[email protected]>
Signed-off-by: Wenzong Fan <[email protected]>
---
  .../files/Configure-fix-LSOF_CCV-assignment.patch  | 42 ++++++++++++++++++++++
  meta/recipes-extended/lsof/lsof_4.89.bb            |  4 ++-
  2 files changed, 45 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..17c5c4b
--- /dev/null
+++ b/meta/recipes-extended/lsof/files/Configure-fix-LSOF_CCV-assignment.patch
@@ -0,0 +1,42 @@
+From c197389c9d8ccdbfcfe1dc31da6b4ce69b90ecf6 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <[email protected]>
+Date: Thu, 23 Oct 2014 03:43:27 -0400
+Subject: [PATCH] Configure: fix LSOF_CCV assignment
+
+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) "
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <[email protected]>
+Signed-off-by: Robert Yang <[email protected]>
+
+---
+ 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

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to