From patchwork Mon Feb 26 18:41:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Jarry X-Patchwork-Id: 10243073 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 618AE602DC for ; Mon, 26 Feb 2018 18:43:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 560E02A1E6 for ; Mon, 26 Feb 2018 18:43:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4AA512A27F; Mon, 26 Feb 2018 18:43:27 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham 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 C69C12A1E6 for ; Mon, 26 Feb 2018 18:43:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751778AbeBZSnZ (ORCPT ); Mon, 26 Feb 2018 13:43:25 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:37887 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751823AbeBZSmn (ORCPT ); Mon, 26 Feb 2018 13:42:43 -0500 Received: by mail-wm0-f68.google.com with SMTP id 139so6062822wmn.2 for ; Mon, 26 Feb 2018 10:42:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YvOLNNwraahSex42Q3UEdLqdIcpHo+qg8OgpOIl9Sp0=; b=cHOhhamN6UPnfusrjK+SvD+O0O9psCZ36cp0YAcVVPdQREGNvXWJcd4/bJx1h2twSY L6v6UcTtMF/Ug+uxtGJ2jdcqKuRYSxutwPwkOGJQvT6Am25Dll0KyLLgJEFpQlCkwXrD Q3ZABhLfqkfRcj03K+ED7KZmx2Kwj9eOJrl4J0nAxnSzZJdC2fJtuTzOHaFb/dHwbPgc thI2Kh3hUsV6zBODQjwCIl3sUwbf7nVHUBat8FgHsrAKorvwobv9JTURhYRQiLIonzgo t1UNA4wtuLdR3lW1wXqemX3SgXjdrA7F7kAA7gN09RQMk9NL/eziZwKMAm2bFTlpfORc gNng== 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=YvOLNNwraahSex42Q3UEdLqdIcpHo+qg8OgpOIl9Sp0=; b=LjueS1/SN3hjcUoB0p0qXRJiuyQwt14BFUwsYQ+maEL+OAfSaHpX/dW6l0qRhREgsf YpRR3ZeFXexT8bGQhEdSV5oAC2VpGfGheLXjRLMpStPDswtarUdiNk9J2CEB7/MUYE1x lVdxHSX4SvGNPpuudwuKCOxBpg5ggm/mxzwrlLaUtth9EyM0mSqZ5Ya2YtC2meEfmGv6 4S6Un07Dge+ceWJ0ruF9EnrU0UwDM8/nV+une8+kebRW/kLZ1lMfJ2WMlaNiR1KLsDtp N2J/HL5jIEZCu56BBRho+RvpE6VDRbA/s2t/tMpQECM4IZq7PwjDGppiBvLuvRKrFrv6 sD/w== X-Gm-Message-State: APf1xPBsarISqpNSYsjx7QVMQtTKa6UGZYVbKKcbcQDEov0Dk4gDozlC S+8rjqK0hupiq0a+A6VZVByolA== X-Google-Smtp-Source: AG47ELs6DHJk44YddnfoKqGCNJBkekQJ6WymlhzG4metxJX59CkXdFmdXCkL6xbkSgknW70Wqdgyvg== X-Received: by 10.28.106.19 with SMTP id f19mr9935497wmc.84.1519670562238; Mon, 26 Feb 2018 10:42:42 -0800 (PST) Received: from tom.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id l11sm7221746wrg.71.2018.02.26.10.42.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Feb 2018 10:42:41 -0800 (PST) From: Robin Jarry To: Masahiro Yamada , Michal Marek Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Poimboeuf , Ingo Molnar Subject: [PATCH v2 2/3] kbuild: use HOSTLDFLAGS for single .c executables Date: Mon, 26 Feb 2018 19:41:47 +0100 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: 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 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)