From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3199C54FD0 for ; Thu, 23 Apr 2020 07:40:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A26FC21582 for ; Thu, 23 Apr 2020 07:40:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587627640; bh=oX1Yizvm022sZLLTBHMIoLMjSvEhk0YAaF3tm2Z0fOo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=CL4MBM1Io3WGdWOqt1IIdgfA8U3fWEPTD/HUHRH9Szm7mfT6SargGa/2ecjrsxSTr 6aMF5yENC/53Ina+MDEW+S3f+Sbg0RLK/TFVeLW3nmKnT+TulOebqiBLRuF0Lc5jjQ 4XL/oLPwbB1nZsRu4Cwty9dNZz42AVJHMJHH4Le0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726953AbgDWHkk (ORCPT ); Thu, 23 Apr 2020 03:40:40 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:31787 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726859AbgDWHkd (ORCPT ); Thu, 23 Apr 2020 03:40:33 -0400 Received: from oscar.flets-west.jp (softbank126090202047.bbtec.net [126.90.202.47]) (authenticated) by conuserg-10.nifty.com with ESMTP id 03N7dV9Z000368; Thu, 23 Apr 2020 16:39:45 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com 03N7dV9Z000368 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1587627587; bh=hA9zKaYolCBXen9YqFKBxUtOtwyQMnhMjhiUYnYYBtg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j3N5a4M/3pkD919qlPicRMxcgkvR8hut/hs/t+tK7ZIAr2tqSGDEr9LQDf087UNUR kj/A0Oini8KGUWlzLarA0l0peNzA3qLMP8a6KoY3Tr5+0pqBre3p3kajWxLZ23JlHR xEskoeVk0jMj+mBH/pQtpOJ42ck9CFmMP1cRZCUQCnUcAq1yiQum1gcsi7OfQzJJ1r eW+kNQ0WSYt6/1tJa1U3k+uWZiU5cjP5EsmNvhTiwm6aKYnZh7OQSek5cs5Es8BJIo hyG27PQOQ5vcdZHgctN1vhTRTA3naqLyRw6tU1O1kz+8/iVH7Th3hS8OL5jX0HRE28 Pqwc7TTw11xEQ== X-Nifty-SrcIP: [126.90.202.47] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: bpf@vger.kernel.org, Sam Ravnborg , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 14/16] samples: auxdisplay: use 'userprogs' syntax Date: Thu, 23 Apr 2020 16:39:27 +0900 Message-Id: <20200423073929.127521-15-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200423073929.127521-1-masahiroy@kernel.org> References: <20200423073929.127521-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kbuild now supports the 'userprogs' syntax to describe the build rules of userspace programs for the target architecture (i.e. the same architecture as the kernel). Add the entry to samples/Makefile to put this into the build bot coverage. I also added the CONFIG option guarded by 'depends on CC_CAN_LINK' because $(CC) may not necessarily provide libc. Signed-off-by: Masahiro Yamada --- samples/Kconfig | 4 ++++ samples/Makefile | 1 + samples/auxdisplay/Makefile | 11 ++--------- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/samples/Kconfig b/samples/Kconfig index b9dafee5d3af..cdb0091e4734 100644 --- a/samples/Kconfig +++ b/samples/Kconfig @@ -6,6 +6,10 @@ menuconfig SAMPLES if SAMPLES +config SAMPLE_AUXDISPLAY + bool "auxdisplay sample" + depends on CC_CAN_LINK + config SAMPLE_TRACE_EVENTS tristate "Build trace_events examples -- loadable modules only" depends on EVENT_TRACING && m diff --git a/samples/Makefile b/samples/Makefile index bdc168405452..0c43b5d34b15 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 # Makefile for Linux samples code +subdir-$(CONFIG_SAMPLE_AUXDISPLAY) += auxdisplay obj-$(CONFIG_SAMPLE_ANDROID_BINDERFS) += binderfs/ obj-$(CONFIG_SAMPLE_CONFIGFS) += configfs/ obj-$(CONFIG_SAMPLE_CONNECTOR) += connector/ diff --git a/samples/auxdisplay/Makefile b/samples/auxdisplay/Makefile index 0273bab27233..dbdf939af94a 100644 --- a/samples/auxdisplay/Makefile +++ b/samples/auxdisplay/Makefile @@ -1,10 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 -CC := $(CROSS_COMPILE)gcc -CFLAGS := -I../../usr/include - -PROGS := cfag12864b-example - -all: $(PROGS) - -clean: - rm -fr $(PROGS) +userprogs := cfag12864b-example +always-y := $(userprogs) -- 2.25.1