[OE-core] [PATCH] nss: avoid to use the hardcode kernel version
Martin Jansa
martin.jansa at gmail.com
Mon Mar 31 15:10:18 UTC 2014
On Mon, Mar 31, 2014 at 10:20:49PM +0800, Kai Kang wrote:
> From: Roy Li <rongqing.li at windriver.com>
>
> When native package is built, use the uname to return the kernel version.
>
> When target is built, read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion
> to avoid to use the hardcode kernel version.
Doesn't it make nss MACHINE_ARCH like most virtual/kernel providers are?
> Signed-off-by: Roy Li <rongqing.li at windriver.com>
> Signed-off-by: Kai Kang <kai.kang at windriver.com>
> ---
> meta/recipes-support/nss/nss.inc | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc
> index 404decc..f24da68 100644
> --- a/meta/recipes-support/nss/nss.inc
> +++ b/meta/recipes-support/nss/nss.inc
> @@ -26,6 +26,7 @@ SRC_URI_append_class-target = "\
> inherit siteinfo
> PR = "r0"
> DEPENDS = "sqlite3 nspr zlib nss-native"
> +DEPENDS_append_class-target += "virtual/kernel"
> DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
> RDEPENDS_${PN} = "perl"
>
> @@ -37,12 +38,24 @@ TARGET_CC_ARCH += "${LDFLAGS}"
> do_compile_prepend_class-native() {
> export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}
> export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
> + export OS_RELEASE=`uname -r`
> }
>
> do_compile_prepend_class-nativesdk() {
> export LDFLAGS=""
> }
>
> +do_compile_prepend_class-target() {
> + export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'`
> +}
> +
> +do_install_prepend_class-native() {
> + export OS_RELEASE=`uname -r`
> +}
> +
> +do_install_prepend_class-target() {
> + export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'`
> +}
> do_compile() {
> export CROSS_COMPILE=1
> export NATIVE_CC="gcc"
> @@ -57,7 +70,6 @@ do_compile() {
> export NSS_USE_SYSTEM_SQLITE=1
> export NSS_ENABLE_ECC=1
>
> - export OS_RELEASE=3.4
> export OS_TARGET=Linux
> export OS_ARCH=Linux
>
> @@ -97,7 +109,6 @@ do_install() {
> export NSS_USE_SYSTEM_SQLITE=1
> export NSS_ENABLE_ECC=1
>
> - export OS_RELEASE=3.4
> export OS_TARGET=Linux
> export OS_ARCH=Linux
>
> --
> 1.8.1.2
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
Martin 'JaMa' Jansa jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20140331/df775d65/attachment-0002.sig>
More information about the Openembedded-core
mailing list