[OE-core] [PATCH] lsof: the compiler version fault
Paul Barker
paul at paulbarker.me.uk
Thu Nov 20 11:56:19 UTC 2014
On 20 November 2014 03:06, Jian Liu <jian.liu at windriver.com> wrote:
> 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.
>
> Signed-off-by: Jian Liu <jian.liu at windriver.com>
> ---
> .../lsof/files/compiler-version-fault.patch | 13 +++++++++++++
> meta/recipes-extended/lsof/lsof_4.87.bb | 4 +++-
> 2 files changed, 16 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..bf22f4b
> --- /dev/null
> +++ b/meta/recipes-extended/lsof/files/compiler-version-fault.patch
> @@ -0,0 +1,13 @@
> +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
This patch needs 'Upstream-status' and 'Signed-off-by' tags as
described in http://openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Header_Recommendations.
Giving a short description of the patch within the patch file itself
is also encouraged.
> diff --git a/meta/recipes-extended/lsof/lsof_4.87.bb b/meta/recipes-extended/lsof/lsof_4.87.bb
> index 03fee16..9de3f33 100644
> --- a/meta/recipes-extended/lsof/lsof_4.87.bb
> +++ b/meta/recipes-extended/lsof/lsof_4.87.bb
> @@ -5,7 +5,9 @@ SECTION = "devel"
> LICENSE = "BSD"
> PR = "r0"
>
> -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.8.5.2.233.g932f7e4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Cheers,
--
Paul Barker
Email: paul at paulbarker.me.uk
http://www.paulbarker.me.uk
More information about the Openembedded-core
mailing list