Received: by 10.213.65.68 with SMTP id h4csp1528667imn; Wed, 4 Apr 2018 22:16:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/hu64nnH03vBxWCDtDEjgeUGyvj0RaoWfyfk3b8DbOZeqAOPgGgpHvf/JSDDJdY0Hb+f8b X-Received: by 10.98.89.23 with SMTP id n23mr16029477pfb.211.1522905382829; Wed, 04 Apr 2018 22:16:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522905382; cv=none; d=google.com; s=arc-20160816; b=pstO+wxqQD/LxLR1GjR/kA/8B1G41i2RuxQ6/DZawq4htbkUNMn7FMd438+nJN5OMZ xpZCARfkFV2dB5TWCiAnLWNxb2WqRBYCEpD9XeihFNXIOWaTEng7ynqmfNzYYDgMcp81 PnaEsbuHTj7Yxz412T1tZaFQuoGK7grCZDQy0edVmA3WXwf3GBBKKWPWYm28XM24Jrd4 hWXWyblxFZ6OrM/F3LlP1oBrfbLNTLBR9udLRz4IlDdFkOAkpPWhAsT4srVVWRRRnsGI PNDyWi1OSlgCkXW+O/6sR1s06KQoyWoEzV+RwYYuU4eS27aJFRyNzm0t8rAoEv0eQW36 lVhw== 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=vlqpmOrcQymqMEhUjf1shVg80E2rfzIdHjDLJmCMxIo=; b=x5WTeK1TsnM2kPdY0QbuLckhDZp4nerLRMsQYUcNsP8zfNP7YkDgFF5nw09rapOQPg FHAq+mgbF6EKytwJpabrZ+YerSF+s0Jawwq8cTBmZ7riNAhy2gmVRntKVBmUVSc/tQPq T8sbs5IUXbWgExfVQmLZyjpXIHJns0zXk04SXcVO/69Jv0DvxFoW52Is63BdfmT3lIDD BSYXRazuRvGvl8PT/qNhYtczA1ut/Jn1OA22E/vh6eZBqLvnEogXBCzo8EOgGLDnPEaM MbysrGYuOd/F9fiSzPuOURKtq+FBD7JtaIntuxDYF1eaJ8388QhNrlOqDjvzI/6rdGyX 2g9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=jDtuOe85; 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 j73si4865062pgc.142.2018.04.04.22.16.08; Wed, 04 Apr 2018 22:16:22 -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=jDtuOe85; 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 S1751518AbeDEFOy (ORCPT + 99 others); Thu, 5 Apr 2018 01:14:54 -0400 Received: from conssluserg-05.nifty.com ([210.131.2.90]:38003 "EHLO conssluserg-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751117AbeDEFOw (ORCPT ); Thu, 5 Apr 2018 01:14:52 -0400 Received: from mail-ua0-f179.google.com (mail-ua0-f179.google.com [209.85.217.179]) (authenticated) by conssluserg-05.nifty.com with ESMTP id w355EQ9D023382; Thu, 5 Apr 2018 14:14:27 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com w355EQ9D023382 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1522905267; bh=vlqpmOrcQymqMEhUjf1shVg80E2rfzIdHjDLJmCMxIo=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=jDtuOe85CEiJ5yl73L9Xvgs8vIqMT6aP0Hr65RpjzDhvm+wmir8rfqIc/0dJAsk9n BHREw1W09pqOEas2AablzCsF7Otj0JIJeqQX/wKopxsi+br0zrWphifgdjA9ZApOX8 Ce86YMaRmMdEZkeXCDgR3EqwSQP4ZxIbMG0HLbRQ8AAE7qE6ziUCwUaqNWoSGBwcuj SzVUcp8tTNmwJkUS1fYFVJpVVrZBuV84CtmJefJYD7Y14jBbGhWXdjT/UhqemmvDxW m+4FCtcM3vy5U1dP4aZZ3j8CWezkwJQXH+TuO+2VUZFiFxxM1whwsKo2/g7lkp1fpG L+5Rz/E+dxwVQ== X-Nifty-SrcIP: [209.85.217.179] Received: by mail-ua0-f179.google.com with SMTP id g2so8857437uan.8; Wed, 04 Apr 2018 22:14:27 -0700 (PDT) X-Gm-Message-State: ALQs6tCT63YCcZZVW9rC2MrHWhQWIPXMX5RFNMpfBq6cjGjfYU5HyR0h I8qQnXjsz277Tl3Z0whW2r6MXT4yhiY1iv0Svlg= X-Received: by 10.176.48.232 with SMTP id d8mr3949802uam.141.1522905265993; Wed, 04 Apr 2018 22:14:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.29.150 with HTTP; Wed, 4 Apr 2018 22:13:45 -0700 (PDT) In-Reply-To: <20180329004805.7278-2-labbott@redhat.com> References: <20180329004805.7278-1-labbott@redhat.com> <20180329004805.7278-2-labbott@redhat.com> From: Masahiro Yamada Date: Thu, 5 Apr 2018 14:13:45 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/3] kbuild: Support 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 : > > 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) This hunk is correct, but Robin posted this. https://patchwork.kernel.org/patch/10243073/ Somehow it fell into a crack, and I missed to pick it up. I will apply it lately. > @@ -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) > This does not involve the link stage. You should not do this. > @@ -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 $@ $< -- Best Regards Masahiro Yamada