hrev53326 adds 1 changeset to branch 'master'
old head: 10d876dedef488fbef8798cb8137262bd365a30c
new head: 925d9f1909d43f4f31661bf8134761d036ebc887
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=925d9f1909d4+%5E10d876dedef4
----------------------------------------------------------------------------
925d9f1909d4: build/scripts: Add find_triplet to allow easy solving of arch to
gcc triplet
[ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev53326
Commit: 925d9f1909d43f4f31661bf8134761d036ebc887
URL: https://git.haiku-os.org/haiku/commit/?id=925d9f1909d4
Author: Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date: Thu Aug 1 15:34:54 2019 UTC
----------------------------------------------------------------------------
1 file changed, 32 insertions(+)
build/scripts/find_triplet | 32 ++++++++++++++++++++++++++++++++
----------------------------------------------------------------------------
diff --git a/build/scripts/find_triplet b/build/scripts/find_triplet
new file mode 100755
index 0000000000..8b72a348d2
--- /dev/null
+++ b/build/scripts/find_triplet
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# Produce a gcc triplet for the given architecture
+# Released under the MIT License.
+#
+# We have a lot of arbitrary toolchain triplets, this is
+# a simple script to decode them.
+#
+
+if [[ $# -ne 1 ]]; then
+ echo "usage: $0 <architecture>"
+ exit 1
+fi
+
+case "$1" in
+ "arm64")
+ echo "aarch64-unknown-haiku"
+ ;;
+ "ppc")
+ echo "powerpc-apple-haiku"
+ ;;
+ "sparc")
+ echo "sparc64-unknown-haiku"
+ ;;
+ "x86_gcc2" | "x86")
+ echo "i586-pc-haiku"
+ ;;
+ *)
+ echo "$1-unknown-haiku"
+ ;;
+esac
+exit 0