1From 9eb3cc5c51d846c8c8b750a4eb55545d7b5fea6c Mon Sep 17 00:00:00 2001
2From: Mike Frysinger <vapier@gentoo.org>
3Date: Wed, 23 Apr 2014 15:41:26 -0400
4Subject: [PATCH] use LDLIBS for linker flags
5
6When you put -lfoo into the dependency line of make, it forces it to
7search /lib and /usr/lib for files to link against. This can cause
8problems when trying to cross-compile or build for different ABIs.
9Use the standard LDLIBS variable instead.
10
11URL: https://bugs.gentoo.org/505760
12Reported-by: Georgi Georgiev <chutzimir@gmail.com>
13Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14---
15 Makefile | 3 ++-
16 1 file changed, 2 insertions(+), 1 deletion(-)
17
18diff --git a/Makefile b/Makefile
19index f3838b4..f2e9a6e 100644
20--- a/Makefile
21+++ b/Makefile
22@@ -31,7 +31,8 @@ docdir := ${prefix}/share/doc
23
24 all: numad
25
26-numad: numad.o -lpthread
27+LDLIBS := -lpthread
28+numad: numad.o
29
30 AR ?= ar
31 RANLIB ?= ranlib
32--
331.9.2