File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11-include ../tools.mk
22
33ifndef IS_WINDOWS
4- ifneq ($(shell uname) ,Darwin)
5- EXTRAFLAGS := -lm -lrt -ldl -lpthread
6- endif
4+ EXTRAFLAGS := $(EXTRACFLAGS )
75endif
86
97# FIXME: ignore freebsd
Original file line number Diff line number Diff line change 11-include ../tools.mk
22
33ifndef IS_WINDOWS
4+ ifneq ($(UNAME ) ,OpenBSD)
45all :
56 $(RUSTC ) -O --emit asm attr.rs
67 ! grep -q morestack $(TMPDIR ) /attr.s
910 $(RUSTC ) -O --emit asm -C no-stack-check flag.rs
1011 ! grep -q morestack $(TMPDIR ) /flag.s
1112else
13+ # On OpenBSD, morestack isn't used as the segmented stacks are disabled
14+ all :
15+ endif
16+ else
1217# On Windows we use __chkstk and it only appears in functions with large allocations,
1318# so this test wouldn't be reliable.
1419all :
Original file line number Diff line number Diff line change @@ -10,6 +10,6 @@ OUT=$(TMPDIR)/lib.s
1010all :
1111 $(RUSTC ) lib.rs --emit=asm --crate-type=staticlib
1212 # 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 11-include ../tools.mk
22all :
33 $(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
55 $(RUSTC ) foo.rs --target=my-invalid-platform.json 2>&1 | grep --quiet " Error loading target specification"
66 $(RUSTC ) foo.rs --target=my-incomplete-platform.json 2>&1 | grep ' Field llvm-target'
77 RUST_TARGET_PATH=. $(RUSTC ) foo.rs --target=my-awesome-platform --crate-type=lib --emit=asm
88 RUST_TARGET_PATH=. $(RUSTC ) foo.rs --target=x86_64-unknown-linux-gnu --crate-type=lib --emit=asm
99 # The built-in target *should* override the one we have here, and thus we
1010 # 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 11-include ../tools.mk
22
3+ ifneq ($(UNAME ) ,OpenBSD)
34HOST := $(shell $(RUSTC ) -vV | grep 'host:' | sed 's/host: //')
45ifeq ($(findstring i686,$(HOST ) ) ,i686)
56TARGET := $(subst i686,x86_64,$(HOST ) )
1112 $(RUSTC ) foo.rs -C extra-filename=-host
1213 $(RUSTC ) bar.rs -C extra-filename=-targ --target $(TARGET )
1314 $(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