* [Buildroot] [PATCH 1/1] package/xxhash: fix uclibc build
@ 2022-01-05 18:07 Fabrice Fontaine
2022-01-07 21:09 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2022-01-05 18:07 UTC (permalink / raw)
To: buildroot; +Cc: Fabrice Fontaine
Fix the following uclibc build failure raised since bump to version
0.8.1 in commit 5dbdb2535c649ee617595b8c4ae3cbba0ee37b97:
/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/microblazeel-buildroot-linux-uclibc/10.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: xxhash.o: in function `XXH3_hashLong_128b_internal.constprop.0':
(.text+0xcbc): undefined reference to `static_assert'
Fixes:
- http://autobuild.buildroot.org/results/559/5595b21a711b482b84e582fc9f56e5468c9eb6d6/build-end.log
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...nd-on-assert-h-for-XXH_STATIC_ASSERT.patch | 29 +++++++++++++++++++
1 file changed, 29 insertions(+)
create mode 100644 package/xxhash/0003-do-no-longer-depend-on-assert-h-for-XXH_STATIC_ASSERT.patch
diff --git a/package/xxhash/0003-do-no-longer-depend-on-assert-h-for-XXH_STATIC_ASSERT.patch b/package/xxhash/0003-do-no-longer-depend-on-assert-h-for-XXH_STATIC_ASSERT.patch
new file mode 100644
index 0000000000..3b65ae1d6c
--- /dev/null
+++ b/package/xxhash/0003-do-no-longer-depend-on-assert-h-for-XXH_STATIC_ASSERT.patch
@@ -0,0 +1,29 @@
+From 6189ecd3d44a693460f86280ccf49d33cb4b18e1 Mon Sep 17 00:00:00 2001
+From: Yann Collet <cyan@fb.com>
+Date: Sun, 26 Dec 2021 15:15:26 -0800
+Subject: [PATCH] do no longer depend on `<assert.h>` for XXH_STATIC_ASSERT
+
+since some versions are buggy.
+
+Use `_Static_assert` instead, which is part of the C11 language.
+[Retrieved from:
+https://github.com/Cyan4973/xxHash/commit/6189ecd3d44a693460f86280ccf49d33cb4b18e1]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ xxhash.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/xxhash.h b/xxhash.h
+index 311a69c7..5dfd5c45 100644
+--- a/xxhash.h
++++ b/xxhash.h
+@@ -1749,8 +1749,7 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size)
+ /* note: use after variable declarations */
+ #ifndef XXH_STATIC_ASSERT
+ # if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */
+-# include <assert.h>
+-# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0)
++# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { _Static_assert((c),m); } while(0)
+ # elif defined(__cplusplus) && (__cplusplus >= 201103L) /* C++11 */
+ # define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0)
+ # else
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/xxhash: fix uclibc build
2022-01-05 18:07 [Buildroot] [PATCH 1/1] package/xxhash: fix uclibc build Fabrice Fontaine
@ 2022-01-07 21:09 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2022-01-07 21:09 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
On Wed, 5 Jan 2022 19:07:51 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Fix the following uclibc build failure raised since bump to version
> 0.8.1 in commit 5dbdb2535c649ee617595b8c4ae3cbba0ee37b97:
>
> /home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/microblazeel-buildroot-linux-uclibc/10.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: xxhash.o: in function `XXH3_hashLong_128b_internal.constprop.0':
> (.text+0xcbc): undefined reference to `static_assert'
>
> Fixes:
> - http://autobuild.buildroot.org/results/559/5595b21a711b482b84e582fc9f56e5468c9eb6d6/build-end.log
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> ...nd-on-assert-h-for-XXH_STATIC_ASSERT.patch | 29 +++++++++++++++++++
> 1 file changed, 29 insertions(+)
> create mode 100644 package/xxhash/0003-do-no-longer-depend-on-assert-h-for-XXH_STATIC_ASSERT.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-07 21:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-05 18:07 [Buildroot] [PATCH 1/1] package/xxhash: fix uclibc build Fabrice Fontaine
2022-01-07 21:09 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox