netkit-rusers: Fix build when libc does not have nis builtin
PATCH 1/8 netkit-rusers: Fix build when libc does not have nis builtin
--- .../0001-Link-with-libtirpc.patch | 79 +++++++++++++++++++ .../netkit-rusers/netkit-rusers_0.17.bb | 2 + 2 files changed, 81 insertions(+) create mode 100644 meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/0001-Link-with-libtirpc.patch
meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/0001-Link-with-libtirpc.patch new file +79 -0
@@ -0,0 +1,79 @@ +From 5746b68ba9dda87586b3ac88fe84031cbc0015f7 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 11 May 2018 12:20:03 -0700 +Subject: [PATCH] Link with libtirpc + +Signed-off-by: Khem Raj <[email protected]> +--- +Upstream-Status: Pending + + configure | 2 +- + rpc.rusersd/rusers_proc.c | 7 +------ + rpc.rusersd/rusersd.c | 6 +----- + rup/rup.c | 2 +- + 4 files changed, 4 insertions(+), 13 deletions(-) + +diff --git a/configure b/configure +index 85f6ca6..2d2d4b7 100755 +--- a/configure ++++ b/configure +@@ -147,7 +147,7 @@ else + fi + + LDFLAGS= +-LIBS= ++LIBS="-ltirpc" + + rm -f __conftest* + +diff --git a/rpc.rusersd/rusers_proc.c b/rpc.rusersd/rusers_proc.c +index 9ae6306..f9e237c 100644 +--- a/rpc.rusersd/rusers_proc.c ++++ b/rpc.rusersd/rusers_proc.c +@@ -57,12 +57,7 @@ char rp_rcsid[] = + #define RUT_TIME ut_time + #endif + +-/* Glibc strikes again */ +-#ifdef __GLIBC__ +- #include <rpcsvc/rusers.h> +-#else +- #include "rusers.h" +-#endif ++#include "rusers.h" + + void rusers_service(struct svc_req *rqstp, SVCXPRT *transp); + +diff --git a/rpc.rusersd/rusersd.c b/rpc.rusersd/rusersd.c +index 762be9b..dd355ac 100644 +--- a/rpc.rusersd/rusersd.c ++++ b/rpc.rusersd/rusersd.c +@@ -38,11 +38,7 @@ char rusersd_rcsid[] = + #include <rpc/pmap_clnt.h> + #include <unistd.h> + #include <grp.h> +-#ifdef __GLIBC__ +- #include <rpcsvc/rusers.h> +-#else +- #include "rusers.h" +-#endif ++#include "rusers.h" + + #include "../version.h" + +diff --git a/rup/rup.c b/rup/rup.c +index e5669ff..887f89d 100644 +--- a/rup/rup.c ++++ b/rup/rup.c +@@ -48,7 +48,7 @@ char rcsid[] = "$Id: rup.c,v 1.8 2000/07/22 19:51:40 dholland Exp $"; + + #undef FSHIFT /* Use protocol's shift and scale values */ + #undef FSCALE +-#include <rpcsvc/rstat.h> ++#include "rstat.h" + + #include "../version.h" + +-- +2.17.0 +
meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb +2 -0
@@ -9,6 +9,7 @@ DEPENDS = " tcp-wrappers libtirpc rpcbind" SRC_URI = "http://http.debian.net/debian/pool/main/n/${BPN}/${BPN}_${PV}.orig.tar.gz;name=archive \ http://http.debian.net/debian/pool/main/n/${BPN}/${BPN}_${PV}-8.diff.gz;name=patch8 \ file://rpc.rusersd-Makefile-fix-parallel-build-issue.patch \ + file://0001-Link-with-libtirpc.patch \ " SRC_URI[archive.md5sum] = "dc99a80b9fde2ab427c874f88f1c1602"
@@ -25,6 +26,7 @@ do_configure () { ./configure --prefix=${prefix} echo "LDFLAGS=${LDFLAGS}" >> MCONFIG echo "USE_GLIBC=1" >> MCONFIG + echo "LIBS=${LIBS}" >> MCONFIG } do_install () {
Signature · 1 line
2.17.0
PATCH 2/8 evince: Upgrade to 3.28.0
---
.../evince/{evince_3.24.0.bb => evince_3.28.0.bb} | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
rename meta-gnome/recipes-gnome/evince/{evince_3.24.0.bb => evince_3.28.0.bb} (92%)meta-gnome/recipes-gnome/evince/evince_3.28.0.bb renamed from meta-gnome/recipes-gnome/evince/evince_3.24.0.bb +3 -3
@@ -3,7 +3,6 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=96f2f8d5ee576a2163977938ea36fa7b" SECTION = "x11/office" DEPENDS = "gtk+3 libsecret ${@bb.utils.contains('DISTRO_FEATURES','x11','gnome-desktop3','',d)} poppler gstreamer1.0-plugins-base orc adwaita-icon-theme intltool-native gnome-common-native" -PR = "r5" inherit gnome pkgconfig gtk-icon-cache gsettings gobject-introspection distro_features_check systemd
@@ -13,8 +12,8 @@ SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV} file://0001-help-remove-YELP-macro.patch \ file://0001-Add-format-attribute-to-_synctex_malloc.patch \ " -SRC_URI[archive.md5sum] = "3fb65ff46de191dc49c481f1fc66201c" -SRC_URI[archive.sha256sum] = "043895af7bbd6f1b57f9ab8778e78cf9c0af5dfcc347eaa94a17bf864c04dc8f" +SRC_URI[archive.md5sum] = "96f8372c376e7062bc3b833099f6664f" +SRC_URI[archive.sha256sum] = "fa23264b65e140afb8ec27b070a277bda748d9d4a86788240d9f3514346573a8" EXTRA_OECONF = " --enable-thumbnailer \ "
@@ -53,6 +52,7 @@ PACKAGES =+ "${PN}-browser-plugin" FILES_${PN} += "${datadir}/dbus-1 \ ${datadir}/appdata \ + ${datadir}/metainfo \ ${datadir}/thumbnailers \ ${systemd_unitdir}/systemd/user/evince.service \ "
Signature · 1 line
2.17.0
PATCH 3/8 ipsec-tools: Disable gcc8 warnings
In reply to Khem Raj--- .../0001-Disable-gcc8-specific-warnings.patch | 86 +++++++++++++++++++ .../ipsec-tools/ipsec-tools_0.8.2.bb | 1 + 2 files changed, 87 insertions(+) create mode 100644 meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Disable-gcc8-specific-warnings.patch
meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-Disable-gcc8-specific-warnings.patch new file +86 -0
@@ -0,0 +1,86 @@ +From 282d492e4cab7b4d9c7321f4c0c55b615948e280 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 11 May 2018 14:09:17 -0700 +Subject: [PATCH] Disable gcc8 specific warnings + +Signed-off-by: Khem Raj <[email protected]> +--- + src/libipsec/ipsec_dump_policy.c | 5 +++++ + src/libipsec/pfkey_dump.c | 5 +++++ + src/racoon/isakmp.c | 11 ++++++++++- + 3 files changed, 20 insertions(+), 1 deletion(-) + +diff --git a/src/libipsec/ipsec_dump_policy.c b/src/libipsec/ipsec_dump_policy.c +index 4d0eb77..c3fc842 100644 +--- a/src/libipsec/ipsec_dump_policy.c ++++ b/src/libipsec/ipsec_dump_policy.c +@@ -275,6 +275,10 @@ ipsec_dump_policy1(policy, delimiter, withports) + return buf; + } + ++#pragma GCC diagnostic push ++#if defined(__GNUC__) && (__GNUC__ >= 8) ++#pragma GCC diagnostic ignored "-Wformat-truncation" ++#endif + static char * + ipsec_dump_ipsecrequest(buf, len, xisr, bound, withports) + char *buf; +@@ -419,3 +423,4 @@ set_address(buf, len, sa, withports) + + return buf; + } ++#pragma GCC diagnostic pop +diff --git a/src/libipsec/pfkey_dump.c b/src/libipsec/pfkey_dump.c +index 4627ebc..451e535 100644 +--- a/src/libipsec/pfkey_dump.c ++++ b/src/libipsec/pfkey_dump.c +@@ -691,6 +691,10 @@ str_ipport(sa) + /* + * set "/prefix[port number]" to buffer. + */ ++#pragma GCC diagnostic push ++#if defined(__GNUC__) && (__GNUC__ >= 8) ++#pragma GCC diagnostic ignored "-Wformat-truncation" ++#endif + static char * + str_prefport(family, pref, port, ulp) + u_int family, pref, port, ulp; +@@ -735,6 +739,7 @@ str_prefport(family, pref, port, ulp) + + return buf; + } ++#pragma GCC diagnostic pop + + static void + str_upperspec(ulp, p1, p2) +diff --git a/src/racoon/isakmp.c b/src/racoon/isakmp.c +index 7ff53a3..4addf24 100644 +--- a/src/racoon/isakmp.c ++++ b/src/racoon/isakmp.c +@@ -3124,7 +3124,12 @@ script_hook(iph1, script) + #endif + + /* local address */ ++#pragma GCC diagnostic push ++#if defined(__GNUC__) && (__GNUC__ >= 8) ++#pragma GCC diagnostic ignored "-Wstringop-truncation" ++#endif + GETNAMEINFO(iph1->local, addrstr, portstr); ++#pragma GCC diagnostic pop + + if (script_env_append(&envp, &envc, "LOCAL_ADDR", addrstr) != 0) { + plog(LLV_ERROR, LOCATION, NULL, "Cannot set LOCAL_ADDR\n"); +@@ -3138,8 +3143,12 @@ script_hook(iph1, script) + + /* Peer address */ + if (iph1->remote != NULL) { ++#pragma GCC diagnostic push ++#if defined(__GNUC__) && (__GNUC__ >= 8) ++#pragma GCC diagnostic ignored "-Wstringop-truncation" ++#endif + GETNAMEINFO(iph1->remote, addrstr, portstr); +- ++#pragma GCC diagnostic pop + if (script_env_append(&envp, &envc, + "REMOTE_ADDR", addrstr) != 0) { + plog(LLV_ERROR, LOCATION, NULL,
meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb +1 -0
@@ -25,6 +25,7 @@ SRC_URI = "http://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/0.8/ipsec-tools-${P file://0001-Fix-header-issues-found-with-musl-libc.patch \ file://0002-cfparse-clear-memory-equal-to-size-of-array.patch \ file://fix-CVE-2016-10396.patch \ + file://0001-Disable-gcc8-specific-warnings.patch \ " SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41" SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d"
Signature · 1 line
2.17.0
PATCH 4/8 flashrom: Fix build with libusb 1.0.22
In reply to Khem Raj--- ...pi-Avoid-deprecated-libusb-functions.patch | 39 +++++++++++++++++++ meta-oe/recipes-bsp/flashrom/flashrom_1.0.bb | 1 + 2 files changed, 40 insertions(+) create mode 100644 meta-oe/recipes-bsp/flashrom/flashrom/0001-ch341a_spi-Avoid-deprecated-libusb-functions.patch
meta-oe/recipes-bsp/flashrom/flashrom/0001-ch341a_spi-Avoid-deprecated-libusb-functions.patch new file +39 -0
@@ -0,0 +1,39 @@ +From e5f68189ab3602b1042cc8423fd6a3a23abd5455 Mon Sep 17 00:00:00 2001 +From: Alex James <[email protected]> +Date: Sat, 14 Apr 2018 22:59:57 -0500 +Subject: [PATCH] ch341a_spi: Avoid deprecated libusb functions + +libusb 1.0.22 marked libusb_set_debug as deprecated. For such versions +of libusb, use libusb_set_option instead. + +Change-Id: Ib71ebe812316eaf49136979a942a946ef9e4d487 +Signed-off-by: Alex James <[email protected]> +Reviewed-on: https://review.coreboot.org/25681 +Tested-by: Nico Huber <[email protected]> +Reviewed-by: David Hendricks <[email protected]> +--- +Upstream-Status: Backport + ch341a_spi.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/ch341a_spi.c b/ch341a_spi.c +index 6eb2804..d880510 100644 +--- a/ch341a_spi.c ++++ b/ch341a_spi.c +@@ -444,7 +444,12 @@ int ch341a_spi_init(void) + return -1; + } + +- libusb_set_debug(NULL, 3); // Enable information, warning and error messages (only). ++ /* Enable information, warning, and error messages (only). */ ++#if LIBUSB_API_VERSION < 0x01000106 ++ libusb_set_debug(NULL, 3); ++#else ++ libusb_set_option(NULL, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_INFO); ++#endif + + uint16_t vid = devs_ch341a_spi[0].vendor_id; + uint16_t pid = devs_ch341a_spi[0].device_id; +-- +2.17.0 +
meta-oe/recipes-bsp/flashrom/flashrom_1.0.bb +1 -0
@@ -8,6 +8,7 @@ DEPENDS = "pciutils libusb libusb-compat" SRC_URI = "https://download.flashrom.org/releases/flashrom-${PV}.tar.bz2 \ file://sst26.patch \ file://0001-platform-Add-riscv-to-known-platforms.patch \ + file://0001-ch341a_spi-Avoid-deprecated-libusb-functions.patch \ " SRC_URI[md5sum] = "42d999990c735d88653627cefcc13b9a" SRC_URI[sha256sum] = "3702fa215ba5fb5af8e54c852d239899cfa1389194c1e51cb2a170c4dc9dee64"
Signature · 1 line
2.17.0
PATCH 5/8 luajit: Dont use BUILD_LDFLAGS when compiling host binaries
In reply to Khem RajBUILD_LDFLAGS add --dynamic-linker to point to uninative but some binaries in luajit are for 32bit build host, so even if your host has the needed runtime, it will fail to execute because uninative ldso doesn't know about multilib
we get cyptic errors like
| make[1]: execvp: host/minilua: Accessing a corrupted shared library | make[1]: *** [Makefile:610: host/buildvm_arch.h] Error 127
Switch to using git for SRC_URI, master is pointing to latest 2.0 stable, it gets us all the patches done since last 2.0.5 relases in 2017
--- meta-oe/recipes-devtools/luajit/luajit_2.0.5.bb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
meta-oe/recipes-devtools/luajit/luajit_2.0.5.bb +4 -5
@@ -3,14 +3,14 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=10a96c93403affcc34765f4c2612bc22" HOMEPAGE = "http://luajit.org" -SRC_URI = "http://luajit.org/download/LuaJIT-${PV}.tar.gz \ +PV .= "+git${SRCPV}" +SRCREV = "02b521981a1ab919ff2cd4d9bcaee80baf77dce2" +SRC_URI = "git://luajit.org/git/luajit-2.0.git;protocol=http \ file://0001-Do-not-strip-automatically-this-leaves-the-stripping.patch \ file://clang.patch \ " -SRC_URI[md5sum] = "48353202cbcacab84ee41a5a70ea0a2c" -SRC_URI[sha256sum] = "874b1f8297c697821f561f9b73b57ffd419ed8f4278c82e05b48806d30c1e979" -S = "${WORKDIR}/LuaJIT-${PV}" +S = "${WORKDIR}/git" inherit pkgconfig binconfig siteinfo
@@ -49,7 +49,6 @@ EXTRA_OEMAKE = "\ 'TARGET_SHLDFLAGS=${LDFLAGS}' \ 'HOST_CC=${BUILD_CC}' \ 'HOST_CFLAGS=${BUILD_CFLAGS}' \ - 'HOST_LDFLAGS=${BUILD_LDFLAGS}' \ \ 'PREFIX=${prefix}' \ 'MULTILIB=${baselib}' \
Signature · 1 line
2.17.0
Re: [meta-oe][PATCH 5/8] luajit: Dont use BUILD_LDFLAGS when compiling host binaries
Quoted 10 lines · Khem Raj
BUILD_LDFLAGSadd --dynamic-linker to point to uninative but some binaries in luajit are for 32bit build host, so even if your host has the needed runtime, it will fail to execute because uninative ldso doesn't know about multilibwe get cyptic errors like
| make[1]: execvp: host/minilua: Accessing a corrupted shared library | make[1]: *** [Makefile:610:
host/buildvm_arch.h] Error 127
Quoted 9 lines
Switch to using git for
SRC_URI, master is pointing to latest 2.0 stable, it gets us all the patches done since last 2.0.5 relases in 2017Signed-off-by Khem Raj <[email protected]>--- meta-oe/recipes-devtools/luajit/luajit_2.0.5.bb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
I think HOST_LDFLAGS should remain for the native class.
Otherwise building luajit-native might fail.
I suggest adding something like this:
EXTRA_OEMAKE_remove_class-target = "'HOST_LDFLAGS=${BUILD_LDFLAGS}'"
Re: [meta-oe][PATCH 5/8] luajit: Dont use BUILD_LDFLAGS when compiling host binaries
Hi Carlos
Thanks for your review
Quoted 21 lines · Carlos Alberto Lopez Perez
Quoted 10 lines · Khem Raj
BUILD_LDFLAGSadd --dynamic-linker to point to uninative but some binaries in luajit are for 32bit build host, so even if your host has the needed runtime, it will fail to execute because uninative ldso doesn't know about multilibwe get cyptic errors like
| make[1]: execvp: host/minilua: Accessing a corrupted shared library | make[1]: *** [Makefile:610:
host/buildvm_arch.h] Error 127Quoted 9 lines
Switch to using git for
SRC_URI, master is pointing to latest 2.0 stable, it gets us all the patches done since last 2.0.5 relases in 2017Signed-off-by Khem Raj <[email protected]>--- meta-oe/recipes-devtools/luajit/luajit_2.0.5.bb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
Quoted 8 lines
I think
HOST_LDFLAGSshould remain for the native class.Otherwise building luajit-native might fail.
I suggest adding something like this:
EXTRA_OEMAKE_remove_class-target = "'HOST_LDFLAGS=${BUILD_LDFLAGS}'"
This would be a general case where we have bbclassextend for native luajit is a special case however, where the needed build time tools are built along the target build, thats why this fix. The change you you proposed might not work in this case.
Re: [meta-oe][PATCH 5/8] luajit: Dont use BUILD_LDFLAGS when compiling host binaries
Quoted 9 lines · Khem Raj
Quoted 4 lines
I suggest adding something like this:
EXTRA_OEMAKE_remove_class-target = "'HOST_LDFLAGS=${BUILD_LDFLAGS}'"
This would be a general case where we have bbclassextend for native luajit is a special case however, where the needed build time tools are built along the target build, thats why this fix. The change you you proposed might not work in this case.
I'm carrying this change here [1]:
First I tried setting the removal without specifying a target, like in
EXTRA_OEMAKE_remove = "'HOST_LDFLAGS=${BUILD_LDFLAGS}'"
But then doing:
bitbake -f -c cleanall luajit-native
bitbake luajit-native
Will fail.
Specifying the removal only for the target class is what allowed this to work for both luajit and luajit-native
(just in case is relevant, my target machine is a raspberrypi3 (32-bit))
Regards
-------
[1]
https://github.com/Igalia/meta-webkit/blob/master/recipes-devtools/luajit/luajit_2.0.5.bbappend
Re: [meta-oe][PATCH 5/8] luajit: Dont use BUILD_LDFLAGS when compiling host binaries
Quoted 5 lines · Carlos Alberto Lopez Perez
Quoted 4 lines · Khem Raj
Quoted 4 lines
I suggest adding something like this:
EXTRA_OEMAKE_remove_class-target = "'HOST_LDFLAGS=${BUILD_LDFLAGS}'"
This idea looks right, but be aware that ${BUILD_LDFLAGS} will be expanded before being processed by _remove. Therefore any individual string within ${BUILD_LDFLAGS} will be removed from the final value of EXTRA_OEMAKE, even if it occurs somewhere other than in the value of HOST_LDFLAGS. For example:
BUILD_CFLAGS = "one two three"
BUILD_LDFLAGS = "one two three"
FOO = " \
'HOST_CFLAGS=${BUILD_CFLAGS}' \
'HOST_LDFLAGS=${BUILD_LDFLAGS}' \
"
FOO_remove_class-target = "'HOST_LDFLAGS=${BUILD_LDFLAGS}'"$ bitbake recipe -e | grep ^FOO=
FOO="'HOST_CFLAGS=one three'"
Notice how "two" has been removed from the final value of HOST_CFLAGS set within FOO.
In this case, if you want to have a HOST_LDFLAGS='...' only for native builds, it's better to use _append_class-native as required.
In general, it's usually a bug (or at least bad form) to use _remove in a recipe. It's usually reserved for custom changes in a .bbappend etc.
Re: [meta-oe][PATCH 5/8] luajit: Dont use BUILD_LDFLAGS when compiling host binaries
Quoted 24 lines · Andre McCurdy
Quoted 5 lines · Carlos Alberto Lopez Perez
Quoted 4 lines · Khem Raj
Quoted 4 lines
I suggest adding something like this:
EXTRA_OEMAKE_remove_class-target = "'HOST_LDFLAGS=${BUILD_LDFLAGS}'"
This idea looks right, but be aware that ${BUILD_LDFLAGS} will be expanded before being processed by
_remove. Therefore any individual string within ${BUILD_LDFLAGS} will be removed from the final value ofEXTRA_OEMAKE, even if it occurs somewhere other than in the value ofHOST_LDFLAGS. For example:
BUILD_CFLAGS= "one two three"
BUILD_LDFLAGS= "one two three"FOO = " \ 'HOST_CFLAGS=${BUILD_CFLAGS}' \ 'HOST_LDFLAGS=${BUILD_LDFLAGS}' \ " FOO_remove_class-target = "'HOST_LDFLAGS=${BUILD_LDFLAGS}'"
Quoted 7 lines
$ bitbake recipe -e | grep ^FOO=FOO="'HOST_CFLAGS=one three'"
Notice how "two" has been removed from the final value of
HOST_CFLAGSset within FOO.
Interesting.. didn't knew this.
Is there any way to tell _remove to only remove a string if it matches as a whole instead of removing the individual words separated by spaces? I tried escaping the quotes but didn't worked :?
Quoted 7 lines
In this case, if you want to have a HOST_LDFLAGS='...' only for native builds, it's better to use _append_class-native as required.
In general, it's usually a bug (or at least bad form) to use
_removein a recipe. It's usually reserved for custom changes in a .bbappend etc.
Indeed. And it seems this is what caused the issue with the native class for me.
Just removing the 'HOST_LDFLAGS=${BUILD_LDFLAGS}' entry directly in the luajit recipe (without a bbappend) like the original patch from Khem Raj proposed works fine.
I just checked that doing that way I can't reproduce the breakage of the native class. So please commit this original patch from Khem Raj. It is the right fix.
Thanks
Re: [meta-oe][PATCH 5/8] luajit: Dont use BUILD_LDFLAGS when compiling host binaries
Quoted 28 lines · Carlos Alberto Lopez Perez
Quoted 27 lines · Andre McCurdy
Quoted 4 lines · Carlos Alberto Lopez Perez
Quoted 3 lines · Khem Raj
Quoted 3 lines
I suggest adding something like this:
EXTRA_OEMAKE_remove_class-target = "'HOST_LDFLAGS=${BUILD_LDFLAGS}'"
This idea looks right, but be aware that ${BUILD_LDFLAGS} will be expanded before being processed by
_remove. Therefore any individual string within ${BUILD_LDFLAGS} will be removed from the final value ofEXTRA_OEMAKE, even if it occurs somewhere other than in the value ofHOST_LDFLAGS. For example:
BUILD_CFLAGS= "one two three"
BUILD_LDFLAGS= "one two three"FOO = " \ 'HOST_CFLAGS=${BUILD_CFLAGS}' \ 'HOST_LDFLAGS=${BUILD_LDFLAGS}' \ " FOO_remove_class-target = "'HOST_LDFLAGS=${BUILD_LDFLAGS}'"$ bitbake recipe -e | grep ^FOO=FOO="'HOST_CFLAGS=one three'"
Quoted 8 lines
Quoted 2 lines
Notice how "two" has been removed from the final value of
HOST_CFLAGSset within FOO.Interesting.. didn't knew this.
Is there any way to tell
_removeto only remove a string if it matches as a whole instead of removing the individual words separated by spaces? I tried escaping the quotes but didn't worked :?
I don't think there's a way to do that.
PATCH 6/8 modemmanager: upgrade to 1.7.991
In reply to Khem RajFrom: Martin Kelly <[email protected]>
This version has a ublox plugin for expanded modem support. The underlying issue that enum-conversion.patch fixes appears to already have been fixed upstream, so we can drop the patch.
---
.../modemmanager/enum-conversion.patch | 21 -------------------
...nager_1.6.4.bb => modemmanager_1.7.991.bb} | 9 ++++----
2 files changed, 4 insertions(+), 26 deletions(-)
delete mode 100644 meta-oe/recipes-connectivity/modemmanager/modemmanager/enum-conversion.patch
rename meta-oe/recipes-connectivity/modemmanager/{modemmanager_1.6.4.bb => modemmanager_1.7.991.bb} (88%)meta-oe/recipes-connectivity/modemmanager/modemmanager/enum-conversion.patch deleted +0 -21
@@ -1,21 +0,0 @@ -Fixes errors found bt Clang - -| ../../ModemManager-1.6.4/src/mm-bearer-qmi.c:774:50: error: implicit conversion from enumeration type 'MMBearerStatus' to different enumeration type 'MMBearerConnectionStatus' [-Werror,-Wenum-conversion] -| MMBearerConnectionStatus bearer_status = mm_base_bearer_get_status (MM_BASE_BEARER (self)); -| ~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| 1 error generated. - - -Index: ModemManager-1.6.4/src/mm-bearer-qmi.c -=================================================================== ---- ModemManager-1.6.4.orig/src/mm-bearer-qmi.c -+++ ModemManager-1.6.4/src/mm-bearer-qmi.c -@@ -771,7 +771,7 @@ packet_service_status_indication_cb (Qmi - &connection_status, - NULL, - NULL)) { -- MMBearerConnectionStatus bearer_status = mm_base_bearer_get_status (MM_BASE_BEARER (self)); -+ MMBearerConnectionStatus bearer_status = (MMBearerConnectionStatus)mm_base_bearer_get_status (MM_BASE_BEARER (self)); - - if (connection_status == QMI_WDS_CONNECTION_STATUS_DISCONNECTED && - bearer_status != MM_BEARER_CONNECTION_STATUS_DISCONNECTED &&
meta-oe/recipes-connectivity/modemmanager/modemmanager_1.7.991.bb renamed from meta-oe/recipes-connectivity/modemmanager/modemmanager_1.6.4.bb +4 -5
@@ -11,11 +11,10 @@ inherit gnomebase gettext systemd vala gobject-introspection bash-completion DEPENDS = "glib-2.0 libgudev dbus-glib intltool-native" -SRC_URI = "http://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz \ - file://enum-conversion.patch \ -" -SRC_URI[md5sum] = "06488186c7dd53f8104183b86f7a1568" -SRC_URI[sha256sum] = "cdd5b4cb1e4d7643643a28ccbfc4bb354bfa9cb89a77ea160ebdf7926171c668" +SRC_URI = "http://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz" + +SRC_URI[md5sum] = "4efe6a240cef212bf8855c95424e7c7f" +SRC_URI[sha256sum] = "4e366243bd4983f2e6efe35cb901cf5da51939307b5d6299fe622a9fcf411745" S = "${WORKDIR}/ModemManager-${PV}"
Signature · 1 line
2.17.0
PATCH 7/8 modemmanager: fix mbim disable string
In reply to Khem RajFrom: Martin Kelly <[email protected]>
The current string used to disable mbim is "--enable-mbim=no", which is producing a warning. It should be "--with-mdim=no", so change it.
--- .../recipes-connectivity/modemmanager/modemmanager_1.7.991.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-connectivity/modemmanager/modemmanager_1.7.991.bb +1 -1
@@ -25,7 +25,7 @@ PACKAGECONFIG ??= "mbim qmi polkit \ PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,," PACKAGECONFIG[polkit] = "--with-polkit=yes,--with-polkit=no,polkit" # Support WWAN modems and devices which speak the Mobile Interface Broadband Model (MBIM) protocol. -PACKAGECONFIG[mbim] = "--with-mbim,--enable-mbim=no,libmbim" +PACKAGECONFIG[mbim] = "--with-mbim,--with-mbim=no,libmbim" # Support WWAN modems and devices which speak the Qualcomm MSM Interface (QMI) protocol. PACKAGECONFIG[qmi] = "--with-qmi,--without-qmi,libqmi"
Signature · 1 line
2.17.0
PATCH 8/8 rocksdb: Fix build with gcc8
In reply to Khem Raj--- ...Fix-GitHub-issue-3716-gcc-8-warnings.patch | 194 ++++++++++++++++++ meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb | 4 +- 2 files changed, 197 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-dbs/rocksdb/rocksdb/0001-Fix-GitHub-issue-3716-gcc-8-warnings.patch
meta-oe/recipes-dbs/rocksdb/rocksdb/0001-Fix-GitHub-issue-3716-gcc-8-warnings.patch new file +194 -0
@@ -0,0 +1,194 @@ +From 8d65d70b54d1d306a0a0b00e036bc8ddd39d8ec1 Mon Sep 17 00:00:00 2001 +From: "[email protected]" <[email protected]> +Date: Fri, 20 Apr 2018 13:28:05 -0700 +Subject: [PATCH] Fix GitHub issue #3716: gcc-8 warnings + +Summary: +Fix the following gcc-8 warnings: +- conflicting C language linkage declaration [-Werror] +- writing to an object with no trivial copy-assignment [-Werror=class-memaccess] +- array subscript -1 is below array bounds [-Werror=array-bounds] + +Solves https://github.com/facebook/rocksdb/issues/3716 +Closes https://github.com/facebook/rocksdb/pull/3736 + +Differential Revision: D7684161 + +Pulled By: yiwu-arbug + +fbshipit-source-id: 47c0423d26b74add251f1d3595211eee1e41e54a +--- +Signed-off-by: Khem Raj <[email protected]> +Upstream-Status: Backport [https://github.com/facebook/rocksdb/commit/dee95a1afc6c63515e7d94dec33acdb79638b6d7.patch] + + db/c.cc | 77 ++++++++++++++------------------------- + memtable/inlineskiplist.h | 12 +++--- + 2 files changed, 33 insertions(+), 56 deletions(-) + +diff --git a/db/c.cc b/db/c.cc +index 064103ed4..0d485d096 100644 +--- a/db/c.cc ++++ b/db/c.cc +@@ -1388,23 +1388,24 @@ void rocksdb_writebatch_put_log_data( + b->rep.PutLogData(Slice(blob, len)); + } + ++class H : public WriteBatch::Handler { ++ public: ++ void* state_; ++ void (*put_)(void*, const char* k, size_t klen, const char* v, size_t vlen); ++ void (*deleted_)(void*, const char* k, size_t klen); ++ virtual void Put(const Slice& key, const Slice& value) override { ++ (*put_)(state_, key.data(), key.size(), value.data(), value.size()); ++ } ++ virtual void Delete(const Slice& key) override { ++ (*deleted_)(state_, key.data(), key.size()); ++ } ++}; ++ + void rocksdb_writebatch_iterate( + rocksdb_writebatch_t* b, + void* state, + void (*put)(void*, const char* k, size_t klen, const char* v, size_t vlen), + void (*deleted)(void*, const char* k, size_t klen)) { +- class H : public WriteBatch::Handler { +- public: +- void* state_; +- void (*put_)(void*, const char* k, size_t klen, const char* v, size_t vlen); +- void (*deleted_)(void*, const char* k, size_t klen); +- virtual void Put(const Slice& key, const Slice& value) override { +- (*put_)(state_, key.data(), key.size(), value.data(), value.size()); +- } +- virtual void Delete(const Slice& key) override { +- (*deleted_)(state_, key.data(), key.size()); +- } +- }; + H handler; + handler.state_ = state; + handler.put_ = put; +@@ -1649,18 +1650,6 @@ void rocksdb_writebatch_wi_iterate( + void* state, + void (*put)(void*, const char* k, size_t klen, const char* v, size_t vlen), + void (*deleted)(void*, const char* k, size_t klen)) { +- class H : public WriteBatch::Handler { +- public: +- void* state_; +- void (*put_)(void*, const char* k, size_t klen, const char* v, size_t vlen); +- void (*deleted_)(void*, const char* k, size_t klen); +- virtual void Put(const Slice& key, const Slice& value) override { +- (*put_)(state_, key.data(), key.size(), value.data(), value.size()); +- } +- virtual void Delete(const Slice& key) override { +- (*deleted_)(state_, key.data(), key.size()); +- } +- }; + H handler; + handler.state_ = state; + handler.put_ = put; +@@ -3109,20 +3098,21 @@ void rocksdb_slicetransform_destroy(rocksdb_slicetransform_t* st) { + delete st; + } + ++struct Wrapper : public rocksdb_slicetransform_t { ++ const SliceTransform* rep_; ++ ~Wrapper() { delete rep_; } ++ const char* Name() const override { return rep_->Name(); } ++ Slice Transform(const Slice& src) const override { ++ return rep_->Transform(src); ++ } ++ bool InDomain(const Slice& src) const override { ++ return rep_->InDomain(src); ++ } ++ bool InRange(const Slice& src) const override { return rep_->InRange(src); } ++ static void DoNothing(void*) { } ++}; ++ + rocksdb_slicetransform_t* rocksdb_slicetransform_create_fixed_prefix(size_t prefixLen) { +- struct Wrapper : public rocksdb_slicetransform_t { +- const SliceTransform* rep_; +- ~Wrapper() { delete rep_; } +- const char* Name() const override { return rep_->Name(); } +- Slice Transform(const Slice& src) const override { +- return rep_->Transform(src); +- } +- bool InDomain(const Slice& src) const override { +- return rep_->InDomain(src); +- } +- bool InRange(const Slice& src) const override { return rep_->InRange(src); } +- static void DoNothing(void*) { } +- }; + Wrapper* wrapper = new Wrapper; + wrapper->rep_ = rocksdb::NewFixedPrefixTransform(prefixLen); + wrapper->state_ = nullptr; +@@ -3131,19 +3121,6 @@ rocksdb_slicetransform_t* rocksdb_slicetransform_create_fixed_prefix(size_t pref + } + + rocksdb_slicetransform_t* rocksdb_slicetransform_create_noop() { +- struct Wrapper : public rocksdb_slicetransform_t { +- const SliceTransform* rep_; +- ~Wrapper() { delete rep_; } +- const char* Name() const override { return rep_->Name(); } +- Slice Transform(const Slice& src) const override { +- return rep_->Transform(src); +- } +- bool InDomain(const Slice& src) const override { +- return rep_->InDomain(src); +- } +- bool InRange(const Slice& src) const override { return rep_->InRange(src); } +- static void DoNothing(void*) { } +- }; + Wrapper* wrapper = new Wrapper; + wrapper->rep_ = rocksdb::NewNoopTransform(); + wrapper->state_ = nullptr; +diff --git a/memtable/inlineskiplist.h b/memtable/inlineskiplist.h +index 702a7336d..eadda1dc1 100644 +--- a/memtable/inlineskiplist.h ++++ b/memtable/inlineskiplist.h +@@ -280,7 +280,7 @@ struct InlineSkipList<Comparator>::Node { + // next_[0]. This is used for passing data from AllocateKey to Insert. + void StashHeight(const int height) { + assert(sizeof(int) <= sizeof(next_[0])); +- memcpy(&next_[0], &height, sizeof(int)); ++ memcpy(static_cast<void*>(&next_[0]), &height, sizeof(int)); + } + + // Retrieves the value passed to StashHeight. Undefined after a call +@@ -300,30 +300,30 @@ struct InlineSkipList<Comparator>::Node { + assert(n >= 0); + // Use an 'acquire load' so that we observe a fully initialized + // version of the returned Node. +- return (next_[-n].load(std::memory_order_acquire)); ++ return ((&next_[0] - n)->load(std::memory_order_acquire)); + } + + void SetNext(int n, Node* x) { + assert(n >= 0); + // Use a 'release store' so that anybody who reads through this + // pointer observes a fully initialized version of the inserted node. +- next_[-n].store(x, std::memory_order_release); ++ (&next_[0] - n)->store(x, std::memory_order_release); + } + + bool CASNext(int n, Node* expected, Node* x) { + assert(n >= 0); +- return next_[-n].compare_exchange_strong(expected, x); ++ return (&next_[0] - n)->compare_exchange_strong(expected, x); + } + + // No-barrier variants that can be safely used in a few locations. + Node* NoBarrier_Next(int n) { + assert(n >= 0); +- return next_[-n].load(std::memory_order_relaxed); ++ return (&next_[0] - n)->load(std::memory_order_relaxed); + } + + void NoBarrier_SetNext(int n, Node* x) { + assert(n >= 0); +- next_[-n].store(x, std::memory_order_relaxed); ++ (&next_[0] - n)->store(x, std::memory_order_relaxed); + } + + // Insert node after prev on specific level. +-- +2.17.0 +
meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb +3 -1
@@ -10,7 +10,9 @@ SRCREV = "8969445642039566214d650cc6614849e7dd5e17" SRCBRANCH = "5.12.fb" PV = "5.12.2" -SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH}" +SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \ + file://0001-Fix-GitHub-issue-3716-gcc-8-warnings.patch \ + " S = "${WORKDIR}/git"
Signature · 1 line
2.17.0