aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/intel_pstate
diff options
context:
space:
mode:
authorSeongJae Park <sj38.park@gmail.com>2017-06-18 09:56:03 +0900
committerShuah Khan <shuahkh@osg.samsung.com>2017-06-23 13:35:08 -0600
commitdc816e5d84cbc28baf776799839a632d6002236f (patch)
tree7a5f67d5541d3c5c075603e4e5b94d01342d15cf /tools/testing/selftests/intel_pstate
parentselftest/memfd/Makefile: Fix build error (diff)
downloadlinux-dev-dc816e5d84cbc28baf776799839a632d6002236f.tar.xz
linux-dev-dc816e5d84cbc28baf776799839a632d6002236f.zip
selftest/intel_pstate/aperf: Use LDLIBS instead of LDFLAGS
Build of aperf fails as below: ``` gcc -Wall -D_GNU_SOURCE -lm aperf.c -o /tools/testing/selftests/intel_pstate/aperf /tmp/ccKf3GF6.o: In function `main': aperf.c:(.text+0x278): undefined reference to `sqrt' collect2: error: ld returned 1 exit status ``` The faulure occurs because -lm was defined as LDFLAGS and implicit rule of make places LDFLAGS before source file. This commit fixes the problem by using LDLIBS instead of LDFLAGS. Signed-off-by: SeongJae Park <sj38.park@gmail.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools/testing/selftests/intel_pstate')
-rw-r--r--tools/testing/selftests/intel_pstate/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/intel_pstate/Makefile b/tools/testing/selftests/intel_pstate/Makefile
index 19678e90efb2..849a90ffe8dd 100644
--- a/tools/testing/selftests/intel_pstate/Makefile
+++ b/tools/testing/selftests/intel_pstate/Makefile
@@ -1,5 +1,5 @@
CFLAGS := $(CFLAGS) -Wall -D_GNU_SOURCE
-LDFLAGS := $(LDFLAGS) -lm
+LDLIBS := $(LDLIBS) -lm
TEST_GEN_FILES := msr aperf