summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openmp/runtime/tools/lib/Platform.pm3
-rw-r--r--openmp/runtime/tools/lib/Uname.pm4
2 files changed, 6 insertions, 1 deletions
diff --git a/openmp/runtime/tools/lib/Platform.pm b/openmp/runtime/tools/lib/Platform.pm
index 8b701c24b7b..69882d39502 100644
--- a/openmp/runtime/tools/lib/Platform.pm
+++ b/openmp/runtime/tools/lib/Platform.pm
@@ -223,6 +223,9 @@ sub target_options() {
} elsif ( $operating_system eq "FreeBSD" ) {
# Host OS resembles Linux.
$_host_os = "lin";
+ } elsif ( $operating_system eq "NetBSD" ) {
+ # Host OS resembles Linux.
+ $_host_os = "lin";
} elsif ( $operating_system eq "Darwin" ) {
$_host_os = "mac";
} elsif ( $operating_system eq "MS Windows" ) {
diff --git a/openmp/runtime/tools/lib/Uname.pm b/openmp/runtime/tools/lib/Uname.pm
index 78ea31d611d..415070b7d3c 100644
--- a/openmp/runtime/tools/lib/Uname.pm
+++ b/openmp/runtime/tools/lib/Uname.pm
@@ -139,7 +139,7 @@ $values{ processor } = $values{ machine };
# hardware_platform.
if ( 0 ) {
-} elsif ( $^O eq "linux" or $^O eq "freebsd" ) {
+} elsif ( $^O eq "linux" or $^O eq "freebsd" or $^O eq "netbsd" ) {
if ( 0 ) {
} elsif ( $values{ machine } =~ m{\Ai[3456]86\z} ) {
$values{ hardware_platform } = "i386";
@@ -378,6 +378,8 @@ if ( 0 ) {
$values{ operating_system } = "MS Windows";
} elsif ( $values{ kernel_name } =~ m{\AFreeBSD} ) {
$values{ operating_system } = "FreeBSD";
+} elsif ( $values{ kernel_name } =~ m{\ANetBSD} ) {
+ $values{ operating_system } = "NetBSD";
} else {
die "Unsupported kernel_name (\"$values{ kernel_name }\") returned by POSIX::uname(); stopped";
}; # if
OpenPOWER on IntegriCloud