Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 06028C00140 for ; Wed, 24 Aug 2022 08:37:55 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 47D2B84820; Wed, 24 Aug 2022 10:37:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="j/t635o3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9B2118482B; Wed, 24 Aug 2022 10:37:51 +0200 (CEST) Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3FB6684806 for ; Wed, 24 Aug 2022 10:37:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heiko.thiery@gmail.com Received: by mail-wr1-x42d.google.com with SMTP id k9so19872948wri.0 for ; Wed, 24 Aug 2022 01:37:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=iSPfvpG+TKBZxwxHNbKWfk+VM+VUaYfclmHnKPqHfq4=; b=j/t635o3QcqIQTP4X0bcmE8YQsSKiumHsAT4XN/+UEOWy7036sxVxEcm0A9GoMKfbc 04GBdhTEbaxPBB60rDUy3E3G8U3ZfsNR4B6y+zOW/0CgoYTcLtnEJsU+gyZAP8bRcNpr mueSrCbwTVqvP/gLw5BJ/A3y3qVuWPpS0dOqMr6LAef6qxz6ZNSkJYpEDtKZ4ncmtmkf tzKCHCCq2W3Vy4UMTuvn15V3bvNZWsUHqCtDGSrGXUc5vownzJ6ZAfzPwOcJCrDfD/b0 NSvsQePI2IxXMRHCEyDoQ265TwJIE80SNSLwW3VDxlL/3M6GFGyKFgrO0Dny0zYygvI0 2CVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=iSPfvpG+TKBZxwxHNbKWfk+VM+VUaYfclmHnKPqHfq4=; b=5rF5/L6fr+enRqlgjpzP/j3UKP+CaTgt4gaH+5KpIuEmjnjiHdsca/ohXURrcetix5 5Q8WVx5ma8mJoR0B1prRoUmpqRZB8CT4ImuO24Wr8Qa3AJptG0vUfSJTYELDy2i+L4Qj fZjSjwSlejOuIJOsEcHV5uaEFCN5mQy6tlv5Hs3SP9bm3OVFpp8NNzcecEiz37UzCJVK +Y4218hRgIV/0XeUf4a2j5U+iwgjcdiJqsXXtyUGfUu7YpMyOmT0fh9liNdfTm/HiWHQ sGxgJqFSrh6TEXQdnT8CIaVCc57gxh/OrOhFRmqUM/oYC9X19hT3E0630Hh9uHprEVxF 4N2g== X-Gm-Message-State: ACgBeo0qFr6PcGN7+dm+9rdTC53o7eqOJ51wopxHZJ/BroAAHpd83+Ka lX6qhm3OoEVq1aWAq2qFB7/vnQQBcSRgvA== X-Google-Smtp-Source: AA6agR4hbup5kZi/LnwFP28pZects6vH9XDpMDpzao5v7oWRo4mCdKO2ojH20gn4FW+uHippXWOFLQ== X-Received: by 2002:a05:6000:1544:b0:225:5569:60b2 with SMTP id 4-20020a056000154400b00225556960b2mr8500444wry.655.1661330268156; Wed, 24 Aug 2022 01:37:48 -0700 (PDT) Received: from t450s.hexenhaus.local ([82.142.23.242]) by smtp.gmail.com with ESMTPSA id w7-20020adfd4c7000000b0021d76a1b0e3sm16297416wrk.6.2022.08.24.01.37.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 01:37:47 -0700 (PDT) From: Heiko Thiery To: u-boot@lists.denx.de Cc: Masahiro Yamada , Thomas Petazzoni , Tom Rini , Heiko Thiery Subject: [PATCH] kbuild: add KBUILD_HOSTLDFLAGS to cmd_host-csingle Date: Wed, 24 Aug 2022 10:37:23 +0200 Message-Id: <20220824083722.2963-1-heiko.thiery@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean When compiling executables from a single.c file, the linker is also invoked. Pass the flags like the other linker commands. cherry-pick kbuild change from Linux: 63185b46cdb3 (kbuild: use HOSTLDFLAGS for single .c executables) Signed-off-by: Heiko Thiery --- scripts/Makefile.host | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 69983a19a4..7624304e3e 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -89,7 +89,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) $(KBUILD_HOSTLDFLAGS) -o $@ $< \ $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(@F)) $(host-csingle): $(obj)/%: $(src)/%.c FORCE $(call if_changed_dep,host-csingle) -- 2.20.1