netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj38.park@gmail.com>
To: shuah@kernel.org
Cc: bamvor.zhangjian@linaro.org, shorne@gmail.com,
	davem@davemloft.net, linux-kselftest@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	SeongJae Park <sj38.park@gmail.com>
Subject: [PATCH 2/3] selftest/intel_pstate/aperf: Use LDLIBS instead of LDFLAGS
Date: Sun, 18 Jun 2017 09:56:03 +0900	[thread overview]
Message-ID: <20170618005604.17639-3-sj38.park@gmail.com> (raw)
In-Reply-To: <20170618005604.17639-1-sj38.park@gmail.com>

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>
---
 tools/testing/selftests/intel_pstate/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
 
-- 
2.13.0

  parent reply	other threads:[~2017-06-18  0:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-18  0:56 [PATCH 0/3] selftest: Fix build errors SeongJae Park
2017-06-18  0:56 ` [PATCH 1/3] selftest/memfd/Makefile: Fix build error SeongJae Park
2017-06-18  0:56 ` SeongJae Park [this message]
2017-06-18  0:56 ` [PATCH 3/3] selftest/net/Makefile: Specify output with $(OUTPUT) SeongJae Park
2017-06-18  2:48   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170618005604.17639-3-sj38.park@gmail.com \
    --to=sj38.park@gmail.com \
    --cc=bamvor.zhangjian@linaro.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shorne@gmail.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).