Teach the Perl modules about NetBSD.

llvm-svn: 248203
This commit is contained in:
Joerg Sonnenberger 2015-09-21 19:42:05 +00:00
parent 97d92736f5
commit 40252cecb0
2 changed files with 6 additions and 1 deletions

View File

@ -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" ) {

View File

@ -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