Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp968401imm; Wed, 25 Jul 2018 09:09:36 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfBV2BV6LVInF9LYrlrmJeohwKat2bUd2h061/YpHSfVIBYBzOKE/LhNvjIj57pEYJCW6Sk X-Received: by 2002:a17:902:9681:: with SMTP id n1-v6mr22316902plp.244.1532534976409; Wed, 25 Jul 2018 09:09:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532534976; cv=none; d=google.com; s=arc-20160816; b=gJTKUR0bBjxS9y2uHLqXW4/dRkCw9ZGzbuBXBkWeSt7HKoFUWxAmJ9s+5Hc+5WB192 zRyXkarGCJPe3pg2DLYuwvYwaJ0IxNWvF9l/CMGwknJ2Ajrhq21J1CpeNiaVeAALf9am YqpgyTBPmtg73dDoVqkYImFepvennPpuHAfTmIajPI15+j2uHnnHlzLaSKQw+7Mwpkmy AfR8eIYlTuJKno2eEOc3LSWnOz6gBg3EH4MtpdF0bapGc+eaTq7y+f/wKBxbEdZvMeza Hyp2HyzS7ovelwaYUwTnVTjNsvUEoawe2Bf3hmgXEJvPxrl5WKaeypIIdjx0qqA2rXI5 WLKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=F0TWKqkF+3mDOHQcx4WLIh/IEJGCqlqopmSchDYFJGI=; b=GUCHiXCkP9//9xTzYa+IZMsYl4dyLqqWW7qSJrEHRZYOgGqVBx9EhBSi7YxqWHu800 dhv5EM/nG9+JRqbent/OvEJiZggud29ZVTmM6Rvoz+k2x78+hOJ0eDJng2May5583Bg9 ALVMh/wZ/TZo/pjrNmNf5OlC6dvZEPDEIli1xHUGuy8c2OCskiAVLVmbd08D3tWVJ3de eJF5k8hF91q4VW3pQ7Sr/cF2IYPazxMyjkg7+Crr8OOo+ynttaLWHyUI4gyhLP3J76vi u6D6o5HJBcMTrgiBr4tKYKBqwmW7jnwfj5aLKc8pmaLKFmEbMdxQSJIh0m8ywbZucQbF VGFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=barrJS+Y; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2-v6si15135136plm.202.2018.07.25.09.09.21; Wed, 25 Jul 2018 09:09:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=barrJS+Y; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729272AbeGYRUu (ORCPT + 99 others); Wed, 25 Jul 2018 13:20:50 -0400 Received: from mail-yw0-f196.google.com ([209.85.161.196]:42104 "EHLO mail-yw0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728653AbeGYRUt (ORCPT ); Wed, 25 Jul 2018 13:20:49 -0400 Received: by mail-yw0-f196.google.com with SMTP id y203-v6so3047091ywd.9 for ; Wed, 25 Jul 2018 09:08:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=F0TWKqkF+3mDOHQcx4WLIh/IEJGCqlqopmSchDYFJGI=; b=barrJS+Y7+cYykEZRirGVaK0a6GUqNaUzj4wTlUofVu6jM81m/qP6tPqOJFeFvd3j5 tt0GgdvPy5lDXrByv6x42Tx+hAUg+M0zzfUwBvuMfhgLIW/aO94fxJEQoJXfEFBf9nMf McH6QWZeh7oW7J8Srb678PmG7FEW4EYkPXwBM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=F0TWKqkF+3mDOHQcx4WLIh/IEJGCqlqopmSchDYFJGI=; b=hPapJdhPuC9aHjXRIy04OvfWXkRPCCCBVU944aSF8Z+rTP5UPowTf4PfxsRw8xu0uH 5WDE2yYAsCe+TCT714uHxmbJOdEg5JoVwgTONnjihgiBZl7F0A+z23tnwINgKqyIu7ey YjHg/P/ylqWRygD0+wZB8Wogai6soR0HcXy7vYhHyTRfTciViIsIf59YMLGnYJHXS2lI cJlbnLOeE/BsctI1tYMjZe2ogRa1Zjj/zyRDAIcqvMaMnOegUzJBrWGsL3jqCxUxJWkV +oGEUb/RQJsVwpgvkklrF7FNGV/V8hs94JfXjiZuWj3kFhR+/PUU8lZ98uemoBSEbpvF VeFg== X-Gm-Message-State: AOUpUlGBDpNGZz0Cr2o1oJ9SEksD+nL2w1n5hIjwSzqNlEsOPd87lZ4D 3ElIjZTkx1fa3phgT7mJ3LyzTgstxIA8f2ioNz3xtA== X-Received: by 2002:a0d:f704:: with SMTP id h4-v6mr11160932ywf.240.1532534908784; Wed, 25 Jul 2018 09:08:28 -0700 (PDT) MIME-Version: 1.0 References: <20180413090351.25662-1-anders.roxell@linaro.org> <20180607110911.12252-1-anders.roxell@linaro.org> In-Reply-To: From: Anders Roxell Date: Wed, 25 Jul 2018 18:08:17 +0200 Message-ID: Subject: Re: [PATCH v4] selftests: add headers_install to lib.mk To: Shuah Khan Cc: Masahiro Yamada , Michal Marek , Bamvor Zhang , brgl@bgdev.pl, Paolo Bonzini , Andrew Morton , Mike Rapoport , aarcange@redhat.com, linux-kbuild@vger.kernel.org, Linux Kernel Mailing List , "open list:KERNEL SELFTEST FRAMEWORK" , Networking Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 24 Jul 2018 at 19:11, Shuah Khan wrote: > > On 07/23/2018 02:49 PM, Anders Roxell wrote: > > On Thu, 7 Jun 2018 at 13:09, Anders Roxell wrote: > >> > >> If the kernel headers aren't installed we can't build all the tests. > >> Add a new make target rule 'khdr' in the file lib.mk to generate the > >> kernel headers and that gets include for every test-dir Makefile that > >> includes lib.mk If the testdir in turn have its own sub-dirs the > >> top_srcdir needs to be set to the linux-rootdir to be able to generate > >> the kernel headers. > >> > >> Signed-off-by: Anders Roxell > >> Reviewed-by: Fathi Boudra > >> --- > >> Makefile | 14 +------------- > >> scripts/subarch.include | 13 +++++++++++++ > >> tools/testing/selftests/android/Makefile | 2 +- > >> tools/testing/selftests/android/ion/Makefile | 2 ++ > >> tools/testing/selftests/futex/functional/Makefile | 1 + > >> tools/testing/selftests/gpio/Makefile | 7 ++----- > >> tools/testing/selftests/kvm/Makefile | 7 ++----- > >> tools/testing/selftests/lib.mk | 12 ++++++++++++ > >> tools/testing/selftests/net/Makefile | 1 + > >> .../selftests/networking/timestamping/Makefile | 1 + > >> tools/testing/selftests/vm/Makefile | 4 ---- > >> 11 files changed, 36 insertions(+), 28 deletions(-) > >> create mode 100644 scripts/subarch.include > >> > >> diff --git a/Makefile b/Makefile > >> index 6b9aea95ae3a..8050072300fa 100644 > >> --- a/Makefile > >> +++ b/Makefile > >> @@ -286,19 +286,7 @@ KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) > >> KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) > >> export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION > >> > >> -# SUBARCH tells the usermode build what the underlying arch is. That is set > >> -# first, and if a usermode build is happening, the "ARCH=um" on the command > >> -# line overrides the setting of ARCH below. If a native build is happening, > >> -# then ARCH is assigned, getting whatever value it gets normally, and > >> -# SUBARCH is subsequently ignored. > >> - > >> -SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ > >> - -e s/sun4u/sparc64/ \ > >> - -e s/arm.*/arm/ -e s/sa110/arm/ \ > >> - -e s/s390x/s390/ -e s/parisc64/parisc/ \ > >> - -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ > >> - -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \ > >> - -e s/riscv.*/riscv/) > >> +include scripts/subarch.include > > What is the reason for this SUBARCH block move to to scripts/subarch.include? > Is this necessary for adding headers install dependency to lib.mk? This is needed to create headers for cross build. Cheers, Anders