summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-05-16 08:58:38 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-18 06:33:36 +0100
commitf4aac2a1e25e2de306ac3bd298ad37131e2fd5db (patch)
tree9379202a58c52bfc0b0acee10d4875600aeffcc9 /meta/recipes-core/glibc
parent91264e5e0ab40b796e214edd84c72bc88b363778 (diff)
downloadpoky-f4aac2a1e25e2de306ac3bd298ad37131e2fd5db.tar.gz
glibc: Unify wordsize.h for arm and aarch64
Should help simplify multilib in arm world (From OE-Core rev: e13c85c8e822fc5e5ecba4d58a6f9786d4adb097) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glibc')
-rw-r--r--meta/recipes-core/glibc/glibc/0030-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch67
-rw-r--r--meta/recipes-core/glibc/glibc_2.31.bb1
2 files changed, 68 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0030-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch b/meta/recipes-core/glibc/glibc/0030-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch
new file mode 100644
index 0000000000..cbef2f2830
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0030-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch
@@ -0,0 +1,67 @@
1From 9cb0a756b017f5961b70ac781d3eaec6c82513cb 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 | 8 ++++++--
15 sysdeps/{aarch64 => arm}/bits/wordsize.h | 8 ++++++--
16 2 files changed, 12 insertions(+), 4 deletions(-)
17 copy sysdeps/{aarch64 => arm}/bits/wordsize.h (85%)
18
19diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/aarch64/bits/wordsize.h
20index ee01841773..34fcdef1f1 100644
21--- a/sysdeps/aarch64/bits/wordsize.h
22+++ b/sysdeps/aarch64/bits/wordsize.h
23@@ -17,12 +17,16 @@
24 License along with the GNU C Library; if not, see
25 <https://www.gnu.org/licenses/>. */
26
27-#ifdef __LP64__
28+#if defined (__aarch64__) && defined (__LP64__)
29 # define __WORDSIZE 64
30-#else
31+#elif defined (__aarch64__)
32 # define __WORDSIZE 32
33 # define __WORDSIZE32_SIZE_ULONG 1
34 # define __WORDSIZE32_PTRDIFF_LONG 1
35+#else
36+# define __WORDSIZE 32
37+# define __WORDSIZE32_SIZE_ULONG 0
38+# define __WORDSIZE32_PTRDIFF_LONG 0
39 #endif
40
41 #define __WORDSIZE_TIME64_COMPAT32 0
42diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/arm/bits/wordsize.h
43similarity index 85%
44copy from sysdeps/aarch64/bits/wordsize.h
45copy to sysdeps/arm/bits/wordsize.h
46index ee01841773..34fcdef1f1 100644
47--- a/sysdeps/aarch64/bits/wordsize.h
48+++ b/sysdeps/arm/bits/wordsize.h
49@@ -17,12 +17,16 @@
50 License along with the GNU C Library; if not, see
51 <https://www.gnu.org/licenses/>. */
52
53-#ifdef __LP64__
54+#if defined (__aarch64__) && defined (__LP64__)
55 # define __WORDSIZE 64
56-#else
57+#elif defined (__aarch64__)
58 # define __WORDSIZE 32
59 # define __WORDSIZE32_SIZE_ULONG 1
60 # define __WORDSIZE32_PTRDIFF_LONG 1
61+#else
62+# define __WORDSIZE 32
63+# define __WORDSIZE32_SIZE_ULONG 0
64+# define __WORDSIZE32_PTRDIFF_LONG 0
65 #endif
66
67 #define __WORDSIZE_TIME64_COMPAT32 0
diff --git a/meta/recipes-core/glibc/glibc_2.31.bb b/meta/recipes-core/glibc/glibc_2.31.bb
index 2032311b27..61679e2c1c 100644
--- a/meta/recipes-core/glibc/glibc_2.31.bb
+++ b/meta/recipes-core/glibc/glibc_2.31.bb
@@ -40,6 +40,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
40 file://0027-intl-Emit-no-lines-in-bison-generated-files.patch \ 40 file://0027-intl-Emit-no-lines-in-bison-generated-files.patch \
41 file://0028-inject-file-assembly-directives.patch \ 41 file://0028-inject-file-assembly-directives.patch \
42 file://0029-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \ 42 file://0029-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \
43 file://0030-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch \
43 " 44 "
44S = "${WORKDIR}/git" 45S = "${WORKDIR}/git"
45B = "${WORKDIR}/build-${TARGET_SYS}" 46B = "${WORKDIR}/build-${TARGET_SYS}"