openbsd: use specific linker for building
By default, rustc use `cc` as linker. Under OpenBSD, `cc` is gcc version 4.2.1. So use the compiler found at configure-time for linking: it will be gcc 4.9. It permits to resolv problem of finding -lestdc++ or -lgcc. For base gcc (4.2), there are in not standard path, whereas for ports gcc (4.9) there are in standard path.
This commit is contained in:
parent
e6418964b9
commit
b74359a0a0
2 changed files with 2 additions and 0 deletions
|
@ -20,3 +20,4 @@ CFG_LDPATH_x86_64-unknown-openbsd :=
|
|||
CFG_RUN_x86_64-unknown-openbsd=$(2)
|
||||
CFG_RUN_TARG_x86_64-unknown-openbsd=$(call CFG_RUN_x86_64-unknown-openbsd,,$(2))
|
||||
CFG_GNU_TRIPLE_x86_64-unknown-openbsd := x86_64-unknown-openbsd
|
||||
RUSTC_FLAGS_x86_64-unknown-openbsd=-C linker=$(call FIND_COMPILER,$(CC))
|
||||
|
|
|
@ -85,6 +85,7 @@ ifeq ($(UNAME),Bitrig)
|
|||
else
|
||||
ifeq ($(UNAME),OpenBSD)
|
||||
EXTRACFLAGS := -lm -lpthread
|
||||
RUSTC := $(RUSTC) -C linker="$(word 1,$(CC:ccache=))"
|
||||
else
|
||||
EXTRACFLAGS := -lm -lrt -ldl -lpthread
|
||||
EXTRACXXFLAGS := -lstdc++
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue