File tree Expand file tree Collapse file tree 5 files changed +16
-8
lines changed Expand file tree Collapse file tree 5 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 1
1
-include ../tools.mk
2
2
3
3
ifndef IS_WINDOWS
4
- ifneq ($(shell uname) ,Darwin)
5
- EXTRAFLAGS := -lm -lrt -ldl -lpthread
6
- endif
4
+ EXTRAFLAGS := $(EXTRACFLAGS )
7
5
endif
8
6
9
7
# FIXME: ignore freebsd
Original file line number Diff line number Diff line change 1
1
-include ../tools.mk
2
2
3
3
ifndef IS_WINDOWS
4
+ ifneq ($(UNAME ) ,OpenBSD)
4
5
all :
5
6
$(RUSTC ) -O --emit asm attr.rs
6
7
! grep -q morestack $(TMPDIR ) /attr.s
9
10
$(RUSTC ) -O --emit asm -C no-stack-check flag.rs
10
11
! grep -q morestack $(TMPDIR ) /flag.s
11
12
else
13
+ # On OpenBSD, morestack isn't used as the segmented stacks are disabled
14
+ all :
15
+ endif
16
+ else
12
17
# On Windows we use __chkstk and it only appears in functions with large allocations,
13
18
# so this test wouldn't be reliable.
14
19
all :
Original file line number Diff line number Diff line change @@ -10,6 +10,6 @@ OUT=$(TMPDIR)/lib.s
10
10
all :
11
11
$(RUSTC ) lib.rs --emit=asm --crate-type=staticlib
12
12
# just check for symbol declarations with the names we're expecting.
13
- grep ' str[0-9]\+ :' $(OUT )
14
- grep ' binary[0-9]\+ :' $(OUT )
15
- grep ' vtable[0-9]\+ ' $(OUT )
13
+ grep ' str[0-9][0-9]* :' $(OUT )
14
+ grep ' binary[0-9][0-9]* :' $(OUT )
15
+ grep ' vtable[0-9][0-9]* ' $(OUT )
Original file line number Diff line number Diff line change 1
1
-include ../tools.mk
2
2
all :
3
3
$(RUSTC ) foo.rs --target=my-awesome-platform.json --crate-type=lib --emit=asm
4
- grep --quiet --invert-match morestack < $(TMPDIR ) /foo.s
4
+ grep -q -v morestack < $(TMPDIR ) /foo.s
5
5
$(RUSTC ) foo.rs --target=my-invalid-platform.json 2>&1 | grep --quiet " Error loading target specification"
6
6
$(RUSTC ) foo.rs --target=my-incomplete-platform.json 2>&1 | grep ' Field llvm-target'
7
7
RUST_TARGET_PATH=. $(RUSTC ) foo.rs --target=my-awesome-platform --crate-type=lib --emit=asm
8
8
RUST_TARGET_PATH=. $(RUSTC ) foo.rs --target=x86_64-unknown-linux-gnu --crate-type=lib --emit=asm
9
9
# The built-in target *should* override the one we have here, and thus we
10
10
# should have morestack
11
- grep --quiet morestack < $(TMPDIR ) /foo.s
11
+ grep -q morestack < $(TMPDIR ) /foo.s
Original file line number Diff line number Diff line change 1
1
-include ../tools.mk
2
2
3
+ ifneq ($(UNAME ) ,OpenBSD)
3
4
HOST := $(shell $(RUSTC ) -vV | grep 'host:' | sed 's/host: //')
4
5
ifeq ($(findstring i686,$(HOST ) ) ,i686)
5
6
TARGET := $(subst i686,x86_64,$(HOST ) )
11
12
$(RUSTC ) foo.rs -C extra-filename=-host
12
13
$(RUSTC ) bar.rs -C extra-filename=-targ --target $(TARGET )
13
14
$(RUSTC ) baz.rs --extern a=$(TMPDIR ) /liba-targ.rlib --target $(TARGET )
15
+ else
16
+ # OpenBSD support only x86_64 architecture for now
17
+ all :
18
+ endif
You can’t perform that action at this time.
0 commit comments