Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1117007imm; Mon, 9 Jul 2018 17:48:16 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf1XQAuXpDw3i0zvCix/pc44dn8LZEhAj4ZJ2FHupMxVom/Yvj8MPhR7QNou5bTfOHbtZll X-Received: by 2002:a63:26c3:: with SMTP id m186-v6mr20684763pgm.56.1531183696750; Mon, 09 Jul 2018 17:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531183696; cv=none; d=google.com; s=arc-20160816; b=LickMqHkeGqsJO07JestEsaeBlJMdPpaf2ibrI8CPBwKOCb2l6eykyu/jTjFNzTit6 hRCMghKdCo2s8+VoDZR/lzOkGBvt3Wj3XKnnfksdkP2yHkRAaWcYrU6Ji4l34txj1wKY QBIheX+li9xk/PoXCHGgiN8WThhwlSKfgmIBre6XX0o/rY8zGcbuqPDh/5Qx22Q50coa kMYHIUbAh+M0nr3gWHtHQEjE05eT6RyvlWGt1d64J+XwG4rN58oAjlYPpHR6xWqYaNgr dvZgieqhpnKfTxUSbpDu2V2z5PskuvsHvIx9nchUakb/Q0zsoSx/RJ5+jsFLpnu+aqqJ j8ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=tWiyJeGvC5zdp0sRApZQtqvGHxQUko6rZedkHxbyDtU=; b=KB89qS6S2vmCRdNcqKzJzmaDPDKyxGBLvcJHQwb5bvYOygbA9fna0cVgneTe+FgyNL O7FgRx6csDkbxzFYIp+W/SnDnbZwFb9tptLvDVWEI1OuplAMLst7hVAecW+Nxb3iJVv7 6O3NWFPw0VE5aOvIOHm4E22BuCBwFzpMLD9rtEUxrO2ge/XTxk+aeQ5hxzzQf+mxs/jw QTLG5iq2oHmRYfBTQ0D2t9MTZANKHo8z+SXprEg4FHVEpQG9juJS/+KgPzfCVDSmracd AlNFzQUOd7EBubSTwAda59jf2B9OfZ4tmtyY1edfr5p6OaCD7CnTmMT0otY7JHz8Ug/L 6sCA== 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 f24-v6si14856094pgh.287.2018.07.09.17.48.02; Mon, 09 Jul 2018 17:48:16 -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 S933427AbeGJAq7 (ORCPT + 99 others); Mon, 9 Jul 2018 20:46:59 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:40048 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933423AbeGJAq2 (ORCPT ); Mon, 9 Jul 2018 20:46:28 -0400 Received: by mail-qt0-f196.google.com with SMTP id h4-v6so16997378qtj.7 for ; Mon, 09 Jul 2018 17:46:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=tWiyJeGvC5zdp0sRApZQtqvGHxQUko6rZedkHxbyDtU=; b=HXzsImAvyIAifYWrWG/bmuUz4SJ3PzmvzXvlU5Jy7o+2sFCG9qfzx/3n8bhPiYimJJ Y+bOvfNn33L7T/vwt7K8c0dJvT+IN6z7RrmsQQRGRdwTfo2tOFjsFo8A2NORxtlckRyy YnEAzIVWOIxO1JyrHDPh/9Nimk1OSnJQ0YntW27XV2xo1nqcGqWyxmM0sbZvLWHFprlw BGAnXKBFV88zyxCLTmRJmt0yKw5Jnf62BqQdSlsnb/qLdYd7bJ9QTLCc/Y5sQjiLkAyj XT8PXfNsHmlJYkpPEt044CvYaLxdjDvs1y9IkpQe7PLONqhPFzXk80Jch8HltFwZFm/d SNvw== X-Gm-Message-State: APt69E0cWhZgPzZogoH+QIxD6MrL5xuF0YPI5VEER71JIMjuatPZPG+u pOOTeqSAFi6vd6ncoYd6qI37sA== X-Received: by 2002:ac8:709:: with SMTP id g9-v6mr21415585qth.110.1531183588250; Mon, 09 Jul 2018 17:46:28 -0700 (PDT) Received: from labbott-redhat.redhat.com ([2601:602:9802:a8dc::1941]) by smtp.gmail.com with ESMTPSA id l36-v6sm1816792qtk.12.2018.07.09.17.46.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jul 2018 17:46:27 -0700 (PDT) From: Laura Abbott To: Masahiro Yamada , Josh Poimboeuf , Jiri Olsa Cc: Laura Abbott , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Robin Jarry , Jonathan Corbet , linux-doc@vger.kernel.org Subject: [PATCHv2 7/7] Kbuild: Use HOST*FLAGS options from the command line Date: Mon, 9 Jul 2018 17:46:02 -0700 Message-Id: <20180710004602.21599-8-labbott@redhat.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180710004602.21599-1-labbott@redhat.com> References: <20180710004602.21599-1-labbott@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that we have the rename in place, reuse the HOST*FLAGS options as something that can be set from the command line and included with the rest of the flags. Signed-off-by: Laura Abbott --- v2: Use the correct name for HOSTLDLIBS, update documentation. --- Documentation/kbuild/kbuild.txt | 16 ++++++++++++++++ Makefile | 9 +++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt index 6c9c69ec3986..9847a5974826 100644 --- a/Documentation/kbuild/kbuild.txt +++ b/Documentation/kbuild/kbuild.txt @@ -238,3 +238,19 @@ KBUILD_VMLINUX_LIBS All .a "lib" files for vmlinux. KBUILD_VMLINUX_INIT, KBUILD_VMLINUX_MAIN, and KBUILD_VMLINUX_LIBS together specify all the object files used to link vmlinux. + +HOSTCFLAGS +-------------------------------------------------- +Additional flags to be passed to $(HOSTCC) when building host programs. + +HOSTLDFLAGS +-------------------------------------------------- +Additional flags to be passed to $(HOSTLD) when building host programs. + +HOSTCXXFLAGS +-------------------------------------------------- +Additional flags to be passed to $(HOSTCXX) when building host programs. + +HOSTLDLIBS +-------------------------------------------------- +Additional libraries to link against when building host programs. diff --git a/Makefile b/Makefile index 96e34381d9ee..c2ee1d4c12c9 100644 --- a/Makefile +++ b/Makefile @@ -360,10 +360,11 @@ HOST_LFS_LIBS := $(shell getconf LFS_LIBS) HOSTCC = gcc HOSTCXX = g++ KBUILD_HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \ - -fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS) -KBUILD_HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS) -KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS) -KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) + -fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS) \ + $(HOSTCFLAGS) +KBUILD_HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS) +KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS) $(HOSTLDFLAGS) +KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) $(HOSTLDLIBS) # Make variables (CC, etc...) AS = $(CROSS_COMPILE)as -- 2.17.1