From patchwork Thu Mar 29 00:48:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laura Abbott X-Patchwork-Id: 10314309 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ED02D605F9 for ; Thu, 29 Mar 2018 00:48:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E135328EE0 for ; Thu, 29 Mar 2018 00:48:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5D6D29157; Thu, 29 Mar 2018 00:48:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8221A28EEF for ; Thu, 29 Mar 2018 00:48:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751210AbeC2AsR (ORCPT ); Wed, 28 Mar 2018 20:48:17 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:46098 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751096AbeC2AsP (ORCPT ); Wed, 28 Mar 2018 20:48:15 -0400 Received: by mail-pf0-f196.google.com with SMTP id h69so2021693pfe.13 for ; Wed, 28 Mar 2018 17:48:15 -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=lesxI5Kj+RlrxwcGFosL+jONg6BRofW62dbf34rWhqU=; b=JJh6i/1FhzHrvZkKYb5B9Fhrf879Zt5XI7gaBPsftgWebMJvqW9512VMC6BgvZHCpw guuZaHYijaF9H4RquxhKxR8uRPtLG0jEW36lb6VS9uKotlP/2u+O76ufme4ovHhhL2vk bTzI4xhm2vWta4KYvS7v0SHvX96J9JP3n4UJ2uyrx4vwN6cDTAeqKoQnvE6KQIpaxIJm GqwEqOY/+zxlBCCSw1HpcxSh8Oy4CaEgU6c4F+YzOTUx/B9bjrDg2PVgq3FjplpBFKAQ V37P9wq8WdA6wPHdQ3mix9ggAcpp6KX4713HdRsJ5nggbMe48oCnL9g2ARc3AV20H1x0 gseg== X-Gm-Message-State: AElRT7H4W9sc2Al8XTYh2OuH6jKTCNLKA5P+kLVqy60y6f0caMdmnSS4 YKn+nI4ZE9FAf0KYlH5IfWG2Ag== X-Google-Smtp-Source: AIpwx480IK0uirBmV/M3uQMu8cJ5NqcnCiTsl3OA0EqE1LKRnZOtYcSvG9IwHwPSj22t96XIsfiXog== X-Received: by 10.99.54.65 with SMTP id d62mr3985136pga.225.1522284495262; Wed, 28 Mar 2018 17:48:15 -0700 (PDT) Received: from localhost.net ([2601:602:9802:a8dc:9d5:10b1:50c5:95c0]) by smtp.gmail.com with ESMTPSA id f82sm10932511pfd.175.2018.03.28.17.48.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Mar 2018 17:48:14 -0700 (PDT) From: Laura Abbott To: Masahiro Yamada , Michal Marek Cc: Laura Abbott , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Poimboeuf Subject: [PATCH 1/3] kbuild: Support HOSTLDFLAGS Date: Wed, 28 Mar 2018 17:48:03 -0700 Message-Id: <20180329004805.7278-2-labbott@redhat.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180329004805.7278-1-labbott@redhat.com> References: <20180329004805.7278-1-labbott@redhat.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In addition to HOSTCFLAGS, there's HOSTLDFLAGS. Ensure these get passed to calls to build host binaries. Signed-off-by: Laura Abbott --- scripts/Makefile.host | 6 +++--- tools/build/Makefile.build | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/Makefile.host b/scripts/Makefile.host index e6dc6ae2d7c4..a3a0e2282a56 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -84,7 +84,7 @@ hostcxx_flags = -Wp,-MD,$(depfile) $(__hostcxx_flags) # Create executable from a single .c file # host-csingle -> Executable quiet_cmd_host-csingle = HOSTCC $@ - cmd_host-csingle = $(HOSTCC) $(hostc_flags) -o $@ $< \ + cmd_host-csingle = $(HOSTCC) $(HOSTLDFLAGS) $(hostc_flags) -o $@ $< \ $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) $(host-csingle): $(obj)/%: $(src)/%.c FORCE $(call if_changed_dep,host-csingle) @@ -102,7 +102,7 @@ $(call multi_depend, $(host-cmulti), , -objs) # Create .o file from a single .c file # host-cobjs -> .o quiet_cmd_host-cobjs = HOSTCC $@ - cmd_host-cobjs = $(HOSTCC) $(hostc_flags) -c -o $@ $< + cmd_host-cobjs = $(HOSTCC) $(HOSTLDFLAGS) $(hostc_flags) -c -o $@ $< $(host-cobjs): $(obj)/%.o: $(src)/%.c FORCE $(call if_changed_dep,host-cobjs) @@ -126,7 +126,7 @@ $(host-cxxobjs): $(obj)/%.o: $(src)/%.cc FORCE # Compile .c file, create position independent .o file # host-cshobjs -> .o quiet_cmd_host-cshobjs = HOSTCC -fPIC $@ - cmd_host-cshobjs = $(HOSTCC) $(hostc_flags) -fPIC -c -o $@ $< + cmd_host-cshobjs = $(HOSTCC) $(HOSTLDFLAGS) $(hostc_flags) -fPIC -c -o $@ $< $(host-cshobjs): $(obj)/%.o: $(src)/%.c FORCE $(call if_changed_dep,host-cshobjs) diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build index cd72016c3cfa..cab55f0d90e1 100644 --- a/tools/build/Makefile.build +++ b/tools/build/Makefile.build @@ -64,7 +64,7 @@ quiet_cmd_cc_o_c = CC $@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< quiet_cmd_host_cc_o_c = HOSTCC $@ - cmd_host_cc_o_c = $(HOSTCC) $(host_c_flags) -c -o $@ $< + cmd_host_cc_o_c = $(HOSTCC) $(HOSTLDFLAGS) $(host_c_flags) -c -o $@ $< quiet_cmd_cxx_o_c = CXX $@ cmd_cxx_o_c = $(CXX) $(cxx_flags) -c -o $@ $<