devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Makefile.tests: Add LIBDL make(1) variable for portability sake
@ 2018-01-04  4:30 kevans-HZy0K5TPuP5AfugRpC6u6w
       [not found] ` <20180104043013.97083-1-kevans-HZy0K5TPuP5AfugRpC6u6w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: kevans-HZy0K5TPuP5AfugRpC6u6w @ 2018-01-04  4:30 UTC (permalink / raw)
  To: David Gibson, Jon Loeliger
  Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA, Kyle Evans

Some platforms (many, if not all, of the *BSD projects) do not provide a libdl,
and instead provide the same functionality in libc. Instead of forcing these
platforms to patch out the link against libdl, add a LIBDL make(1) variable to
allow the -ldl argument to be excluded easily via make(1) arguments.

Signed-off-by: Kyle Evans <kevans-HZy0K5TPuP5AfugRpC6u6w@public.gmane.org>
---
 tests/Makefile.tests | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/Makefile.tests b/tests/Makefile.tests
index 2258135..262944a 100644
--- a/tests/Makefile.tests
+++ b/tests/Makefile.tests
@@ -54,9 +54,12 @@ tests:	$(TESTS) $(TESTS_TREES)
 
 $(LIB_TESTS): %: $(TESTS_PREFIX)testutils.o util.o $(LIBFDT_archive)
 
+# Not necessary on all platforms; allow -ldl to be excluded instead of forcing
+# other platforms to patch it out.
+LIBDL = -ldl
 $(DL_LIB_TESTS): %: %.o $(TESTS_PREFIX)testutils.o util.o $(LIBFDT_archive)
 	@$(VECHO) LD [libdl] $@
-	$(LINK.c) -o $@ $^ -ldl
+	$(LINK.c) -o $@ $^ $(LIBDL)
 
 $(LIBTREE_TESTS): %: $(TESTS_PREFIX)testutils.o $(TESTS_PREFIX)trees.o \
 		util.o $(LIBFDT_archive)
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-04  4:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-04  4:30 [PATCH] Makefile.tests: Add LIBDL make(1) variable for portability sake kevans-HZy0K5TPuP5AfugRpC6u6w
     [not found] ` <20180104043013.97083-1-kevans-HZy0K5TPuP5AfugRpC6u6w@public.gmane.org>
2018-01-04  4:37   ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).