Skip to content
Snippets Groups Projects
Commit f92c9c0d authored by Greg Steuck's avatar Greg Steuck Committed by Marge Bot
Browse files

Only use -ldl conditionally to fix T3807

OpenBSD doesn't have this library and so the linker complains:
ld.lld: error: unable to find library -ldl
parent 9bc5ab64
No related branches found
No related tags found
No related merge requests found
......@@ -303,3 +303,9 @@ LIBCXX_PLATFORM = YES
else
LIBCXX_PLATFORM = NO
endif
ifeq "$(HostOS)" "openbsd"
# None required, dlopen and the like are in libc.
LIBDL_NAME =
else
LIBDL_NAME = -ldl
endif
......@@ -15,7 +15,7 @@ T3807:
# when linking an executable).
# Hence we must explicitly linking with the RTS here.
'$(TEST_HC)' $(filter-out -rtsopts,$(TEST_HC_OPTS)) -v0 --make -dynamic -fPIC -shared T3807Export.hs T3807-export.c -o T3807test.so -flink-rts
'$(TEST_HC)' $(filter-out -rtsopts,$(TEST_HC_OPTS)) -no-auto-link-packages -no-hs-main T3807-load.c -o T3807-load -ldl
'$(TEST_HC)' $(filter-out -rtsopts,$(TEST_HC_OPTS)) -no-auto-link-packages -no-hs-main T3807-load.c -o T3807-load $(LIBDL_NAME)
./T3807-load
.PHONY: T4464dyn
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment