From fcb30a0b67b1bd4acbc3422ff74fac5d031ae1ae Mon Sep 17 00:00:00 2001 From: Sébastien Marie Date: Thu, 29 Jan 2015 08:19:28 +0100 Subject: openbsd support --- src/test/run-make/tools.mk | 3 +++ src/test/run-pass/intrinsic-alignment.rs | 3 ++- src/test/run-pass/lang-item-public.rs | 6 +++++- src/test/run-pass/rec-align-u64.rs | 3 ++- src/test/run-pass/tcp-stress.rs | 3 ++- src/test/run-pass/x86stdcall.rs | 3 ++- 6 files changed, 16 insertions(+), 5 deletions(-) (limited to 'src/test') diff --git a/src/test/run-make/tools.mk b/src/test/run-make/tools.mk index 1c791f0690c..accb2f7faa7 100644 --- a/src/test/run-make/tools.mk +++ b/src/test/run-make/tools.mk @@ -59,11 +59,14 @@ ifeq ($(shell uname),Darwin) else ifeq ($(shell uname),FreeBSD) EXTRACFLAGS := -lm -lpthread -lgcc_s +ifeq ($(shell uname),OpenBSD) + EXTRACFLAGS := -lm -lpthread else EXTRACFLAGS := -lm -lrt -ldl -lpthread endif endif endif +endif REMOVE_DYLIBS = rm $(TMPDIR)/$(call DYLIB_GLOB,$(1)) REMOVE_RLIBS = rm $(TMPDIR)/$(call RLIB_GLOB,$(1)) diff --git a/src/test/run-pass/intrinsic-alignment.rs b/src/test/run-pass/intrinsic-alignment.rs index da07e9594c0..07f021e48d7 100644 --- a/src/test/run-pass/intrinsic-alignment.rs +++ b/src/test/run-pass/intrinsic-alignment.rs @@ -20,7 +20,8 @@ mod rusti { #[cfg(any(target_os = "linux", target_os = "macos", target_os = "freebsd", - target_os = "dragonfly"))] + target_os = "dragonfly", + target_os = "openbsd"))] mod m { #[main] #[cfg(target_arch = "x86")] diff --git a/src/test/run-pass/lang-item-public.rs b/src/test/run-pass/lang-item-public.rs index f94f6482759..2d70fa0c819 100644 --- a/src/test/run-pass/lang-item-public.rs +++ b/src/test/run-pass/lang-item-public.rs @@ -1,4 +1,4 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -37,6 +37,10 @@ extern {} #[link(name = "c")] extern {} +#[cfg(target_os = "openbsd")] +#[link(name = "c")] +extern {} + #[cfg(target_os = "macos")] #[link(name = "System")] extern {} diff --git a/src/test/run-pass/rec-align-u64.rs b/src/test/run-pass/rec-align-u64.rs index eaf76ef5714..5330490e54f 100644 --- a/src/test/run-pass/rec-align-u64.rs +++ b/src/test/run-pass/rec-align-u64.rs @@ -39,7 +39,8 @@ struct Outer { #[cfg(any(target_os = "linux", target_os = "macos", target_os = "freebsd", - target_os = "dragonfly"))] + target_os = "dragonfly", + target_os = "openbsd"))] mod m { #[cfg(target_arch = "x86")] pub mod m { diff --git a/src/test/run-pass/tcp-stress.rs b/src/test/run-pass/tcp-stress.rs index f5f013d1711..e0527c35871 100644 --- a/src/test/run-pass/tcp-stress.rs +++ b/src/test/run-pass/tcp-stress.rs @@ -1,4 +1,4 @@ -// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -10,6 +10,7 @@ // ignore-linux see joyent/libuv#1189 // ignore-android needs extra network permissions +// ignore-openbsd system ulimit (Too many open files) // exec-env:RUST_LOG=debug #[macro_use] diff --git a/src/test/run-pass/x86stdcall.rs b/src/test/run-pass/x86stdcall.rs index 15d18525d0a..75a8f6019b8 100644 --- a/src/test/run-pass/x86stdcall.rs +++ b/src/test/run-pass/x86stdcall.rs @@ -1,4 +1,4 @@ -// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -34,5 +34,6 @@ pub fn main() { target_os = "linux", target_os = "freebsd", target_os = "dragonfly", + target_os = "openbsd", target_os = "android"))] pub fn main() { } -- cgit 1.4.1-3-g733a5