Skip to content

Commit e641896

Browse files
committed
remove specific code for OpenBSD that define STDCPP_LIBDIR_RUSTFLAGS
it isn't the good way to process, as it makes conflicts when building rustc while another version of rustc in installed system-wide.
1 parent 27d5511 commit e641896

File tree

4 files changed

+3
-21
lines changed

4 files changed

+3
-21
lines changed

mk/platform.mk

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -215,16 +215,6 @@ define CFG_MAKE_TOOLCHAIN
215215

216216
ifeq ($$(findstring $(HOST_$(1)),arm aarch64 mips mipsel powerpc),)
217217

218-
# On OpenBSD, we need to pass the path of libstdc++.so to the linker
219-
# (use path of libstdc++.a which is a known name for the same path)
220-
ifeq ($(OSTYPE_$(1)),unknown-openbsd)
221-
STDCPP_LIBDIR_RUSTFLAGS_$(1)= \
222-
-L "$$(dir $$(shell $$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \
223-
-print-file-name=lib$(CFG_STDCPP_NAME).a))"
224-
else
225-
STDCPP_LIBDIR_RUSTFLAGS_$(1)=
226-
endif
227-
228218
# On Bitrig, we need the relocation model to be PIC for everything
229219
ifeq (,$(filter $(OSTYPE_$(1)),bitrig))
230220
LLVM_MC_RELOCATION_MODEL="pic"

mk/target.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
9595
$$(RUSTFLAGS_$(4)) \
9696
$$(RUSTFLAGS$(1)_$(4)) \
9797
$$(RUSTFLAGS$(1)_$(4)_T_$(2)) \
98-
$$(STDCPP_LIBDIR_RUSTFLAGS_$(2)) \
9998
--out-dir $$(@D) \
10099
-C extra-filename=-$$(CFG_FILENAME_EXTRA) \
101100
$$<
@@ -130,7 +129,6 @@ $$(TBIN$(1)_T_$(2)_H_$(3))/$(4)$$(X_$(2)): \
130129
| $$(TBIN$(1)_T_$(2)_H_$(3))/
131130
@$$(call E, rustc: $$@)
132131
$$(STAGE$(1)_T_$(2)_H_$(3)) \
133-
$$(STDCPP_LIBDIR_RUSTFLAGS_$(2)) \
134132
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
135133
-o $$@ $$< --cfg $(4)
136134

mk/tests.mk

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,7 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
393393
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) -o $$@ $$< --test \
394394
-L "$$(RT_OUTPUT_DIR_$(2))" \
395395
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
396-
$$(RUSTFLAGS_$(4)) \
397-
$$(STDCPP_LIBDIR_RUSTFLAGS_$(2))
396+
$$(RUSTFLAGS_$(4))
398397

399398
endef
400399

@@ -664,9 +663,9 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
664663
--android-cross-path=$(CFG_ANDROID_CROSS_PATH) \
665664
--adb-path=$(CFG_ADB) \
666665
--adb-test-dir=$(CFG_ADB_TEST_DIR) \
667-
--host-rustcflags "$(RUSTC_FLAGS_$(3)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(3)) $$(STDCPP_LIBDIR_RUSTFLAGS_$(3))" \
666+
--host-rustcflags "$(RUSTC_FLAGS_$(3)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(3))" \
668667
--lldb-python-dir=$(CFG_LLDB_PYTHON_DIR) \
669-
--target-rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(2)) $$(STDCPP_LIBDIR_RUSTFLAGS_$(2))" \
668+
--target-rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(2))" \
670669
$$(CTEST_TESTARGS)
671670

672671
ifdef CFG_VALGRIND_RPASS

src/test/run-make/tools.mk

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ ifeq ($(UNAME),Bitrig)
8585
else
8686
ifeq ($(UNAME),OpenBSD)
8787
EXTRACFLAGS := -lm -lpthread
88-
# extend search lib for found estdc++ if build using gcc from
89-
# ports under OpenBSD. This is needed for:
90-
# - run-make/execution-engine
91-
# - run-make/issue-19371
92-
RUSTC := $(RUSTC) -L/usr/local/lib
9388
else
9489
EXTRACFLAGS := -lm -lrt -ldl -lpthread
9590
EXTRACXXFLAGS := -lstdc++

0 commit comments

Comments
 (0)