Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752777AbbDAXUg (ORCPT ); Wed, 1 Apr 2015 19:20:36 -0400 Received: from mail-pd0-f171.google.com ([209.85.192.171]:36254 "EHLO mail-pd0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752687AbbDAXUc (ORCPT ); Wed, 1 Apr 2015 19:20:32 -0400 From: Tyler Baker To: Shuah Khan Cc: Kevin Hilman , John Stultz , Darren Hart , David Herrmann , Michael Ellerman , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tyler Baker Subject: [PATCH 1/6] selftest/memfd: enable cross compilation Date: Wed, 1 Apr 2015 16:20:15 -0700 Message-Id: <1427930420-4762-2-git-send-email-tyler.baker@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1427930420-4762-1-git-send-email-tyler.baker@linaro.org> References: <1427930420-4762-1-git-send-email-tyler.baker@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1359 Lines: 42 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 --- tools/testing/selftests/memfd/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/memfd/Makefile b/tools/testing/selftests/memfd/Makefile index 191dee9..69f08ab 100644 --- a/tools/testing/selftests/memfd/Makefile +++ b/tools/testing/selftests/memfd/Makefile @@ -1,17 +1,18 @@ +CC = $(CROSS_COMPILE)gcc CFLAGS += -D_FILE_OFFSET_BITS=64 CFLAGS += -I../../../../include/uapi/ CFLAGS += -I../../../../include/ all: - gcc $(CFLAGS) memfd_test.c -o memfd_test + $(CC) $(CFLAGS) memfd_test.c -o memfd_test TEST_PROGS := memfd_test include ../lib.mk build_fuse: - gcc $(CFLAGS) fuse_mnt.c `pkg-config fuse --cflags --libs` -o fuse_mnt - gcc $(CFLAGS) fuse_test.c -o fuse_test + $(CC) $(CFLAGS) fuse_mnt.c `pkg-config fuse --cflags --libs` -o fuse_mnt + $(CC) $(CFLAGS) fuse_test.c -o fuse_test run_fuse: build_fuse @./run_fuse_test.sh || echo "fuse_test: [FAIL]" -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/