APPLIED: [PATCH][Artful] selftest/memfd/Makefile: Fix build error

Seth Forshee seth.forshee at canonical.com
Mon Jul 24 16:38:47 UTC 2017


On Mon, Jul 24, 2017 at 03:43:00PM +0800, Po-Hsu Lin wrote:
> From: SeongJae Park <sj38.park at 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 at gmail.com>
> Signed-off-by: Shuah Khan <shuahkh at osg.samsung.com>
> (cherry picked from commit d02db4f5b2c9159a9c8e22c57b90b48268ccd6ee)
> Signed-off-by: Po-Hsu Lin <po-hsu.lin at canonical.com>

Applied to artful/master-next and unstable/master, thanks!




More information about the kernel-team mailing list