From patchwork Wed Apr 5 23:48:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1765790 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=e2WNST3n; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PsLvw0pF9z1yZF for ; Thu, 6 Apr 2023 09:49:48 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 459FB85FD1; Thu, 6 Apr 2023 01:49:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="e2WNST3n"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 58C7285FC2; Thu, 6 Apr 2023 01:49:13 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) (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 8BC5285FD1 for ; Thu, 6 Apr 2023 01:49:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-54c0c86a436so8421047b3.6 for ; Wed, 05 Apr 2023 16:49:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1680738547; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=3kJ5YVM+Ql3qr3gBOWp32zFviM/NX7hqFO3LzLtkw8A=; b=e2WNST3n4VDvRl3vJ0vNoWgav1IUXMoiQ5B/E8EyagIj6Gh/d9PvAygFSHm8qEpw1n 9UywJXuRxHZ1wd4ApUcaRRPvT782oglZckMEvRNWkKTBCoVA5sBecCQyuZtB8ZYph93b AL0Jf2PTWbX46l3B+JI2puQykHqcXdhfyhoaU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680738547; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3kJ5YVM+Ql3qr3gBOWp32zFviM/NX7hqFO3LzLtkw8A=; b=khSc6Cdh8nO6QFPRBSa2eltajkxA0vWEMktCfHHrUP54DYeWx+SgRvgAZQBQahKJMN vo/x5gMhGdA8/RGHChMkXsxU87znHr0xTocGPvFCOm+jmb68NHMwH4X6LLx5vDVMh95z YCEyleH1c2QrjNUC4FxtWm4ttBJtFDB3Ug3R67ccFNjS++AnaibRqwqcn6OVNYDD2OLH otr2ahcEYDp/K+IGNGSkb1sHApe0VUqjNDnDsy6AeDvlZyG+KpfLJipDTGg4s9hnCLWR RXDV2+FMKgmYcrTibDxpXDUQYiou0RiaG2Esc6tdDdcGjvvRDm6xYB/VvxJfsBZMAvsi w8mA== X-Gm-Message-State: AAQBX9eMq0moR9CN3Mk/YBKzwraJwve8YSXRDfTodgbMARw3Endkr+D8 3mTV7tGNfpvJSie4gYjGWMvSvi0vcK0R+cTsnfxz0A== X-Google-Smtp-Source: AKy350a3PST39YnWXOz+i7kyg6bkyFWFUCpA/s/a3cLdSgeaE0KIaHaw6HO7/1wW/NsoC9C7BYpLZA== X-Received: by 2002:a81:f11:0:b0:54c:913:5e5a with SMTP id 17-20020a810f11000000b0054c09135e5amr766270ywp.14.1680738546936; Wed, 05 Apr 2023 16:49:06 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b00-6400-acff-1005-f218-7c24.res6.spectrum.com. [2603:6081:7b00:6400:acff:1005:f218:7c24]) by smtp.gmail.com with ESMTPSA id l33-20020a81ad61000000b00545a08184b1sm4215448ywk.65.2023.04.05.16.49.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 16:49:06 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 2/9] clang: Add $(CLANG_TARGET) to LDPPFLAGS Date: Wed, 5 Apr 2023 19:48:52 -0400 Message-Id: <20230405234859.1446811-3-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230405234859.1446811-1-trini@konsulko.com> References: <20230405234859.1446811-1-trini@konsulko.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean When we invoke $(CPP) to make u-boot.lds we have LDPPFLAGS available to set other required flags here. As this file is for the target and not the host, we must ensure that CPP knows what the target architecture is. For this, pass in $(CLANG_TARGET). Signed-off-by: Tom Rini Reviewed-by: Simon Glass --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 5083beae359a..97a84ae3131e 100644 --- a/Makefile +++ b/Makefile @@ -437,6 +437,7 @@ KBUILD_LDFLAGS := ifeq ($(cc-name),clang) ifneq ($(CROSS_COMPILE),) CLANG_TARGET := --target=$(notdir $(CROSS_COMPILE:%-=%)) +LDPPFLAGS += $(CLANG_TARGET) GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD))) CLANG_PREFIX := --prefix=$(GCC_TOOLCHAIN_DIR) GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..)