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 | d1c5504097ff5296567f9b83bf67257ffc544f3c (patch) | |
| tree | d202c58b20e6d2f476ecc368ce7c0dd2d471ed2c /openmp/runtime/tools | |
| parent | 663419b008e6a9bbea12e795a3903f440ddfcf68 (diff) | |
| download | bcm5719-llvm-d1c5504097ff5296567f9b83bf67257ffc544f3c.tar.gz bcm5719-llvm-d1c5504097ff5296567f9b83bf67257ffc544f3c.zip | |
added support for PPC architectures (version 3): initial patch provided by Carlo Bertolli, latest version from Johnny Peyton
llvm-svn: 226479
Diffstat (limited to 'openmp/runtime/tools')
| -rw-r--r-- | openmp/runtime/tools/lib/Platform.pm | 6 | ||||
| -rw-r--r-- | openmp/runtime/tools/lib/Uname.pm | 2 | ||||
| -rw-r--r-- | openmp/runtime/tools/src/common-defs.mk | 6 |
3 files changed, 10 insertions, 4 deletions
diff --git a/openmp/runtime/tools/lib/Platform.pm b/openmp/runtime/tools/lib/Platform.pm index 2e2b8904a2b..8b701c24b7b 100644 --- a/openmp/runtime/tools/lib/Platform.pm +++ b/openmp/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/openmp/runtime/tools/lib/Uname.pm b/openmp/runtime/tools/lib/Uname.pm index d5bbde55982..78ea31d611d 100644 --- a/openmp/runtime/tools/lib/Uname.pm +++ b/openmp/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/openmp/runtime/tools/src/common-defs.mk b/openmp/runtime/tools/src/common-defs.mk index 82a6b549fde..4a059d01335 100644 --- a/openmp/runtime/tools/src/common-defs.mk +++ b/openmp/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) |

