diff options
Diffstat (limited to 'recipes-devtools/clang/clang/0032-compiler-rt-Enable-__int128-for-ppc32.patch')
-rw-r--r-- | recipes-devtools/clang/clang/0032-compiler-rt-Enable-__int128-for-ppc32.patch | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/recipes-devtools/clang/clang/0032-compiler-rt-Enable-__int128-for-ppc32.patch b/recipes-devtools/clang/clang/0032-compiler-rt-Enable-__int128-for-ppc32.patch new file mode 100644 index 0000000..e21aa30 --- /dev/null +++ b/recipes-devtools/clang/clang/0032-compiler-rt-Enable-__int128-for-ppc32.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | From 4467235fed310d0c78cc71307ebd270136ed47d6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 9 Mar 2022 16:28:16 -0800 | ||
4 | Subject: [PATCH] compiler-rt: Enable __int128 for ppc32 | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | --- | ||
9 | compiler-rt/lib/builtins/CMakeLists.txt | 15 +++++++-------- | ||
10 | compiler-rt/lib/builtins/int_types.h | 2 +- | ||
11 | 2 files changed, 8 insertions(+), 9 deletions(-) | ||
12 | |||
13 | diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt | ||
14 | index ec668e294d6d..72556d2fc58e 100644 | ||
15 | --- a/compiler-rt/lib/builtins/CMakeLists.txt | ||
16 | +++ b/compiler-rt/lib/builtins/CMakeLists.txt | ||
17 | @@ -628,11 +628,9 @@ set(mips64_SOURCES ${GENERIC_TF_SOURCES} | ||
18 | set(mips64el_SOURCES ${GENERIC_TF_SOURCES} | ||
19 | ${mips_SOURCES}) | ||
20 | |||
21 | -set(powerpc_SOURCES ${GENERIC_SOURCES}) | ||
22 | - | ||
23 | set(powerpcspe_SOURCES ${GENERIC_SOURCES}) | ||
24 | |||
25 | -set(powerpc64_SOURCES | ||
26 | +set(powerpc_SOURCES | ||
27 | ppc/divtc3.c | ||
28 | ppc/fixtfdi.c | ||
29 | ppc/fixunstfdi.c | ||
30 | @@ -647,14 +645,15 @@ set(powerpc64_SOURCES | ||
31 | ) | ||
32 | # These routines require __int128, which isn't supported on AIX. | ||
33 | if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "AIX") | ||
34 | - set(powerpc64_SOURCES | ||
35 | + set(powerpc_SOURCES | ||
36 | ppc/floattitf.c | ||
37 | ppc/fixtfti.c | ||
38 | ppc/fixunstfti.c | ||
39 | - ${powerpc64_SOURCES} | ||
40 | + ${powerpc_SOURCES} | ||
41 | ) | ||
42 | endif() | ||
43 | -set(powerpc64le_SOURCES ${powerpc64_SOURCES}) | ||
44 | +set(powerpc64le_SOURCES ${powerpc_SOURCES}) | ||
45 | +set(powerpc64_SOURCES ${powerpc_SOURCES}) | ||
46 | |||
47 | set(riscv_SOURCES | ||
48 | riscv/save.S | ||
49 | @@ -761,9 +760,9 @@ else () | ||
50 | list(APPEND BUILTIN_CFLAGS_${arch} -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET) | ||
51 | endif() | ||
52 | |||
53 | - # For RISCV32, we must force enable int128 for compiling long | ||
54 | + # For RISCV32/PPC32, we must force enable int128 for compiling long | ||
55 | # double routines. | ||
56 | - if("${arch}" STREQUAL "riscv32") | ||
57 | + if("${arch}" STREQUAL "riscv32" OR "${arch}" STREQUAL "powerpc" ) | ||
58 | list(APPEND BUILTIN_CFLAGS_${arch} -fforce-enable-int128) | ||
59 | endif() | ||
60 | |||
61 | diff --git a/compiler-rt/lib/builtins/int_types.h b/compiler-rt/lib/builtins/int_types.h | ||
62 | index 7a72de480676..9ee5a327b28a 100644 | ||
63 | --- a/compiler-rt/lib/builtins/int_types.h | ||
64 | +++ b/compiler-rt/lib/builtins/int_types.h | ||
65 | @@ -64,7 +64,7 @@ typedef union { | ||
66 | } udwords; | ||
67 | |||
68 | #if defined(__LP64__) || defined(__wasm__) || defined(__mips64) || \ | ||
69 | - defined(__riscv) || defined(_WIN64) | ||
70 | + defined(__riscv) || defined(_WIN64) || defined(__powerpc__) | ||
71 | #define CRT_HAS_128BIT | ||
72 | #endif | ||
73 | |||