1#!/bin/bash 2# 3# Produce a gcc triplet for the given architecture 4# Released under the MIT License. 5# 6# We have a lot of arbitrary toolchain triplets, this is 7# a simple script to decode them. 8# 9 10if [[ $# -ne 1 ]]; then 11 echo "usage: $0 <architecture>" 12 exit 1 13fi 14 15case "$1" in 16 "arm64") 17 echo "aarch64-unknown-haiku" 18 ;; 19 "ppc") 20 echo "powerpc-apple-haiku" 21 ;; 22 "sparc") 23 echo "sparc64-unknown-haiku" 24 ;; 25 "x86_gcc2" | "x86") 26 echo "i586-pc-haiku" 27 ;; 28 *) 29 echo "$1-unknown-haiku" 30 ;; 31esac 32exit 0 33