From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751503AbeDEOYL (ORCPT ); Thu, 5 Apr 2018 10:24:11 -0400 Received: from conssluserg-06.nifty.com ([210.131.2.91]:44028 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751249AbeDEOYJ (ORCPT ); Thu, 5 Apr 2018 10:24:09 -0400 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com w35EO3Pn027828 X-Nifty-SrcIP: [209.85.213.52] X-Google-Smtp-Source: AIpwx48Ashp0LMRtQcmZhAdahYTNoQSKO4PkOlZs3rGrLXpJor5DVBr+mQfe/8KVJo60PduqOb6mFUdjBt7+nkOR6yI= MIME-Version: 1.0 In-Reply-To: References: From: Masahiro Yamada Date: Thu, 5 Apr 2018 23:23:22 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/3] kbuild: use HOSTLDFLAGS for single .c executables To: Robin Jarry Cc: Michal Marek , Linux Kbuild mailing list , Linux Kernel Mailing List , Josh Poimboeuf , Ingo Molnar Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-02-27 3:41 GMT+09:00 Robin Jarry : > When compiling executables from a single .c file, the linker is also > invoked. Pass the HOSTLDFLAGS like for other linker commands. > > Signed-off-by: Robin Jarry > Cc: Josh Poimboeuf > Cc: Ingo Molnar > --- > scripts/Makefile.host | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/Makefile.host b/scripts/Makefile.host > index e6dc6ae2d7c4..aa971cc3f339 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) $(hostc_flags) $(HOSTLDFLAGS) -o $@ $< \ > $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) > $(host-csingle): $(obj)/%: $(src)/%.c FORCE > $(call if_changed_dep,host-csingle) This one is correct anyway. I applied to linux-kbuild. -- Best Regards Masahiro Yamada