Skip to contentSkip to conversation

googlebenchmark: Update patch and its status to backport

PATCH New Khem Raj 1 participant 2 messages Jun 8, 2024

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 googlebenchmark: Update patch and its status to backport

---
 ...ype-conversion-to-match-function-ret.patch | 21 +++++++++----------
 1 file changed, 10 insertions(+), 11 deletions(-)
meta-oe/recipes-support/googlebenchmark/googlebenchmark/0001-cycleclock-Fix-type-conversion-to-match-function-ret.patch +10 -11
index d514cf192b..3017314abe 100644
@@ -1,7 +1,8 @@
-From db704bcc344529039d7fb28be380658625a9c08d Mon Sep 17 00:00:00 2001
+From 7f0e99af540a333108b92d792923ec7fc9e9fad9 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
-Date: Tue, 28 May 2024 19:34:43 -0700
+Date: Tue, 28 May 2024 20:14:54 -0700
 Subject: [PATCH] cycleclock: Fix type conversion to match function return type
+ (#1794)
 
 fixes build with clang19
 
@@ -10,25 +11,23 @@ src/cycleclock.h:208:52: error: implicit conversion changes signedness: 'uint64_
       |   ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
 1 error generated.
 
-Upstream-Status: Submitted [https://github.com/google/benchmark/pull/1794]
+Upstream-Status: Backport [https://github.com/google/benchmark/commit/7f0e99af540a333108b92d792923ec7fc9e9fad9]
 Signed-off-by: Khem Raj <[email protected]>
 ---
- src/cycleclock.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ src/cycleclock.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/cycleclock.h b/src/cycleclock.h
-index a2584376..f96801c5 100644
+index a25843760..c657414e5 100644
 --- a/src/cycleclock.h
 +++ b/src/cycleclock.h
-@@ -205,7 +205,7 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
+@@ -205,7 +205,8 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
        "sub %0, zero, %0\n"
        "and %1, %1, %0\n"
        : "=r"(cycles_hi0), "=r"(cycles_lo), "=r"(cycles_hi1));
 -  return (static_cast<uint64_t>(cycles_hi1) << 32) | cycles_lo;
-+  return static_cast<int64_t>((static_cast<uint64_t>(cycles_hi1) << 32) | cycles_lo);
++  return static_cast<int64_t>((static_cast<uint64_t>(cycles_hi1) << 32) |
++                              cycles_lo);
  #else
    uint64_t cycles;
    asm volatile("rdtime %0" : "=r"(cycles));
--- 
-2.45.1
-
author
#1 lore raw

PATCH 2/2 networkmanager: Fix undefined symbol errors on musl+lld

---
 ...re-Disable-sd_dhcp6_client_set_duid_.patch | 65 +++++++++++++++++++
 .../networkmanager/networkmanager_1.48.0.bb   |  1 +
 2 files changed, 66 insertions(+)
 create mode 100644 meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-libnm-systemd-core-Disable-sd_dhcp6_client_set_duid_.patch
meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-libnm-systemd-core-Disable-sd_dhcp6_client_set_duid_.patch new file +65 -0
new file mode 100644
index 0000000000..8e246efe01
@@ -0,0 +1,65 @@
+From 34d7a6c9919a73c2e716835000944c17438b2ca1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 7 Jun 2024 14:03:15 -0700
+Subject: [PATCH] libnm-systemd-core: Disable sd_dhcp6_client_set_duid_uuid
+ function
+
+When building on musl systems ( with out systemd ), and using LLD linker
+from LLVM project we fail to link with undefined symbols.
+
+This symbol is in sd_id128.c but its disabled, so let disable the functions
+which need this function.
+
+| x86_64-yoe-linux-musl-ld.lld: error: undefined symbol: sd_id128_get_machine_app_specific
+| >>> referenced by sd-dhcp-duid.c:202 (/usr/src/debug/networkmanager/1.48.0/../NetworkManager-1.48.0/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c:202)
+| >>>               libnm-systemd-core.a.p/src_libsystemd-network_sd-dhcp-duid.c.o:(sd_dhcp_duid_set_uuid) in archive src/libnm-systemd-core/libnm-systemd-core.a
+| x86_64-yoe-linux-musl-clang: error: linker command failed with exit code 1 (use -v to see invocation)
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1966]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c   | 2 ++
+ .../src/libsystemd-network/sd-dhcp6-client.c                   | 3 ++-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c
+index e664a4a..7ba5020 100644
+--- a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c
++++ b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c
+@@ -193,6 +193,7 @@ int sd_dhcp_duid_set_en(sd_dhcp_duid *duid) {
+         return 0;
+ }
+ 
++#if 0
+ int sd_dhcp_duid_set_uuid(sd_dhcp_duid *duid) {
+         sd_id128_t machine_id;
+         int r;
+@@ -209,6 +210,7 @@ int sd_dhcp_duid_set_uuid(sd_dhcp_duid *duid) {
+         duid->size = offsetof(struct duid, uuid.uuid) + sizeof(machine_id);
+         return 0;
+ }
++#endif
+ 
+ int dhcp_duid_to_string_internal(uint16_t type, const void *data, size_t data_size, char **ret) {
+         _cleanup_free_ char *p = NULL, *x = NULL;
+diff --git a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c
+index 7c20116..08c1e96 100644
+--- a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c
++++ b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c
+@@ -244,6 +244,7 @@ int sd_dhcp6_client_set_duid_en(sd_dhcp6_client *client) {
+         return 0;
+ }
+ 
++#if 0
+ int sd_dhcp6_client_set_duid_uuid(sd_dhcp6_client *client) {
+         int r;
+ 
+@@ -256,7 +257,7 @@ int sd_dhcp6_client_set_duid_uuid(sd_dhcp6_client *client) {
+ 
+         return 0;
+ }
+-
++#endif
+ int sd_dhcp6_client_set_duid_raw(sd_dhcp6_client *client, uint16_t duid_type, const uint8_t *duid, size_t duid_len) {
+         int r;
+ 
meta-networking/recipes-connectivity/networkmanager/networkmanager_1.48.0.bb +1 -0
index 1355e52a6e..47287951f5 100644
@@ -40,6 +40,7 @@ SRC_URI = " \
     file://${BPN}.initd \
     file://enable-dhcpcd.conf \
     file://enable-iwd.conf \
+    file://0001-libnm-systemd-core-Disable-sd_dhcp6_client_set_duid_.patch \
 "
 SRC_URI:append:libc-musl = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' file://0001-linker-scripts-Do-not-export-_IO_stdin_used.patch', '', d)}"