diff --git a/package/nvme/0001-Makefile-allow-linker-override-for-cross-uuid-test.patch b/package/nvme/0001-Makefile-allow-linker-override-for-cross-uuid-test.patch new file mode 100644 index 0000000000..dc1c01a888 --- /dev/null +++ b/package/nvme/0001-Makefile-allow-linker-override-for-cross-uuid-test.patch @@ -0,0 +1,34 @@ +From f926559acd1beb74dc5dc9b0e414b087110a251f Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Wed, 9 Aug 2017 09:43:12 +0300 +Subject: [PATCH] Makefile: allow linker override for cross uuid test + +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 +--- +Upstream status: https://github.com/linux-nvme/nvme-cli/pull/216 + + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 3f1d9aaa890d..cc74bdd6c3e6 100644 +--- 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 = +-- +2.13.2 +