Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 169b61b

Browse files
committedMar 20, 2025··
druntime/test/shared loadDR: Pass -rpath on musl
The test fails on musl without the flag: ``` /usr/bin/cc -g -Wall src/loadDR.c -ldl -o /root/build/runtime/druntime-test-shared-debug/loadDR Testing loadDR /root/build/runtime/druntime-test-shared-debug/loadDR /root/build/lib/libdruntime-ldc-debug-shared.so.111.0 Aborting from rt/sections_elf_shared.d(966) Failed to get library handle.gmake: *** [../common.mak:192: /root/build/runtime/druntime-test-shared-debug/loadDR.done] Aborted (core dumped) ``` Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
1 parent baae9d8 commit 169b61b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎runtime/druntime/test/shared/Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ $(ROOT)/loadDR.done: $(ROOT)/lib$(DOTDLL) $(DRUNTIMESO)
152152
$(ROOT)/loadDR.done: private run_args = $(DRUNTIMESO)
153153
$(ROOT)/loadDR$(DOTEXE): utils.h
154154
$(ROOT)/loadDR$(DOTEXE): private extra_ldlibs += $(ldl)
155+
ifeq ($(IS_MUSL),1)
156+
$(ROOT)/loadDR$(DOTEXE): private extra_ldflags += -Wl,-rpath,$(druntimeso_dir)
157+
endif
155158

156159
$(ROOT)/host.done: $(DRUNTIMESO) $(ROOT)/plugin1$(DOTDLL) $(ROOT)/plugin2$(DOTDLL)
157160
$(ROOT)/host.done: private run_args = $(DRUNTIMESO)

0 commit comments

Comments
 (0)
Please sign in to comment.