From patchwork Fri Sep 9 22:22:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 668302 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3sWBfx1ffqz9sdm for ; Sat, 10 Sep 2016 08:28:09 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755367AbcIIW2C (ORCPT ); Fri, 9 Sep 2016 18:28:02 -0400 Received: from resqmta-po-11v.sys.comcast.net ([96.114.154.170]:50692 "EHLO resqmta-po-11v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751120AbcIIW16 (ORCPT ); Fri, 9 Sep 2016 18:27:58 -0400 Received: from resomta-po-15v.sys.comcast.net ([96.114.154.239]) by resqmta-po-11v.sys.comcast.net with SMTP id iUC2bu3jFEp5XiUCWbP1HX; Fri, 09 Sep 2016 22:23:12 +0000 Received: from mail.gonehiking.org ([73.181.52.62]) by resomta-po-15v.sys.comcast.net with SMTP id iUCWbCTrd1h62iUCWbB4VS; Fri, 09 Sep 2016 22:23:12 +0000 Received: from shuah-XPS-13-9350.sisa.samsung.com (shuah-xps.internal [192.168.1.87]) by mail.gonehiking.org (Postfix) with ESMTP id DBFC79F340; Fri, 9 Sep 2016 16:23:11 -0600 (MDT) From: Shuah Khan To: corbet@lwn.net, richardcochran@gmail.com Cc: Shuah Khan , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH 9/9] selftests: Update vDSO Makefile to work under selftests Date: Fri, 9 Sep 2016 16:22:50 -0600 Message-Id: <2034b315d4f40df479ba7ada1580a22fd91a75b4.1473458697.git.shuahkh@osg.samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: X-CMAE-Envelope: MS4wfEnb59pQvhxWeL2kSxQbW7e8ba4SeP4TsT8EjF2r5QUX8XaJjPBBvgVyDpFFIW4f+o6G3RmOkjd86tXVf6e43tZmLivNxLYS0SW7yva/crfHGLrRT3t8 bkxdcBk8gWm8KIfEz8Gj8kBzRtEY9xiRE1OqbYc1NllLaQIMCcbHUCqI1r3Mbw1+8bmX6yIlzH5P9oY2KhY93BzcWyGodFsnSWwyk1w4z1afmXzihv8cXpuV 6hu3oo17fF4eJdHShcaIXiVEX3HwT1d1Au1B/+O9mnMP6vx/vMKIftaW+CYiIxHeLNC8v8VIcXzqlL0mE5ivrEZlEdRcV7byQzPowiDVKhXs5bV7S8nB2JjN T10HGSYbDKdlgfM7klbJZlFbwEEckzy+QJAR+MGF0uzRY4Dpc5vcMB9Mne/VCxs5ocEg2ay0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Update vDSO Makefile to work under selftests. vDSO will not be run as part of selftests suite and will not included in install targets. They can be built separately for now. Signed-off-by: Shuah Khan --- tools/testing/selftests/vDSO/Makefile | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests/vDSO/Makefile index b12e987..706b68b 100644 --- a/tools/testing/selftests/vDSO/Makefile +++ b/tools/testing/selftests/vDSO/Makefile @@ -1,17 +1,20 @@ ifndef CROSS_COMPILE -# vdso_test won't build for glibc < 2.16, so disable it -# hostprogs-y := vdso_test -hostprogs-$(CONFIG_X86) := vdso_standalone_test_x86 -vdso_standalone_test_x86-objs := vdso_standalone_test_x86.o parse_vdso.o -vdso_test-objs := parse_vdso.o vdso_test.o - -# Tell kbuild to always build the programs -always := $(hostprogs-y) - -HOSTCFLAGS := -I$(objtree)/usr/include -std=gnu99 -HOSTCFLAGS_vdso_standalone_test_x86.o := -fno-asynchronous-unwind-tables -fno-stack-protector -HOSTLOADLIBES_vdso_standalone_test_x86 := -nostdlib +CFLAGS := -std=gnu99 +CFLAGS_vdso_standalone_test_x86 := -nostdlib -fno-asynchronous-unwind-tables -fno-stack-protector ifeq ($(CONFIG_X86_32),y) -HOSTLOADLIBES_vdso_standalone_test_x86 += -lgcc_s +LDLIBS += -lgcc_s endif + +TEST_PROGS := vdso_test vdso_standalone_test_x86 + +all: $(TEST_PROGS) +vdso_test: parse_vdso.c vdso_test.c +vdso_standalone_test_x86: vdso_standalone_test_x86.c parse_vdso.c + $(CC) $(CFLAGS) $(CFLAGS_vdso_standalone_test_x86) \ + vdso_standalone_test_x86.c parse_vdso.c \ + -o vdso_standalone_test_x86 + +include ../lib.mk +clean: + rm -fr $(TEST_PROGS) endif