Skip to content

Commit 0fadd10

Browse files
committed
targets: Add powerpc{64}le-unknown-linux-gnu.
1 parent 32fdb69 commit 0fadd10

File tree

5 files changed

+100
-0
lines changed

5 files changed

+100
-0
lines changed

.github/workflows/release.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ jobs:
3131
- mips-unknown-linux-gnusf
3232
- mips64el-unknown-linux-gnu
3333
- mips64-unknown-linux-gnu
34+
- powerpcle-unknown-linux-gnu
3435
- powerpc-unknown-linux-gnu
36+
- powerpc64le-unknown-linux-gnu
3537
- powerpc64-unknown-linux-gnu
3638
- riscv32-unknown-linux-gnu
3739
- riscv64-unknown-linux-gnu

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ This is a simple, lightweight project for making cross-compilation toolchain wit
2323
| mips-unknown-linux-gnusf | 5.4.296 | 2.45 | 15.2.0 | 2.42 | N/A |
2424
| mips64el-unknown-linux-gnu | 5.4.296 | 2.45 | 15.2.0 | 2.42 | N/A |
2525
| mips64-unknown-linux-gnu | 5.4.296 | 2.45 | 15.2.0 | 2.42 | N/A |
26+
| powerpcle-unknown-linux-gnu | 5.4.296 | 2.45 | 15.2.0 | 2.42 | 2.40.4 |
2627
| powerpc-unknown-linux-gnu | 5.4.296 | 2.45 | 15.2.0 | 2.42 | 2.40.4 |
28+
| powerpc64le-unknown-linux-gnu | 5.4.296 | 2.45 | 15.2.0 | 2.42 | 2.40.4 |
2729
| powerpc64-unknown-linux-gnu | 5.4.296 | 2.45 | 15.2.0 | 2.42 | 2.40.4 |
2830
| riscv32-unknown-linux-gnu | 5.4.296 | 2.45 | 15.2.0 | 2.42 | 2.40.4 |
2931
| riscv64-unknown-linux-gnu | 5.4.296 | 2.45 | 15.2.0 | 2.42 | 2.40.4 |
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
CT_CONFIG_VERSION="4"
2+
CT_EXPERIMENTAL=y
3+
CT_PREFIX_DIR="/opt/x-tools/${CT_TARGET}"
4+
# CT_LOG_PROGRESS_BAR is not set
5+
CT_ARCH_POWERPC=y
6+
CT_ARCH_LE=y
7+
CT_ARCH_64=y
8+
CT_ARCH_ABI="elfv2"
9+
CT_TARGET_VENDOR=""
10+
CT_KERNEL_LINUX=y
11+
CT_LINUX_V_5_4=y
12+
CT_BINUTILS_PLUGINS=y
13+
CT_LIBC_GLIBC=y
14+
CT_CREATE_LDSO_CONF=y
15+
CT_CC_LANG_CXX=y
16+
CT_LINKER_MOLD=y
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
From 012ab7a5b188acd21001904fa0366ffc33d7c64e Mon Sep 17 00:00:00 2001
2+
From: hev <git@hev.cc>
3+
Date: Sun, 28 Sep 2025 11:59:50 +0800
4+
Subject: [PATCH] powerpc: Add support for little endian.
5+
6+
---
7+
...owerpc-Add-support-for-little-endian.patch | 46 +++++++++++++++++++
8+
1 file changed, 46 insertions(+)
9+
create mode 100644 packages/glibc/2.42/0001-powerpc-Add-support-for-little-endian.patch
10+
11+
diff --git a/packages/glibc/2.42/0001-powerpc-Add-support-for-little-endian.patch b/packages/glibc/2.42/0001-powerpc-Add-support-for-little-endian.patch
12+
new file mode 100644
13+
index 00000000..327f7c8d
14+
--- /dev/null
15+
+++ b/packages/glibc/2.42/0001-powerpc-Add-support-for-little-endian.patch
16+
@@ -0,0 +1,46 @@
17+
+From b344ac124d53a6dcf716c63fe777dc8f0c73890b Mon Sep 17 00:00:00 2001
18+
+From: hev <git@hev.cc>
19+
+Date: Sun, 28 Sep 2025 11:58:06 +0800
20+
+Subject: [PATCH] powerpc: Add support for little endian.
21+
+
22+
+---
23+
+ sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S | 14 ++++++++++++++
24+
+ 1 file changed, 14 insertions(+)
25+
+
26+
+diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S
27+
+index 20b8f8bd..9d4b2c5b 100644
28+
+--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S
29+
++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S
30+
+@@ -39,7 +39,14 @@ ENTRY (__clone)
31+
+ /* Set up stack frame for parent. */
32+
+ stwu r1,-32(r1)
33+
+ cfi_adjust_cfa_offset (32)
34+
++#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
35+
+ stmw r28,16(r1)
36+
++#else
37+
++ stw r28,16(r1)
38+
++ stw r29,20(r1)
39+
++ stw r30,24(r1)
40+
++ stw r31,28(r1)
41+
++#endif
42+
+
43+
+ /* Set up stack frame for child. */
44+
+ clrrwi r4,r4,4
45+
+@@ -80,7 +87,14 @@ ENTRY (__clone)
46+
+
47+
+ L(parent):
48+
+ /* Parent. Restore registers & return. */
49+
++#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
50+
+ lmw r28,16(r1)
51+
++#else
52+
++ lwz r28,16(r1)
53+
++ lwz r29,20(r1)
54+
++ lwz r30,24(r1)
55+
++ lwz r31,28(r1)
56+
++#endif
57+
+ addi r1,r1,32
58+
+ bnslr+
59+
+ b __syscall_error@local
60+
+--
61+
+2.43.0
62+
+
63+
--
64+
2.43.0
65+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
CT_CONFIG_VERSION="4"
2+
CT_EXPERIMENTAL=y
3+
CT_PREFIX_DIR="/opt/x-tools/${CT_TARGET}"
4+
# CT_LOG_PROGRESS_BAR is not set
5+
CT_ARCH_POWERPC=y
6+
CT_ARCH_LE=y
7+
# CT_DEMULTILIB is not set
8+
CT_TARGET_VENDOR=""
9+
CT_KERNEL_LINUX=y
10+
CT_LINUX_V_5_4=y
11+
CT_BINUTILS_PLUGINS=y
12+
CT_LIBC_GLIBC=y
13+
CT_CREATE_LDSO_CONF=y
14+
CT_CC_LANG_CXX=y
15+
CT_LINKER_MOLD=y

0 commit comments

Comments
 (0)