Received: by 10.213.65.68 with SMTP id h4csp1518847imn; Wed, 4 Apr 2018 22:03:00 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+BHvjBoy8yq7bzHq344iRE5r7E9PL2HpO8gBd9eo1SNkBsu9Y2snqiR1RhLSn4TO+Ikduk X-Received: by 10.98.74.17 with SMTP id x17mr4423512pfa.91.1522904580239; Wed, 04 Apr 2018 22:03:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522904580; cv=none; d=google.com; s=arc-20160816; b=Pjn+ezz2xVuBUw0ISjIMM3PV5e0THrl+qWPOUggY+/TcDNCObSaIs6dWm1FAVQigdH NLLGryuxnTQ6K/xHL7PXzgs2wfXZL9h01flkKWJOw0o1CLH43KLfh8faJHCYZwd76JDe gSLRxfgY3/E6qtZtHqPg1khWRO2Lw8BRF0qgN2DNbP5x7yrLA+89v1G69gMoRu526ccu bYk5qDGsJXGS1GvPMx2AVkGZ9aNFnJtvfCOY3n+7h2vn/h/dm8Hsk8u2/KW67FZT+mCC 03MhhQS4livydzA/HRxNy5wL2jxrWJMUC7g9rd8AA1DUoh6oGNQkWgIN3dxektZnIvTx SXIw== 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 :references:in-reply-to:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=zmwJSjWXkgyEiGH0mYUqd6BGVUfyyotsB+ls5bpfjds=; b=NkofOZiPROJ6HqRF9UaAafnwHwvhaWMW993aQYJwpdFOzTQo1DTD+rDM8fflgJl8pu FFcedP7RLrDb/LDXb9iueIXHOV3nVHgn+mj6aUQdTrK063NT69hW+UHrrCxjYQCf3gbA kPgBWvFBHMqzSq7MadY5xBiFTaHntlpDAIgcno5AvvQpx3cPSDMNipoV9zlClCn+MwBQ ixbL4BNLOagdlT419Y+OE/keHI5siTnl6R6muh/ItsNv3lMzsZ4eDnPSDzTU+kfX8X1+ NbScGjJ1AHXuQrd26TiqsguOF1zkwkMqus0hy6RdjiL2wRDAhoTpG/vIgDn1TX8nZvub iVBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=cbfBIDwK; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z73-v6si5662663plh.35.2018.04.04.22.02.32; Wed, 04 Apr 2018 22:03:00 -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=@nifty.com header.s=dec2015msa header.b=cbfBIDwK; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751392AbeDEFAr (ORCPT + 99 others); Thu, 5 Apr 2018 01:00:47 -0400 Received: from conssluserg-04.nifty.com ([210.131.2.83]:40636 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751038AbeDEFAp (ORCPT ); Thu, 5 Apr 2018 01:00:45 -0400 Received: from mail-ua0-f171.google.com (mail-ua0-f171.google.com [209.85.217.171]) (authenticated) by conssluserg-04.nifty.com with ESMTP id w3550dYm032478; Thu, 5 Apr 2018 14:00:40 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com w3550dYm032478 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1522904440; bh=zmwJSjWXkgyEiGH0mYUqd6BGVUfyyotsB+ls5bpfjds=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=cbfBIDwKJNK1I/MNulZVELVEYltsfiLo4P17zyzJalZjCO/dBfhzmu4dNJym/pz0X Zf8OZ4n4u5RBV/e14aQL+LDUmFGuHkWB5iriVBinu14Z3xjbPkPOoWml+kXqFHOIGe 2ZiB/H20i9cKbw08DrFSV9Jm2I/XJGcgwHZg5+3ldhxRhQLrHAapsxBjusjsGn9mxF mlWvTDAe2kDKCwpX0hQkLewWynD0gKcekHno7Td2WtGixJPoCo+5FdZy349o08ouzT a29fyp5p8b2hkXU5iBA5qdFpL0mXiVDo8K/yMeawYbqi0orTaMIngkkwUNsmkpGyaq /DttDQhluXB0Q== X-Nifty-SrcIP: [209.85.217.171] Received: by mail-ua0-f171.google.com with SMTP id c3so7334698uae.2; Wed, 04 Apr 2018 22:00:40 -0700 (PDT) X-Gm-Message-State: ALQs6tBI+TEtBKXOrcnWlygkxHCdF45Xj7MHNFQECEb/aQuz1LF/0RjU vZX/hLr8UZyODvvQhW6rdAcI9HuvAf9LAlN/Pq4= X-Received: by 10.159.58.88 with SMTP id r24mr13076068uag.140.1522904439337; Wed, 04 Apr 2018 22:00:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.29.150 with HTTP; Wed, 4 Apr 2018 21:59:58 -0700 (PDT) In-Reply-To: <20180329004805.7278-4-labbott@redhat.com> References: <20180329004805.7278-1-labbott@redhat.com> <20180329004805.7278-4-labbott@redhat.com> From: Masahiro Yamada Date: Thu, 5 Apr 2018 13:59:58 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/3] kbuild: Allow passing additional HOSTCFLAGS and HOSTLDFLAGS To: Laura Abbott Cc: Michal Marek , Linux Kbuild mailing list , Linux Kernel Mailing List , Josh Poimboeuf 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 2018-03-29 9:48 GMT+09:00 Laura Abbott : > > Similar to AFLAGS_KBUILD, there may be uses (e.g. hardening) for passing in > additional flags to host programs. Allow these to be passed in from the > environment. > > Signed-off-by: Laura Abbott > --- > Documentation/kbuild/kbuild.txt | 9 +++++++++ > Makefile | 3 +++ > 2 files changed, 12 insertions(+) > > diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt > index ac2363ea05c5..3751a4bc8596 100644 > --- a/Documentation/kbuild/kbuild.txt > +++ b/Documentation/kbuild/kbuild.txt > @@ -24,6 +24,15 @@ KAFLAGS > -------------------------------------------------- > Additional options to the assembler (for built-in and modules). > > +AFLAGS_HOSTCFLAGS > +-------------------------------------------------- > +Additional options passed to the compiler when building host programs. > + > +AFLAGS_HOSTLDFLAGS > +-------------------------------------------------- > +Additional options passed to the linker (through the compiler) when buidling > +host programs. > + I am afraid you misunderstood the meaning of 'AFLAGS'. AFLAGS is not 'Additional flags', but 'Assembler flags' that are used for compiling *.S files. AFLAGS for host programs is weird. I see similar proposals from different people. I replied like follows: https://lkml.org/lkml/2018/2/28/178 However, Robin seems busy lately. I will wait a bit, then if nobody does this, I may do it. > AFLAGS_MODULE > -------------------------------------------------- > Additional module specific options to use for $(AS). > diff --git a/Makefile b/Makefile > index 7ba478ab8c82..2cab3f8d489c 100644 > --- a/Makefile > +++ b/Makefile > @@ -367,6 +367,9 @@ HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS) > HOSTLDFLAGS := $(HOST_LFS_LDFLAGS) > HOST_LOADLIBES := $(HOST_LFS_LIBS) > > +HOSTCFLAGS += $(AFLAGS_HOSTCFLAGS) > +HOSTLDFLAGS += $(AFLAGS_HOSTLDFLAGS) > + > # Make variables (CC, etc...) > AS = $(CROSS_COMPILE)as > LD = $(CROSS_COMPILE)ld > -- > 2.16.2 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Best Regards Masahiro Yamada