summaryrefslogtreecommitdiff
path: root/experimental/mrustc/mrustc-ppc32-default-target-detect.patch
diff options
context:
space:
mode:
Diffstat (limited to 'experimental/mrustc/mrustc-ppc32-default-target-detect.patch')
-rw-r--r--experimental/mrustc/mrustc-ppc32-default-target-detect.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/experimental/mrustc/mrustc-ppc32-default-target-detect.patch b/experimental/mrustc/mrustc-ppc32-default-target-detect.patch
new file mode 100644
index 000000000..a138c442d
--- /dev/null
+++ b/experimental/mrustc/mrustc-ppc32-default-target-detect.patch
@@ -0,0 +1,16 @@
+diff -ur a/tools/common/target_detect.h b/tools/common/target_detect.h
+--- a/tools/common/target_detect.h 2024-12-17 14:27:52.560000000 +0000
++++ b/tools/common/target_detect.h 2024-12-17 14:37:17.320000000 +0000
+@@ -64,6 +64,12 @@
+ # else
+ # define DEFAULT_TARGET_NAME "powerpc64le-unknown-linux-musl"
+ # endif
++# elif defined(__powerpc__) && defined(__BIG_ENDIAN__)
++# if defined(__USE_GNU)
++# define DEFAULT_TARGET_NAME "powerpc-unknown-linux-gnu"
++# else
++# define DEFAULT_TARGET_NAME "powerpc-unknown-linux-musl"
++# endif
+ # elif defined(__riscv) && __riscv_xlen == 64
+ # if defined(__USE_GNU)
+ # define DEFAULT_TARGET_NAME "riscv64-unknown-linux-gnu"