[PATCH] selftests/futex: Add -pthread to CFLAGS and LDFLAGS

From: Darren Hart
Date: Tue May 12 2015 - 12:54:39 EST


Certain environments fail to build with the "-lpthread -lrt" LDFLAGS.
Using "-pthread" instead of "-lpthread" resolves this and is the
documented mechanism in the gcc man page.

Signed-off-by: Darren Hart <dvhart@xxxxxxxxxxxxxxx>
---
tools/testing/selftests/futex/functional/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile
index e64d43b..9d6b75e 100644
--- a/tools/testing/selftests/futex/functional/Makefile
+++ b/tools/testing/selftests/futex/functional/Makefile
@@ -1,6 +1,6 @@
INCLUDES := -I../include -I../../
-CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE $(INCLUDES)
-LDFLAGS := $(LDFLAGS) -lpthread -lrt
+CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES)
+LDFLAGS := $(LDFLAGS) -pthread -lrt

HEADERS := ../include/futextest.h
TARGETS := \
--
2.1.4


--
Darren Hart
Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/