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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF387C433EF for ; Sat, 16 Oct 2021 16:59:03 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C644C61058 for ; Sat, 16 Oct 2021 16:59:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C644C61058 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A762D83296; Sat, 16 Oct 2021 18:59:00 +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="qJPx/AiC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2CA7F832AF; Sat, 16 Oct 2021 18:58:58 +0200 (CEST) Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (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 70275831BA for ; Sat, 16 Oct 2021 18:58:55 +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=fontaine.fabrice@gmail.com Received: by mail-wm1-x335.google.com with SMTP id g39so713634wmp.3 for ; Sat, 16 Oct 2021 09:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=g5xrbpDFHclz/fkb01u6iqaFhYwEFjaad4ZWvqo4wAs=; b=qJPx/AiCMzC3EujBK4yXclaMQKvUjPqTu0kcq2hxvoxxIpUfF9B6fJ+zOaOXkDQ63I bdgeSZTc25gxQBKI71PWwXbVY/VISrcPbLCGOCGEet9r4sntp21EQ2+1vCjc7+vD8/5x ZeLeAQ0bKciH19mrzCL40AvMhEmEAStIAlZSHxaj06ctjuK5Ax8RkeTOj/Y9c+g5nGRg yXYLnrag+8M/XN7DEZiEM/xgbAiNW/6PtB3BJJJzQNgrSYG3buRBZ7ww8LjSz2KqGcSj //A3UE+WQfOhg2Z+jchC7AhbUHFntB9piq3vngGBPactItcx9Gip1xtJQtj/+MrpR/tR s5SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=g5xrbpDFHclz/fkb01u6iqaFhYwEFjaad4ZWvqo4wAs=; b=Db0st0pXjZMDoNBbVdRd9INkXxJm2sdCfVBPW258DnjV/5C6sUwVO4PPSjsa2niPFB aBHQLsTZBuRBHErwRF2TUaQ22w4FyINaKPFdyWG7M7BTM0yWdgMMxcUa/m+35Guyuayx +kxKnSvK4D01eCvP/x44upRiugyB01Ezqqfb5brNeNlHAypxtDGLamOlxWMhJ4cdffMw nc09R0QOH40yKX43PYgalUagnK8cJ0GGI7vNxtjjO6x5RIt7lAYk+MVi8UPSZWtAqVAL a/gi3QNnkMZVEuk2bFK3ZIWmgcnHH+7ZuZFCydhfSkvNaxH3wBaePgAza4RE1DNvu6Pc vrUg== X-Gm-Message-State: AOAM533O4/NL+U2FmbHVbzfhctXJjeZ87xt48g0DB794nWtXxcF7/sXu WyyLe4nnJhNQen1U4KbwHIt+y34FicI= X-Google-Smtp-Source: ABdhPJzGhrkNOLXpCX0pZYO2NCHzCoGi1QpnyFWXZDdWP1YbCZYSUb+X9a2FHWPJZoY5jx+ut3VRYw== X-Received: by 2002:a7b:c8c5:: with SMTP id f5mr32585514wml.104.1634403534493; Sat, 16 Oct 2021 09:58:54 -0700 (PDT) Received: from kali.home (lfbn-ren-1-1732-95.w86-253.abo.wanadoo.fr. [86.253.44.95]) by smtp.gmail.com with ESMTPSA id p12sm4759141wrr.67.2021.10.16.09.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Oct 2021 09:58:53 -0700 (PDT) From: Fabrice Fontaine To: u-boot@lists.denx.de Cc: Fabrice Fontaine Subject: [PATCH] tools/Makefile: fix {C,LD}FLAGS with CROSS_BUILD_TOOLS Date: Sat, 16 Oct 2021 18:57:41 +0200 Message-Id: <20211016165741.320646-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean When CROSS_BUILD_TOOLS is set, set KBUILD_HOST{CF,LD}FLAGS to {C,LD}FLAGS otherwise CC will be used with HOST{C,LD}FLAGS which seems wrong. It should be noted that, for an unknown reason, overriding HOST{C,LD}FLAGS don't work. Signed-off-by: Fabrice Fontaine --- tools/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/Makefile b/tools/Makefile index 4a86321f64..98bb92990d 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -316,7 +316,8 @@ subdir- += env ifneq ($(CROSS_BUILD_TOOLS),) override HOSTCC = $(CC) -override HOSTCFLAGS = $(CFLAGS) +override KBUILD_HOSTCFLAGS = $(CFLAGS) +override KBUILD_HOSTLDFLAGS = $(LDFLAGS) quiet_cmd_crosstools_strip = STRIP $^ cmd_crosstools_strip = $(STRIP) $^; touch $@ -- 2.33.0