From patchwork Tue Jan 17 23:18:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 18266 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11964C00A5A for ; Tue, 17 Jan 2023 23:19:00 +0000 (UTC) Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by mx.groups.io with SMTP id smtpd.web11.2329.1673997536201441152 for ; Tue, 17 Jan 2023 15:18:56 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=TRpzk9mw; spf=pass (domain: gmail.com, ip: 209.85.215.178, mailfrom: raj.khem@gmail.com) Received: by mail-pg1-f178.google.com with SMTP id v3so23213890pgh.4 for ; Tue, 17 Jan 2023 15:18:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=52afRuTBFIeZi9VjyqaZIFifJU0ajOBYsOLlBGSzMAw=; b=TRpzk9mw6Wh0lb/zaXNPFpeLNoefgkw1Uqn+pVNVpmjlsdR43dHfcLtFKk+ux2RwM4 Nbgm2oKRk+1zk/qbjA8exrgEnnmrVgzqrKYCEG7wUm3fXgME3+Cmed0fQzbLTPKqPTC1 n099ZfH1Sc5drdyVUkxCF7NcgSEdcQ0Gig/NwheAszY2WvMGzYe+CDoHjPSm1KdEGLk0 WCSbqtb7PM41LiDBP4359/m3eZFHDMMuVvUsbaagVeo0dU7iKZosTsHqtQzFdcSgv39l ss9J3Z46ROsjeLQe0bgZlcrHlAIJQ4G6EQC8rOY3gSkUE5KLReyZZTOnV/DIfLXt0ObH 7tQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=52afRuTBFIeZi9VjyqaZIFifJU0ajOBYsOLlBGSzMAw=; b=2I8uXco7xULcmIM9Hn5o28XW1tZJgXZhzHyiaSDH20Xj8838lS/SOMep7L0u2zwDet MVggJdh1LVtL+m2uZxdMlYBF0OaWcqgnXdIZnjeO5YglRLNmEVilUpF3MC56yPQYcDh1 Iab3lVGpkIjuvT89IpPBFuhRjkblk7PuxPvHWJModFjp8zo9ITE7F8hua6aBFvGWAZlm sJAvv6sY8p5iqlJ/LRzbVgwvYg4lZckbavrNly2XcdW1HPtbdfx7qLWecuQ9EXMFJwQE RIZkPrgIbeZQjnq9FJnJZ4lfw8I9zwDzpyvseVZ5/8q05Dtu4eT3LsoGDqIQi3v0OyHd xqJg== X-Gm-Message-State: AFqh2kp4ntFGWgeCThCJmoole37wc3hPJ2sW1fcxodRmvwC+XknLHAeh mDUOrvRYk1xtXOF05rNRngAAHof2f6osWw== X-Google-Smtp-Source: AMrXdXsE3IYnsz27ebYRCu73NBiQeIfglyQORgaGFG+CA8qovYSet25yqTnGj25R1R6SgAT9MFMoPw== X-Received: by 2002:aa7:92d4:0:b0:58d:bb59:7112 with SMTP id k20-20020aa792d4000000b0058dbb597112mr3801899pfa.22.1673997535195; Tue, 17 Jan 2023 15:18:55 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9181:1cf0::b940]) by smtp.gmail.com with ESMTPSA id y15-20020aa7942f000000b0058d92d6e4ddsm5445717pfo.5.2023.01.17.15.18.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 15:18:54 -0800 (PST) From: Khem Raj To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 1/4] mdadm: Define alignof using _Alignof when using C11 or newer Date: Tue, 17 Jan 2023 15:18:50 -0800 Message-Id: <20230117231853.1511529-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jan 2023 23:19:00 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/176066 Signed-off-by: Khem Raj --- ...sing-_Alignof-when-using-C11-or-newe.patch | 52 +++++++++++++++++++ meta/recipes-extended/mdadm/mdadm_4.2.bb | 1 + 2 files changed, 53 insertions(+) create mode 100644 meta/recipes-extended/mdadm/files/0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch diff --git a/meta/recipes-extended/mdadm/files/0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch b/meta/recipes-extended/mdadm/files/0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch new file mode 100644 index 0000000000..1c472886b3 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch @@ -0,0 +1,52 @@ +From 82c893bb9e01f914a6bdef1bef943af746cfc3e1 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 15 Jan 2023 12:42:18 -0800 +Subject: [PATCH] Define alignof using _Alignof when using C11 or newer + +WG14 N2350 made very clear that it is an UB having type definitions +within "offsetof" [1]. This patch enhances the implementation of macro +alignof_slot to use builtin "_Alignof" to avoid undefined behavior on +when using std=c11 or newer + +clang 16+ has started to flag this [2] + +Fixes build when using -std >= gnu11 and using clang16+ + +Older compilers gcc < 4.9 or clang < 8 has buggy _Alignof even though it +may support C11, exclude those compilers too + +[1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm +[2] https://reviews.llvm.org/D133574 + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + sha1.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/sha1.c b/sha1.c +index 89b32f4..1e4ad5d 100644 +--- a/sha1.c ++++ b/sha1.c +@@ -229,7 +229,17 @@ sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx) + if (len >= 64) + { + #if !_STRING_ARCH_unaligned +-# define alignof(type) offsetof (struct { char c; type x; }, x) ++/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 ++ . ++ clang versions < 8.0.0 have the same bug. */ ++# if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ ++ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ ++ && !defined __clang__) \ ++ || (defined __clang__ && __clang_major__ < 8)) ++# define alignof(type) offsetof (struct { char c; type x; }, x) ++# else ++# define alignof(type) _Alignof(type) ++# endif + # define UNALIGNED_P(p) (((size_t) p) % alignof (sha1_uint32) != 0) + if (UNALIGNED_P (buffer)) + while (len > 64) +-- +2.39.0 + diff --git a/meta/recipes-extended/mdadm/mdadm_4.2.bb b/meta/recipes-extended/mdadm/mdadm_4.2.bb index 7298860241..1c4397509b 100644 --- a/meta/recipes-extended/mdadm/mdadm_4.2.bb +++ b/meta/recipes-extended/mdadm/mdadm_4.2.bb @@ -25,6 +25,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \ file://0001-Fix-parsing-of-r-in-monitor-manager-mode.patch \ file://0001-Makefile-install-mdcheck.patch \ file://0001-restripe.c-Use-_FILE_OFFSET_BITS-to-enable-largefile.patch \ + file://0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \ " SRC_URI[sha256sum] = "461c215670864bb74a4d1a3620684aa2b2f8296dffa06743f26dda5557acf01d" From patchwork Tue Jan 17 23:18:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 18267 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23D05C6379F for ; Tue, 17 Jan 2023 23:19:00 +0000 (UTC) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by mx.groups.io with SMTP id smtpd.web10.2255.1673997536761078161 for ; Tue, 17 Jan 2023 15:18:56 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FC/Dikv7; spf=pass (domain: gmail.com, ip: 209.85.215.181, mailfrom: raj.khem@gmail.com) Received: by mail-pg1-f181.google.com with SMTP id e10so23204153pgc.9 for ; Tue, 17 Jan 2023 15:18:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SeyTYKAju90T13CMCu3GIZ4bX2HzU7ilzl2u7eq+88E=; b=FC/Dikv7QtRd4B+TGV+G7GVuvIKZB0qW6pO012Hv2pTZe6ducxiMxQjxU01S4U5zvG 6a/mvFd8OmJeuBrZ5uhGkEbbRuJu2i4kwrVmLxTg1bbG28EJRCPY2Q5kgXu0iHEcFNNk E6b2FyFqA0SOUUvBU3btqNmEa4YfSAqTz2FnfHdVymDyZqrrbmnfpijXr63oMEKnS4qZ MNSi439QHUivJXuCnLUqOxlqbjeqnMjRg4xUnCJbwwNsvj3CyQQDDxkcDd2iv71bb4K5 oxRPH2VtJaAmzB6qTgC3EqkMiUsr+AoIZBfqfhrPv+6dLfLT7kHpO7roOH63zXyepTzU wdpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SeyTYKAju90T13CMCu3GIZ4bX2HzU7ilzl2u7eq+88E=; b=bF6rkLadB4P05dmyWnsNpBgWyDDFynVV4xy7JOIK/yVDs4O/6iHx0mG0czbgacClnq GIUP+1OYJGlrtOXt/QH4SCA1YRDZdnpYQCFV6g6Jz8Te3SxJJsicR8NM3nlcz9j4sxZg S3coceiCpl5mNjPWU03C0vEoduQWRp6xrF70HHtAWNUogSh6rah10KxaAunl/l3zy0m/ 5qk0xa5KiffKgGJsa9a05g+BaMfCyToFUmS8gsQuqxWBtf9Zz8VrD6TWtIjwnbAn324g HMUaZLageSsB7kdZ7rWWvyWrWxnAWT7PHZrMDkBQS1mrvvH5dPiWz+ZnWCSmS0qe4tm/ w4Hg== X-Gm-Message-State: AFqh2kqHoagVYeo9OX42Ndd5/MdlIkLJGmHoyrviA/zMzysAZC/T7/tz UzvH1RuwYsF2/48r0iq4JoQnj0kWpMXxag== X-Google-Smtp-Source: AMrXdXutnf2X766kASdv4GRTv/MDX8IgAZCZMTk7XgNpCIHFTIwfxX71oTMpyUI7GA39vDahTlCktw== X-Received: by 2002:a05:6a00:1585:b0:578:8864:b25c with SMTP id u5-20020a056a00158500b005788864b25cmr6837553pfk.25.1673997535900; Tue, 17 Jan 2023 15:18:55 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9181:1cf0::b940]) by smtp.gmail.com with ESMTPSA id y15-20020aa7942f000000b0058d92d6e4ddsm5445717pfo.5.2023.01.17.15.18.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 15:18:55 -0800 (PST) From: Khem Raj To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 2/4] python3-numpy: Define _ALIGN using _Alignof when using C11 or newer Date: Tue, 17 Jan 2023 15:18:51 -0800 Message-Id: <20230117231853.1511529-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230117231853.1511529-1-raj.khem@gmail.com> References: <20230117231853.1511529-1-raj.khem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jan 2023 23:19:00 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/176067 Signed-off-by: Khem Raj --- ...ing-_Alignof-when-using-C11-or-newer.patch | 77 +++++++++++++++++++ .../python/python3-numpy_1.24.1.bb | 1 + 2 files changed, 78 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-numpy/0001-Define-_ALIGN-using-_Alignof-when-using-C11-or-newer.patch diff --git a/meta/recipes-devtools/python/python3-numpy/0001-Define-_ALIGN-using-_Alignof-when-using-C11-or-newer.patch b/meta/recipes-devtools/python/python3-numpy/0001-Define-_ALIGN-using-_Alignof-when-using-C11-or-newer.patch new file mode 100644 index 0000000000..97391e2c12 --- /dev/null +++ b/meta/recipes-devtools/python/python3-numpy/0001-Define-_ALIGN-using-_Alignof-when-using-C11-or-newer.patch @@ -0,0 +1,77 @@ +From f9ac08a0fea543d68b2dba540093bd079e50be47 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 15 Jan 2023 15:49:09 -0800 +Subject: [PATCH] Define _ALIGN using _Alignof when using C11 or newer + +WG14 N2350 made very clear that it is an UB having type definitions +within "offsetof" [1]. This patch enhances the implementation of macro +_ALIGN to use builtin "_Alignof" to avoid undefined behavior on +when using std=c11 or newer + +clang 16+ has started to flag this [2] + +Fixes build when using -std >= gnu11 and using clang16+ + +Older compilers gcc < 4.9 or clang < 8 has buggy _Alignof even though it +may support C11, exclude those compilers too + +[1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm +[2] https://reviews.llvm.org/D133574 + +Upstream-Status: Submitted [https://github.com/numpy/numpy/pull/23016] +Signed-off-by: Khem Raj +--- + numpy/core/src/multiarray/arraytypes.c.src | 13 +++++++++++-- + numpy/core/src/multiarray/common.h | 12 +++++++++++- + 2 files changed, 22 insertions(+), 3 deletions(-) + +diff --git a/numpy/core/src/multiarray/arraytypes.c.src b/numpy/core/src/multiarray/arraytypes.c.src +index c03d09784..683917220 100644 +--- a/numpy/core/src/multiarray/arraytypes.c.src ++++ b/numpy/core/src/multiarray/arraytypes.c.src +@@ -224,8 +224,17 @@ MyPyLong_AsUnsigned@Type@(PyObject *obj) + ** GETITEM AND SETITEM ** + ***************************************************************************** + */ +- +-#define _ALIGN(type) offsetof(struct {char c; type v;}, v) ++/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 ++ . ++ clang versions < 8.0.0 have the same bug. */ ++#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ ++ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ ++ && !defined __clang__) \ ++ || (defined __clang__ && __clang_major__ < 8)) ++# define _ALIGN(type) offsetof(struct {char c; type v;}, v) ++#else ++# define _ALIGN(type) _Alignof(type) ++#endif + /* + * Disable harmless compiler warning "4116: unnamed type definition in + * parentheses" which is caused by the _ALIGN macro. +diff --git a/numpy/core/src/multiarray/common.h b/numpy/core/src/multiarray/common.h +index 3de8c842d..d01074c45 100644 +--- a/numpy/core/src/multiarray/common.h ++++ b/numpy/core/src/multiarray/common.h +@@ -178,7 +178,17 @@ check_and_adjust_axis(int *axis, int ndim) + } + + /* used for some alignment checks */ +-#define _ALIGN(type) offsetof(struct {char c; type v;}, v) ++/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 ++ . ++ clang versions < 8.0.0 have the same bug. */ ++#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ ++ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ ++ && !defined __clang__) \ ++ || (defined __clang__ && __clang_major__ < 8)) ++# define _ALIGN(type) offsetof(struct {char c; type v;}, v) ++#else ++# define _ALIGN(type) _Alignof(type) ++#endif + #define _UINT_ALIGN(type) npy_uint_alignment(sizeof(type)) + /* + * Disable harmless compiler warning "4116: unnamed type definition in +-- +2.39.0 + diff --git a/meta/recipes-devtools/python/python3-numpy_1.24.1.bb b/meta/recipes-devtools/python/python3-numpy_1.24.1.bb index 83b8ac4232..adac08b3e1 100644 --- a/meta/recipes-devtools/python/python3-numpy_1.24.1.bb +++ b/meta/recipes-devtools/python/python3-numpy_1.24.1.bb @@ -10,6 +10,7 @@ SRCNAME = "numpy" SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${SRCNAME}-${PV}.tar.gz \ file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \ file://0001-numpy-core-Define-RISCV-32-support.patch \ + file://0001-Define-_ALIGN-using-_Alignof-when-using-C11-or-newer.patch \ file://run-ptest \ " SRC_URI[sha256sum] = "2386da9a471cc00a1f47845e27d916d5ec5346ae9696e01a8a34760858fe9dd2" From patchwork Tue Jan 17 23:18:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 18268 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FC06C38142 for ; Tue, 17 Jan 2023 23:19:00 +0000 (UTC) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mx.groups.io with SMTP id smtpd.web11.2332.1673997537748428138 for ; Tue, 17 Jan 2023 15:18:57 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=TjI6DM6X; spf=pass (domain: gmail.com, ip: 209.85.215.169, mailfrom: raj.khem@gmail.com) Received: by mail-pg1-f169.google.com with SMTP id g68so22110605pgc.11 for ; Tue, 17 Jan 2023 15:18:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lgA4V5mKpPFbUq5eH77Mq406hQBJ1H+mElV4w63Iii4=; b=TjI6DM6X/D/3WYETwq7htHAj4Hrkw9owB1vnYE3QTW4Yx5NLIxVYDmZkOS88kdLIJv WZ/JW3k3j/ADr4GFioKbDGtiza1VhHipXgFTlMK7rPVK76aLIxBUQ4eo3gVa8yJ8s7XS yv+FX/f/JlDqWBa//WG2UzDeNsd4uhXc+re9hImJRXWCxp4xPuhi1ak+8vft3ssuqM/c ysu7gjo/b4mFNt2ETuz7GOaLiUkg/I9JgjIqL1F6NmEIkoTduBbNOGTOsr8Brxzy55aD bSo9B71OL1Oyfmqm34wK61EBl8ajvBcrHvWLY6zkp3KR4DIik64zWGg+DML7Jmn2UgY/ 0CqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lgA4V5mKpPFbUq5eH77Mq406hQBJ1H+mElV4w63Iii4=; b=oTNk5XTLVR1rvKXqsXA16Mkx4CEvUdvXaXEHgKBI3jHsNaSF5BZz1DXIpCiHaSE09H Xwv0EExmMXRynBCjVIAmiAaVeV6sSWZ70Q9KvpR1F6WRnPQtSLpFUlWgEcy98F6ZHdwC QilIrr6eZWUmGQcoVyI4dwnXdGL0zrOLHIaWVBvkGlcG5UVMMjEGFoXldcd99Z4AZjAm cOUZNSUyZujNW3+XCC5dTcSDlVuZTrxPlUo+J17vKz8kARGZPmgpRpKJB66ffa6qHyok CN2A7EeUo4pSaCfNIL6x3grWKFL9r6iTPn13MRf2C/P4aumXKIB/Xj3ll1/Wygv4vWap jndQ== X-Gm-Message-State: AFqh2kqHzzny/1IxgpvNeFZf6P6QGybDyGnVGvisuMaDCZijmkrpMpFS 6yPC2D5DPgqfdfUjbHnZK7deWRjyB81UrQ== X-Google-Smtp-Source: AMrXdXsogwMzYmfpU5fjMEyWgzr+ub0H/kXKqGawz183HD3C+8JJgEQ6Kx/gr3Z+fSgM+gHd3gRD/g== X-Received: by 2002:a05:6a00:4c9c:b0:56e:a7a7:35a0 with SMTP id eb28-20020a056a004c9c00b0056ea7a735a0mr6034919pfb.25.1673997536880; Tue, 17 Jan 2023 15:18:56 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9181:1cf0::b940]) by smtp.gmail.com with ESMTPSA id y15-20020aa7942f000000b0058d92d6e4ddsm5445717pfo.5.2023.01.17.15.18.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 15:18:56 -0800 (PST) From: Khem Raj To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 3/4] vulkan-samples: Drop using u8string_view Date: Tue, 17 Jan 2023 15:18:52 -0800 Message-Id: <20230117231853.1511529-3-raj.khem@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230117231853.1511529-1-raj.khem@gmail.com> References: <20230117231853.1511529-1-raj.khem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jan 2023 23:19:00 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/176068 Its deprecated in upstream fmt as well. Moreover it helps compile with latest compiler Signed-off-by: Khem Raj --- .../0001-Deprecate-u8string_view.patch | 59 +++++++++++++++++++ .../vulkan/vulkan-samples_git.bb | 1 + 2 files changed, 60 insertions(+) create mode 100644 meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch new file mode 100644 index 0000000000..c2304bdd48 --- /dev/null +++ b/meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch @@ -0,0 +1,59 @@ +From 93987b1ce7d6f91387202495aac61026070597df Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 15 Jan 2023 21:37:52 -0800 +Subject: [PATCH] Deprecate u8string_view + +Use basic_string_view instead + +Upstream-Status: Backport [https://github.com/fmtlib/fmt/commit/dea7fde8b7d649923dd41b0766bdf076033c62a2] +Signed-off-by: Khem Raj +--- + include/spdlog/fmt/bundled/core.h | 3 ++- + include/spdlog/fmt/bundled/format.h | 15 ++------------- + 2 files changed, 4 insertions(+), 14 deletions(-) + +diff --git a/include/spdlog/fmt/bundled/core.h b/include/spdlog/fmt/bundled/core.h +index 50b79351..e8b029ef 100644 +--- a/include/spdlog/fmt/bundled/core.h ++++ b/include/spdlog/fmt/bundled/core.h +@@ -1484,7 +1484,8 @@ FMT_API void vprint(wstring_view format_str, wformat_args args); + + /** + \rst +- Prints formatted data to ``stdout``. ++ Formats ``args`` according to specifications in ``format_str`` and writes the ++ output to ``stdout``. + + **Example**:: + +diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h +index 1bb24a52..39426361 100644 +--- a/include/spdlog/fmt/bundled/format.h ++++ b/include/spdlog/fmt/bundled/format.h +@@ -407,21 +407,10 @@ void basic_buffer::append(const U *begin, const U *end) { + enum char8_t: unsigned char {}; + #endif + +-// A UTF-8 string view. +-class u8string_view : public basic_string_view { +- public: +- typedef char8_t char_type; +- +- u8string_view(const char *s): +- basic_string_view(reinterpret_cast(s)) {} +- u8string_view(const char *s, size_t count) FMT_NOEXCEPT: +- basic_string_view(reinterpret_cast(s), count) {} +-}; +- + #if FMT_USE_USER_DEFINED_LITERALS + inline namespace literals { +-inline u8string_view operator"" _u(const char *s, std::size_t n) { +- return {s, n}; ++inline basic_string_view operator"" _u(const char* s, std::size_t n) { ++ return {reinterpret_cast(s), n}; + } + } + #endif +-- +2.39.0 + diff --git a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb index 26300ecb1d..7f52cb66c9 100644 --- a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb +++ b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb @@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=48aa35cefb768436223a6e7f18dc2a2a" SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git;branch=master;protocol=https;lfs=0 \ file://debugfix.patch \ file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch;patchdir=third_party/spdlog \ + file://0001-Deprecate-u8string_view.patch;patchdir=third_party/spdlog \ " UPSTREAM_CHECK_COMMITS = "1" From patchwork Tue Jan 17 23:18:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 18269 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23604C38147 for ; Tue, 17 Jan 2023 23:19:00 +0000 (UTC) Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by mx.groups.io with SMTP id smtpd.web11.2329.1673997536201441152 for ; Tue, 17 Jan 2023 15:18:58 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=j+P9cITF; spf=pass (domain: gmail.com, ip: 209.85.215.178, mailfrom: raj.khem@gmail.com) Received: by mail-pg1-f178.google.com with SMTP id v3so23213942pgh.4 for ; Tue, 17 Jan 2023 15:18:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SC1JwcTF+TZ78dkP/9MiKmdLERtj24VdI5kTOVsvjlo=; b=j+P9cITFIMVro19ztPd6seK4Kjl0D8OBueNXPJyPVxy6OgFcl3/k4n/HKdPlVjWCSv W/TsbQJbRXQHgvvZ2GUl4wGWq2Q6qjktCbRr2oHzfCsqhGKXvgU3H1nfzoATDzCfg4Zd B90lnEMLLyMiWzt3/Az7uWuLUiY+6OeIBIXP96/co/d66Vrf6lMKmO7tTydcoobwbI2y S4rhQ6E1gi/a4wZcN55YrflczDzW2TZ+60ja4xExJxc2fMSRuwIB7K/s1TSoBttM6NQo CiMtrL7qtmfarlPxBwHEiasEnLnEVnnGSbgPvngco/YaZ/Z+7/kcevUXEpWA7K5ohPFr enRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SC1JwcTF+TZ78dkP/9MiKmdLERtj24VdI5kTOVsvjlo=; b=aGF4d72fsTx+b6TFi/HN9ighgcTxKoz/O6Zz+4DXkUUhN1a5rvNi2UOfvHFGwzB5iv 7UfY8nj8UN6/BEvUKFI/1UmSzNIRf1gyxQMykhXVy919Ku+rtDZa6/BhqdpDbqS4PW7Q bXz2vIU2dmPEu2GPkGPzM428W/vIUCHNho0VFjTm0Wu3fEO5YaAAPNAdKHmCzCXvsBQ/ SMHRbP7m3qBorKckAEi1PynjSSRmfXaKNAQzEA0MAWtsZ2ax7l6pbrW/8dM/ypLLs8gt a44WXtBzQpfIygtVZQ2DAfYyPYT2aUwn5dxoHwUa7SVWb/twyvPzfZ3Dz44tj37WicOg UliA== X-Gm-Message-State: AFqh2koch/t3tbRb6DcxtnfuJ7/F1G1D3bY0c4kVi380DArZlQ8lNeQ7 2R7Iso9ntuCMSX27k1dMLWqtEYUwnY6nKA== X-Google-Smtp-Source: AMrXdXtgEzGx9f5FQJCEM3BA/9aFHUOm62nV7LpT7WBg+TggnDxi3zpT8sTDh3tomejmj1osNCukuw== X-Received: by 2002:a62:cd89:0:b0:58d:acf7:9648 with SMTP id o131-20020a62cd89000000b0058dacf79648mr4952006pfg.22.1673997537723; Tue, 17 Jan 2023 15:18:57 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9181:1cf0::b940]) by smtp.gmail.com with ESMTPSA id y15-20020aa7942f000000b0058d92d6e4ddsm5445717pfo.5.2023.01.17.15.18.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 15:18:57 -0800 (PST) From: Khem Raj To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 4/4] musl-obstack: Update to 1.2.3 Date: Tue, 17 Jan 2023 15:18:53 -0800 Message-Id: <20230117231853.1511529-4-raj.khem@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230117231853.1511529-1-raj.khem@gmail.com> References: <20230117231853.1511529-1-raj.khem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jan 2023 23:19:00 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/176069 Switch to void-linux github handle, void-linux is the upstream anyway this brings Signed-off-by: Khem Raj --- meta/recipes-core/musl/musl-obstack.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/recipes-core/musl/musl-obstack.bb b/meta/recipes-core/musl/musl-obstack.bb index 5c95ddbc94..4c71a141b2 100644 --- a/meta/recipes-core/musl/musl-obstack.bb +++ b/meta/recipes-core/musl/musl-obstack.bb @@ -8,9 +8,9 @@ LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=3d23e4eef8243efcaab6f0a438078932" SECTION = "libs" -PV = "1.2" -SRCREV = "466f773fe171da427e28be79b9cf48ccfddfb7e2" -SRC_URI = "git://github.com/pullmoll/musl-obstack;branch=master;protocol=https" +PV = "1.2.3" +SRCREV = "f4385255be1615688c6a5f042277304d7ab288b1" +SRC_URI = "git://github.com/void-linux/musl-obstack;branch=master;protocol=https" UPSTREAM_CHECK_COMMITS = "1"