浏览代码

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>
SeongJae Park 8 年之前
父节点
当前提交
dc816e5d84
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tools/testing/selftests/intel_pstate/Makefile

+ 1 - 1
tools/testing/selftests/intel_pstate/Makefile

@@ -1,5 +1,5 @@
 CFLAGS := $(CFLAGS) -Wall -D_GNU_SOURCE
 CFLAGS := $(CFLAGS) -Wall -D_GNU_SOURCE
-LDFLAGS := $(LDFLAGS) -lm
+LDLIBS := $(LDLIBS) -lm
 
 
 TEST_GEN_FILES := msr aperf
 TEST_GEN_FILES := msr aperf