Commit f5aeef6e authored by John Koleszar's avatar John Koleszar Committed by Code Review
Browse files

Merge "Detect toolchain based on gcc -dumpmachine"

parents 10ae99c6 ffd5b58f
...@@ -497,10 +497,10 @@ setup_gnu_toolchain() { ...@@ -497,10 +497,10 @@ setup_gnu_toolchain() {
process_common_toolchain() { process_common_toolchain() {
if [ -z "$toolchain" ]; then if [ -z "$toolchain" ]; then
uname="$(uname -a)" gcctarget="$(gcc -dumpmachine 2> /dev/null)"
# detect tgt_isa # detect tgt_isa
case "$uname" in case "$gcctarget" in
*x86_64*) *x86_64*)
tgt_isa=x86_64 tgt_isa=x86_64
;; ;;
...@@ -510,19 +510,19 @@ process_common_toolchain() { ...@@ -510,19 +510,19 @@ process_common_toolchain() {
esac esac
# detect tgt_os # detect tgt_os
case "$uname" in case "$gcctarget" in
*Darwin\ Kernel\ Version\ 8*) *darwin8*)
tgt_isa=universal tgt_isa=universal
tgt_os=darwin8 tgt_os=darwin8
;; ;;
*Darwin\ Kernel\ Version\ 9*) *darwin9*)
tgt_isa=universal tgt_isa=universal
tgt_os=darwin9 tgt_os=darwin9
;; ;;
*Msys*|*Cygwin*) *msys*|*cygwin*)
tgt_os=win32 tgt_os=win32
;; ;;
*Linux*|*BSD*) *linux*|*bsd*)
tgt_os=linux tgt_os=linux
;; ;;
esac esac
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment