Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] lsof: fix LSOF_CCV in version.h
@ 2014-10-22  3:23 wenzong.fan
  2014-10-22  3:23 ` [PATCH 1/1] " wenzong.fan
  0 siblings, 1 reply; 4+ messages in thread
From: wenzong.fan @ 2014-10-22  3:23 UTC (permalink / raw)
  To: openembedded-core

From: Wenzong Fan <wenzong.fan@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) "

The following changes since commit 924da20c6f2f183fa7e930e4c3c6b14c090acbe5:

  build-appliance-image: Update to dizzy head revision (2014-10-18 16:16:38 +0200)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib wenzong/lsof
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=wenzong/lsof

Wenzong Fan (1):
  lsof: fix LSOF_CCV in version.h

 .../lsof/files/compiler-version-fault.patch        |   25 ++++++++++++++++++++
 meta/recipes-extended/lsof/lsof_4.87.bb            |    4 +++-
 2 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/lsof/files/compiler-version-fault.patch

-- 
1.7.9.5



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] lsof: fix LSOF_CCV in version.h
  2014-10-22  3:23 [PATCH 0/1] lsof: fix LSOF_CCV in version.h wenzong.fan
@ 2014-10-22  3:23 ` wenzong.fan
  2014-10-22 20:03   ` Burton, Ross
  0 siblings, 1 reply; 4+ messages in thread
From: wenzong.fan @ 2014-10-22  3:23 UTC (permalink / raw)
  To: openembedded-core

From: Wenzong Fan <wenzong.fan@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: Wenzong Fan <wenzong.fan@windriver.com>
---
 .../lsof/files/compiler-version-fault.patch        |   25 ++++++++++++++++++++
 meta/recipes-extended/lsof/lsof_4.87.bb            |    4 +++-
 2 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/lsof/files/compiler-version-fault.patch

diff --git a/meta/recipes-extended/lsof/files/compiler-version-fault.patch b/meta/recipes-extended/lsof/files/compiler-version-fault.patch
new file mode 100644
index 0000000..dd61376
--- /dev/null
+++ b/meta/recipes-extended/lsof/files/compiler-version-fault.patch
@@ -0,0 +1,25 @@
+lsof: fix LSOF_CCV in version.h
+
+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.
+
+Upstream-Status: Pending
+
+Signed-off-by: Jian Liu <jian.liu@windriver.com>
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+================================
+diff -Nur lsof_4.87_src.orig/dialects/linux/Makefile lsof_4.87_src/dialects/linux/Makefile
+--- lsof_4.87_src.orig/dialects/linux/Makefile	2008-04-15 21:30:04.000000000 +0800
++++ lsof_4.87_src/dialects/linux/Makefile	2014-09-09 14:15:27.208165334 +0800
+@@ -77,7 +77,8 @@
+ 	@rm -f version.h
+ 	@echo '#define	LSOF_BLDCMT	"${LSOF_BLDCMT}"' > version.h;
+ 	@echo '#define	LSOF_CC		"${CC}"' >> version.h
+-	@echo '#define	LSOF_CCV	"${CCV}"' >> version.h
++	@LSOF_CCV=`${CC} -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'` &&\
++	echo "#define	LSOF_CCV	\"$${LSOF_CCV}\"" >> version.h
+ 	@echo '#define	LSOF_CCDATE	"'`date`'"' >> version.h
+ 	@echo '#define	LSOF_CCFLAGS	"'`echo ${CFLAGS} | sed 's/\\\\(/\\(/g' | sed 's/\\\\)/\\)/g' | sed 's/"/\\\\"/g'`'"' >> version.h
+ 	@echo '#define	LSOF_CINFO	"${CINFO}"' >> version.h
diff --git a/meta/recipes-extended/lsof/lsof_4.87.bb b/meta/recipes-extended/lsof/lsof_4.87.bb
index e7a1eb2..e4ad4b4 100644
--- a/meta/recipes-extended/lsof/lsof_4.87.bb
+++ b/meta/recipes-extended/lsof/lsof_4.87.bb
@@ -4,7 +4,9 @@ Its name stands for LiSt Open Files, and it does just that."
 SECTION = "devel"
 LICENSE = "BSD"
 
-SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2"
+SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2 \
+           file://compiler-version-fault.patch \
+          "
 
 SRC_URI[md5sum] = "80e2a76d0e05826db910ec88e631296c"
 SRC_URI[sha256sum] = "dfdd3709d82bc79ccdf3e404b84aafa9aede5948642a824ecaefd0aac589da2c"
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] lsof: fix LSOF_CCV in version.h
  2014-10-22  3:23 ` [PATCH 1/1] " wenzong.fan
@ 2014-10-22 20:03   ` Burton, Ross
  2014-10-23  6:27     ` wenzong fan
  0 siblings, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2014-10-22 20:03 UTC (permalink / raw)
  To: wenzong fan; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 656 bytes --]

On 22 October 2014 04:23, <wenzong.fan@windriver.com> wrote:

> +-      @echo '#define  LSOF_CCV        "${CCV}"' >> version.h
> ++      @LSOF_CCV=`${CC} -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'` &&\
> ++      echo "#define   LSOF_CCV        \"${LSOF_CCV}\"" >> version.h
>

It seems that a better (and importantly, upstreamable) fix would be to pass
LSOF_CC correctly to ./Configure instead of overriding in do_compile(), and
change the LSOF_CCV assignment to run LSOF_CC if _CCV isn't already set.

(My general approach here is spend a little more time getting a fix
upstreamed so that we're not fixing our patch every few months)

Ross

[-- Attachment #2: Type: text/html, Size: 1264 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] lsof: fix LSOF_CCV in version.h
  2014-10-22 20:03   ` Burton, Ross
@ 2014-10-23  6:27     ` wenzong fan
  0 siblings, 0 replies; 4+ messages in thread
From: wenzong fan @ 2014-10-23  6:27 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On 10/23/2014 04:03 AM, Burton, Ross wrote:
>
> On 22 October 2014 04:23, <wenzong.fan@windriver.com
> <mailto:wenzong.fan@windriver.com>> wrote:
>
>     +-      @echo '#define  LSOF_CCV        "${CCV}"' >> version.h
>     ++      @LSOF_CCV=`${CC} -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'` &&\
>     ++      echo "#define   LSOF_CCV        \"${LSOF_CCV}\"" >> version.h
>
>
> It seems that a better (and importantly, upstreamable) fix would be to
> pass LSOF_CC correctly to ./Configure instead of overriding in
> do_compile(), and change the LSOF_CCV assignment to run LSOF_CC if _CCV
> isn't already set.

Ok, I'll redo the patch and send V2.

Thanks
Wenzong

>
> (My general approach here is spend a little more time getting a fix
> upstreamed so that we're not fixing our patch every few months)
>
> Ross
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-23  6:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-22  3:23 [PATCH 0/1] lsof: fix LSOF_CCV in version.h wenzong.fan
2014-10-22  3:23 ` [PATCH 1/1] " wenzong.fan
2014-10-22 20:03   ` Burton, Ross
2014-10-23  6:27     ` wenzong fan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox