Received: by 10.213.65.68 with SMTP id h4csp2422656imn; Thu, 5 Apr 2018 14:55:27 -0700 (PDT) X-Google-Smtp-Source: AIpwx49toRv4JPXYJNYx21CjLwfrOBCnTuWMS/2uLOtO98xMxIsMNYcetEKUkeh2aZnrK08ctATR X-Received: by 2002:a17:902:7482:: with SMTP id h2-v6mr24856293pll.264.1522965327394; Thu, 05 Apr 2018 14:55:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522965327; cv=none; d=google.com; s=arc-20160816; b=QXEqrWXjj7GTeAro59tNAOB7Cq+vGHtIbspXRcLlmsaeX1hBLRy9Cs4qMlpbDlzsg3 fGPEbS4s8L+ir/OkF5ieAQFPG175hW6qBLeEPGjOPHuBamRNl37Hwi/KU+rGGYQgz8vr X2pu4RI4N9n9pWnWnn+JJ5jztHx7DIFnUvCQioSU1j6W7E13Sd4A11u2qwVSWOCJsOpj 9HQGqpkQcNJUVc6oELruBNpUEnmcKcJHgwUZZxHP341WgzxztmF9KFv1iNPvO/ZeJGzW KtuLQ5AEVQ/NMK/Etz9qR6kQLJ6ZupCffgvJJ9SC2T4QWb2GeJ8y2GBn/mEMVl19Lg85 IHBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=zcHbdI5Y1IavNAvLG/HPbNgn+DiHgp55koEBoyUdDCU=; b=rSVpKRAobQdfaVFYKrtdcavqHia5f9yvvH5omEJM/dIcPg3ysh5krbc1roF01EGKvh irw7ZQ3R6QN7b4ofczTPvNt3yv9APjZELmX3bl8sgIdZYiXWY4hEt04Y3+2qPpJVld7f E6A3+3t1GqhUMKKCT0W7wY/sI7OmEXqZccFNQr1OI8MZ+VULuhW71i8uaJRgO8OJrMT9 zZ57WaqQnagzRolfl1i4ct/Mo68j6ZEqbSpbD4pf1aEO32oDtjeqACk2fFnepDQkxAhX 1MJhiZ9h/PN3JqalihWDdQn4FJiCx2j7ilk16OuqHAuTmWu+GO6Wdphyg//R4nHV0aRX Brvg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e20si6525630pfi.359.2018.04.05.14.54.41; Thu, 05 Apr 2018 14:55:27 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752289AbeDEVvO (ORCPT + 99 others); Thu, 5 Apr 2018 17:51:14 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:44323 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751417AbeDEVvM (ORCPT ); Thu, 5 Apr 2018 17:51:12 -0400 Received: by mail-pl0-f65.google.com with SMTP id b6-v6so19193322pla.11 for ; Thu, 05 Apr 2018 14:51:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zcHbdI5Y1IavNAvLG/HPbNgn+DiHgp55koEBoyUdDCU=; b=apwLEx2tIARR7NDbRyiWZCcQzXlf/Tnc6uKplkZCrUyABOiUq4GwXtVkpss+tZJIta 1bFTGR0S3vA2HZi4TRjhcLC4XbB5gpU8lMrDv0PoQiqBaeBBYcYh2NNou8NXHxVHJfdh mI1fHZtbvD2gBbwbV2Y/oTWcuflEELsD6/pOelCsyzFt2YtQQcPAbovpZt8mFs51CIMe D/WLTLyrmvr9tRu854EGiiwfzJQ6iu7HO82CdrrsYiMZnM8wMzaYVSWk3n00qefumBHw yssC5TV4X8twLo59J827Lkw4V1DgTYRRjd56NBDkBDNfYz/L75tcCfwXog4Ygex624Bz Pavg== X-Gm-Message-State: AElRT7HV1CBeznEnB/sQluLux04QSShLdfXQtv3Qc34sA4iRkCO9UP// sM+XlfHyT1e2+HD5HnZTqsQMMQ== X-Received: by 10.99.0.136 with SMTP id 130mr15577918pga.368.1522965072109; Thu, 05 Apr 2018 14:51:12 -0700 (PDT) Received: from localhost.localdomain ([2601:602:9802:a8dc::19fb]) by smtp.gmail.com with ESMTPSA id p20sm15360859pff.41.2018.04.05.14.51.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Apr 2018 14:51:10 -0700 (PDT) Subject: Re: [PATCH 3/3] kbuild: Allow passing additional HOSTCFLAGS and HOSTLDFLAGS To: Masahiro Yamada Cc: Michal Marek , Linux Kbuild mailing list , Linux Kernel Mailing List , Josh Poimboeuf References: <20180329004805.7278-1-labbott@redhat.com> <20180329004805.7278-4-labbott@redhat.com> From: Laura Abbott Message-ID: <535356b9-2c3b-46cc-e53e-820a932a0d6e@redhat.com> Date: Thu, 5 Apr 2018 14:51:09 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/04/2018 09:59 PM, Masahiro Yamada wrote: > 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. > Thanks for the pointer. I'll keep an eye out for those patches. > > > >> 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 > > >