summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc/0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glibc/glibc/0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch')
-rw-r--r--meta/recipes-core/glibc/glibc/0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch78
1 files changed, 78 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch b/meta/recipes-core/glibc/glibc/0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch
new file mode 100644
index 0000000000..9bdfa76318
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch
@@ -0,0 +1,78 @@
1From b1c374f7ede81a98f2d02def2c7ca17f1001f7cb Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 15 May 2020 17:05:45 -0700
4Subject: [PATCH] wordsize.h: Unify the header between arm and aarch64
5
6This helps OE multilibs to not sythesize this header which causes all
7kind of recursions and other issues since wordsize is fundamental header
8and ends up including itself in many case e.g. clang tidy, bpf etc.
9
10Upstream-Status: Inappropriate [ OE-Specific ]
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 sysdeps/aarch64/bits/wordsize.h | 11 +++++++++--
15 sysdeps/arm/bits/wordsize.h | 22 +---------------------
16 2 files changed, 10 insertions(+), 23 deletions(-)
17
18diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/aarch64/bits/wordsize.h
19index 118e59172d..ff86359fe8 100644
20--- a/sysdeps/aarch64/bits/wordsize.h
21+++ b/sysdeps/aarch64/bits/wordsize.h
22@@ -17,12 +17,19 @@
23 License along with the GNU C Library; if not, see
24 <https://www.gnu.org/licenses/>. */
25
26-#ifdef __LP64__
27+#if defined (__aarch64__) && defined (__LP64__)
28 # define __WORDSIZE 64
29-#else
30+#elif defined (__aarch64__)
31 # define __WORDSIZE 32
32 # define __WORDSIZE32_SIZE_ULONG 1
33 # define __WORDSIZE32_PTRDIFF_LONG 1
34+#else
35+#define __WORDSIZE 32
36+#define __WORDSIZE_TIME64_COMPAT32 1
37+#define __WORDSIZE32_SIZE_ULONG 0
38+#define __WORDSIZE32_PTRDIFF_LONG 0
39 #endif
40
41+#ifdef __aarch64__
42 #define __WORDSIZE_TIME64_COMPAT32 0
43+#endif
44diff --git a/sysdeps/arm/bits/wordsize.h b/sysdeps/arm/bits/wordsize.h
45deleted file mode 100644
46index 6ecbfe7c86..0000000000
47--- a/sysdeps/arm/bits/wordsize.h
48+++ /dev/null
49@@ -1,21 +0,0 @@
50-/* Copyright (C) 1999-2024 Free Software Foundation, Inc.
51- This file is part of the GNU C Library.
52-
53- The GNU C Library is free software; you can redistribute it and/or
54- modify it under the terms of the GNU Lesser General Public
55- License as published by the Free Software Foundation; either
56- version 2.1 of the License, or (at your option) any later version.
57-
58- The GNU C Library is distributed in the hope that it will be useful,
59- but WITHOUT ANY WARRANTY; without even the implied warranty of
60- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
61- Lesser General Public License for more details.
62-
63- You should have received a copy of the GNU Lesser General Public
64- License along with the GNU C Library; if not, see
65- <https://www.gnu.org/licenses/>. */
66-
67-#define __WORDSIZE 32
68-#define __WORDSIZE_TIME64_COMPAT32 1
69-#define __WORDSIZE32_SIZE_ULONG 0
70-#define __WORDSIZE32_PTRDIFF_LONG 0
71diff --git a/sysdeps/arm/bits/wordsize.h b/sysdeps/arm/bits/wordsize.h
72new file mode 120000
73index 0000000000..4c4a788ec2
74--- /dev/null
75+++ b/sysdeps/arm/bits/wordsize.h
76@@ -0,0 +1 @@
77+../../aarch64/bits/wordsize.h
78\ No newline at end of file