aboutsummaryrefslogtreecommitdiff
path: root/runtime/tools
diff options
context:
space:
mode:
authorJim Cownie <james.h.cownie@intel.com>2014-08-07 10:12:54 +0000
committerJim Cownie <james.h.cownie@intel.com>2014-08-07 10:12:54 +0000
commiteb0d2c2faa4801e29301059395ec6c4dd5746722 (patch)
treecd8ba09fc86298c2e1d64661f1e45935ec6c2ff3 /runtime/tools
parent8e8c442780e74760ff9cbde0f94b4cb42e76c358 (diff)
Commit PowerPC64 support from Carlo Bertolli at IBM.
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@215093 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime/tools')
-rw-r--r--runtime/tools/lib/Platform.pm4
-rw-r--r--runtime/tools/lib/Uname.pm2
-rw-r--r--runtime/tools/src/common-defs.mk6
3 files changed, 9 insertions, 3 deletions
diff --git a/runtime/tools/lib/Platform.pm b/runtime/tools/lib/Platform.pm
index 5b399f7..077e649 100644
--- a/runtime/tools/lib/Platform.pm
+++ b/runtime/tools/lib/Platform.pm
@@ -50,6 +50,8 @@ sub canon_arch($) {
$arch = "32e";
} elsif ( $arch =~ m{\Aarm(?:v7\D*)?\z} ) {
$arch = "arm";
+ } elsif ( $arch =~ m{\Appc64} ) {
+ $arch = "ppc64";
} else {
$arch = undef;
}; # if
@@ -159,6 +161,8 @@ sub target_options() {
$_host_arch = "32e";
} elsif ( $hardware_platform eq "arm" ) {
$_host_arch = "arm";
+ } elsif ( $hardware_platform eq "ppc64" ) {
+ $_host_arch = "ppc64";
} else {
die "Unsupported host hardware platform: \"$hardware_platform\"; stopped";
}; # if
diff --git a/runtime/tools/lib/Uname.pm b/runtime/tools/lib/Uname.pm
index e212501..52518b4 100644
--- a/runtime/tools/lib/Uname.pm
+++ b/runtime/tools/lib/Uname.pm
@@ -147,6 +147,8 @@ if ( 0 ) {
$values{ hardware_platform } = "x86_64";
} elsif ( $values{ machine } =~ m{\Aarmv7\D*\z} ) {
$values{ hardware_platform } = "arm";
+ } elsif ( $values{ machine } =~ m{\Appc64\z} ) {
+ $values{ hardware_platform } = "ppc64";
} else {
die "Unsupported machine (\"$values{ machine }\") returned by POSIX::uname(); stopped";
}; # if
diff --git a/runtime/tools/src/common-defs.mk b/runtime/tools/src/common-defs.mk
index ebd1922..7eb64b0 100644
--- a/runtime/tools/src/common-defs.mk
+++ b/runtime/tools/src/common-defs.mk
@@ -45,7 +45,7 @@ endif
# Description:
# The function return printable name of specified architecture, IA-32 architecture or Intel(R) 64.
#
-legal_arch = $(if $(filter 32,$(1)),IA-32,$(if $(filter 32e,$(1)),Intel(R) 64,$(if $(filter l1,$(1)),L1OM,$(if $(filter arm,$(1)),ARM,$(error Bad architecture specified: $(1))))))
+legal_arch = $(if $(filter 32,$(1)),IA-32,$(if $(filter 32e,$(1)),Intel(R) 64,$(if $(filter l1,$(1)),L1OM,$(if $(filter arm,$(1)),ARM,$(if $(filter ppc64,$(1)),PPC64,$(error Bad architecture specified: $(1)))))))
# Synopsis:
# var_name = $(call check_variable,var,list)
@@ -128,9 +128,9 @@ endif
# --------------------------------------------------------------------------------------------------
os := $(call check_variable,os,lin lrb mac win)
-arch := $(call check_variable,arch,32 32e 64 arm)
+arch := $(call check_variable,arch,32 32e 64 arm ppc64)
platform := $(os)_$(arch)
-platform := $(call check_variable,platform,lin_32 lin_32e lin_64 lin_arm lrb_32e mac_32 mac_32e win_32 win_32e win_64)
+platform := $(call check_variable,platform,lin_32 lin_32e lin_64 lin_arm lrb_32e mac_32 mac_32e win_32 win_32e win_64 lin_ppc64)
# oa-opts means "os and arch options". They are passed to almost all perl scripts.
oa-opts := --os=$(os) --arch=$(arch)