diff options
author | Andrey Churbanov <Andrey.Churbanov@intel.com> | 2015-01-19 18:29:35 +0000 |
---|---|---|
committer | Andrey Churbanov <Andrey.Churbanov@intel.com> | 2015-01-19 18:29:35 +0000 |
commit | b8903bff6a9fbdf921ffad88808059e5e54821ed (patch) | |
tree | 86d12ecdec99349466ffb89614f764d82cfb4d96 /runtime/tools | |
parent | 3be2e89b5fec43465ab0a19dce31b9f7c50135a1 (diff) |
added support for PPC architectures (version 3): initial patch provided by Carlo Bertolli, latest version from Johnny Peyton
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@226479 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime/tools')
-rw-r--r-- | runtime/tools/lib/Platform.pm | 6 | ||||
-rw-r--r-- | runtime/tools/lib/Uname.pm | 2 | ||||
-rw-r--r-- | runtime/tools/src/common-defs.mk | 6 |
3 files changed, 10 insertions, 4 deletions
diff --git a/runtime/tools/lib/Platform.pm b/runtime/tools/lib/Platform.pm index 2e2b890..8b701c2 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{\Appc64le} ) { + $arch = "ppc64le"; } elsif ( $arch =~ m{\Appc64} ) { $arch = "ppc64"; } elsif ( $arch =~ m{\Aaarch64} ) { @@ -201,6 +203,8 @@ sub target_options() { $_host_arch = "32e"; } elsif ( $hardware_platform eq "arm" ) { $_host_arch = "arm"; + } elsif ( $hardware_platform eq "ppc64le" ) { + $_host_arch = "ppc64le"; } elsif ( $hardware_platform eq "ppc64" ) { $_host_arch = "ppc64"; } elsif ( $hardware_platform eq "aarch64" ) { @@ -391,7 +395,7 @@ the script assumes host architecture is target one. Input string is an architecture name to canonize. The function recognizes many variants, for example: C<32e>, C<Intel64>, C<Intel(R) 64>, etc. Returned string is a canononized architecture name, -one of: C<32>, C<32e>, C<64>, C<arm>, C<ppc64>, C<mic>, or C<undef> is input string is not recognized. +one of: C<32>, C<32e>, C<64>, C<arm>, C<ppc64le>, C<ppc64>, C<mic>, or C<undef> is input string is not recognized. =item B<legal_arch( $arch )> diff --git a/runtime/tools/lib/Uname.pm b/runtime/tools/lib/Uname.pm index d5bbde5..78ea31d 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{\Appc64le\z} ) { + $values{ hardware_platform } = "ppc64le"; } elsif ( $values{ machine } =~ m{\Appc64\z} ) { $values{ hardware_platform } = "ppc64"; } elsif ( $values{ machine } =~ m{\Aaarch64\z} ) { diff --git a/runtime/tools/src/common-defs.mk b/runtime/tools/src/common-defs.mk index 82a6b54..4a059d0 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,$(if $(filter ppc64,$(1)),PPC64,$(if $(filter aarch64,$(1)),AArch64,$(if $(filter mic,$(1)),Intel(R) Many Integrated Core Architecture,$(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,$(if $(filter ppc64le,$(1)),PPC64LE,$(if $(filter aarch64,$(1)),AArch64,$(if $(filter mic,$(1)),Intel(R) Many Integrated Core Architecture,$(error Bad architecture specified: $(1)))))))))) # Synopsis: # var_name = $(call check_variable,var,list) @@ -128,13 +128,13 @@ endif # -------------------------------------------------------------------------------------------------- os := $(call check_variable,os,lin mac win) -arch := $(call check_variable,arch,32 32e 64 arm ppc64 aarch64 mic) +arch := $(call check_variable,arch,32 32e 64 arm ppc64 ppc64le aarch64 mic) ifeq "$(arch)" "mic" # We want the flavor of mic (knf, knc, knl, etc.) platform := $(os)_$(MIC_ARCH) else platform := $(os)_$(arch) endif -platform := $(call check_variable,platform,lin_32 lin_32e lin_64 lin_arm lin_knc lin_knf mac_32 mac_32e win_32 win_32e win_64 lin_ppc64 lin_aarch64) +platform := $(call check_variable,platform,lin_32 lin_32e lin_64 lin_arm lin_knc lin_knf mac_32 mac_32e win_32 win_32e win_64 lin_ppc64 lin_ppc64le lin_aarch64) # oa-opts means "os and arch options". They are passed to almost all perl scripts. oa-opts := --os=$(os) --arch=$(arch) |