diff options
| author | bors <bors@rust-lang.org> | 2015-09-20 18:04:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-09-20 18:04:52 +0000 |
| commit | 6602b2f1c777e6e563a7bcc920bbd1ee1c4f7eab (patch) | |
| tree | 4a102c07089b755c16dfc455a016340612e46a3b | |
| parent | f5a64a678f7e5942b42781573683640952498b28 (diff) | |
| parent | 049d76bdd2ac7b3e65dc70b91e3b1e95e1a12d43 (diff) | |
Auto merge of #28501 - semarie:stdcpp-path, r=alexcrichton
By default, the linker in use under OpenBSD is the linker of base, which don't include /usr/local/lib where libstdc++ of gcc-4.9 lives. We need to add this directory to linker-path-search (using -L). Search the path of libstdc++.a, which is a known name (libstdc++.so has SO_VERSION) in the same directory. r? @alexcrichton this commit needs #28495 to be commited first. It should be the last piece for building rustc under OpenBSD from scratch.
| -rw-r--r-- | mk/platform.mk | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mk/platform.mk b/mk/platform.mk index fcb6a5b50d3..856a22dc606 100644 --- a/mk/platform.mk +++ b/mk/platform.mk @@ -208,6 +208,14 @@ define CFG_MAKE_TOOLCHAIN ifeq ($$(findstring $(HOST_$(1)),arm aarch64 mips mipsel powerpc),) + # On OpenBSD, we need to pass the path of libstdc++.so to the linker + # (use path of libstdc++.a which is a known name for the same path) + ifeq ($(OSTYPE_$(1)),unknown-openbsd) + RUSTC_FLAGS_$(1)=-L "$$(dir $$(shell $$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \ + -print-file-name=lib$(CFG_STDCPP_NAME).a))" \ + $(RUSTC_FLAGS_$(1)) + endif + # On Bitrig, we need the relocation model to be PIC for everything ifeq (,$(filter $(OSTYPE_$(1)),bitrig)) LLVM_MC_RELOCATION_MODEL="pic" |
