]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
Makefile: allow linker override for cross uuid test
authorBaruch Siach <baruch@tkos.co.il>
Wed, 9 Aug 2017 06:43:12 +0000 (09:43 +0300)
committerBaruch Siach <baruch@tkos.co.il>
Wed, 9 Aug 2017 06:47:35 +0000 (09:47 +0300)
The test to determine whether libuuid is installed uses the host 'ld' utility.
This breaks when cross compiling, since target libraries are often different
than host libraries.

Use $(LD) instead. This allows to easily use the cross compiler linker.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Makefile

index 3f1d9aaa890de059935d7b603c1c9b9115688fdf..cc74bdd6c3e60368973e82b6d89e5a47ce97b897 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 CFLAGS ?= -O2 -g -Wall -Werror
 CFLAGS += -std=gnu99
 CPPFLAGS += -D_GNU_SOURCE -D__CHECK_ENDIAN__
-LIBUUID = $(shell ld -o /dev/null -luuid >/dev/null 2>&1; echo $$?)
+LIBUUID = $(shell $(LD) -o /dev/null -luuid >/dev/null 2>&1; echo $$?)
 NVME = nvme
 INSTALL ?= install
 DESTDIR =