summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/tools
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/tools')
-rw-r--r--openmp/runtime/tools/lib/Platform.pm7
-rw-r--r--openmp/runtime/tools/lib/Uname.pm2
2 files changed, 8 insertions, 1 deletions
diff --git a/openmp/runtime/tools/lib/Platform.pm b/openmp/runtime/tools/lib/Platform.pm
index b0e10a17ad7..0ff7597e5b9 100644
--- a/openmp/runtime/tools/lib/Platform.pm
+++ b/openmp/runtime/tools/lib/Platform.pm
@@ -61,6 +61,8 @@ sub canon_arch($) {
$arch = "mips64";
} elsif ( $arch =~ m{\Amips} ) {
$arch = "mips";
+ } elsif ( $arch =~ m{\Ariscv64} ) {
+ $arch = "riscv64";
} else {
$arch = undef;
}; # if
@@ -94,6 +96,7 @@ sub canon_mic_arch($) {
"mic" => "Intel(R) Many Integrated Core Architecture",
"mips" => "MIPS",
"mips64" => "MIPS64",
+ "riscv64" => "RISC-V (64-bit)",
);
sub legal_arch($) {
@@ -220,6 +223,8 @@ sub target_options() {
$_host_arch = "mips64";
} elsif ( $hardware_platform eq "mips" ) {
$_host_arch = "mips";
+ } elsif ( $hardware_platform eq "riscv64" ) {
+ $_host_arch = "riscv64";
} else {
die "Unsupported host hardware platform: \"$hardware_platform\"; stopped";
}; # if
@@ -409,7 +414,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<ppc64le>, C<ppc64>, C<mic>, C<mips>, C<mips64>, 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>, C<mips>, C<mips64>, C<riscv64> 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 4a5c332d618..a14cb3a6531 100644
--- a/openmp/runtime/tools/lib/Uname.pm
+++ b/openmp/runtime/tools/lib/Uname.pm
@@ -156,6 +156,8 @@ if ( 0 ) {
$values{ hardware_platform } = "mips64";
} elsif ( $values{ machine } =~ m{\Amips\z} ) {
$values{ hardware_platform } = "mips";
+ } elsif ( $values{ machine } =~ m{\Ariscv64\z} ) {
+ $values{ hardware_platform } = "riscv64";
} else {
die "Unsupported machine (\"$values{ machine }\") returned by POSIX::uname(); stopped";
}; # if
OpenPOWER on IntegriCloud