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 1/3] selftest/memfd/Makefile: Fix build error
Date: Sun, 18 Jun 2017 09:56:02 +0900 [thread overview]
Message-ID: <20170618005604.17639-2-sj38.park@gmail.com> (raw)
In-Reply-To: <20170618005604.17639-1-sj38.park@gmail.com>
Selftest for memfd shows build error as below:
```
gcc -D_FILE_OFFSET_BITS=64 -I../../../../include/uapi/ -I../../../../include/ -I../../../../usr/include/ fuse_mnt.c -o /home/sjpark/linux/tools/testing/selftests/memfd/fuse_mnt
/tmp/cc6NHdwJ.o: In function `main':
fuse_mnt.c:(.text+0x249): undefined reference to `fuse_main_real'
collect2: error: ld returned 1 exit status
```
The build fails because output file is specified without $(OUTPUT) and
LDFLAGS is used though Makefile implicit rule is used. This commit
fixes the error by specifying output file path with $(OUTPUT) and using
LDLIBS instead of LDFLAGS.
Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
tools/testing/selftests/memfd/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/memfd/Makefile b/tools/testing/selftests/memfd/Makefile
index 79891d033de1..ad8a0897e47f 100644
--- a/tools/testing/selftests/memfd/Makefile
+++ b/tools/testing/selftests/memfd/Makefile
@@ -7,7 +7,7 @@ TEST_PROGS := run_fuse_test.sh
TEST_GEN_FILES := memfd_test fuse_mnt fuse_test
fuse_mnt.o: CFLAGS += $(shell pkg-config fuse --cflags)
-fuse_mnt: LDFLAGS += $(shell pkg-config fuse --libs)
include ../lib.mk
+$(OUTPUT)/fuse_mnt: LDLIBS += $(shell pkg-config fuse --libs)
--
2.13.0
next prev 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 ` SeongJae Park [this message]
2017-06-18 0:56 ` [PATCH 2/3] selftest/intel_pstate/aperf: Use LDLIBS instead of LDFLAGS SeongJae Park
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-2-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).