Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftest/memfd: enable cross compilation

Use the CC variable instead of hard coding gcc. Also clean up the compiler
options by creating a CFLAGS variable.

Signed-off-by: Tyler Baker <tyler.baker@linaro.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>

authored by

Tyler Baker and committed by
Shuah Khan
52dd5576 48fd77d1

+4 -3
+4 -3
tools/testing/selftests/memfd/Makefile
··· 1 + CC = $(CROSS_COMPILE)gcc 1 2 CFLAGS += -D_FILE_OFFSET_BITS=64 2 3 CFLAGS += -I../../../../include/uapi/ 3 4 CFLAGS += -I../../../../include/ 4 5 5 6 all: 6 - gcc $(CFLAGS) memfd_test.c -o memfd_test 7 + $(CC) $(CFLAGS) memfd_test.c -o memfd_test 7 8 8 9 TEST_PROGS := memfd_test 9 10 10 11 include ../lib.mk 11 12 12 13 build_fuse: 13 - gcc $(CFLAGS) fuse_mnt.c `pkg-config fuse --cflags --libs` -o fuse_mnt 14 - gcc $(CFLAGS) fuse_test.c -o fuse_test 14 + $(CC) $(CFLAGS) fuse_mnt.c `pkg-config fuse --cflags --libs` -o fuse_mnt 15 + $(CC) $(CFLAGS) fuse_test.c -o fuse_test 15 16 16 17 run_fuse: build_fuse 17 18 @./run_fuse_test.sh || echo "fuse_test: [FAIL]"