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 8BD3EC07E9D for ; Mon, 26 Sep 2022 20:47:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0524D84E2C; Mon, 26 Sep 2022 22:47:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.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=google.com header.i=@google.com header.b="qfdqwtzo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EC50484E2B; Mon, 26 Sep 2022 22:47:53 +0200 (CEST) Received: from mail-pf1-x44a.google.com (mail-pf1-x44a.google.com [IPv6:2607:f8b0:4864:20::44a]) (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 747F184E17 for ; Mon, 26 Sep 2022 22:47:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=39Q8yYwYKBvwehipzeksskpi.gsqy-fssxpmwxw.hir1.hi@flex--adelva.bounces.google.com Received: by mail-pf1-x44a.google.com with SMTP id u10-20020a056a00098a00b00543b3eb6416so4655052pfg.15 for ; Mon, 26 Sep 2022 13:47:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date; bh=Qjm+Wd9fZ75mYa05whBeg61tyV+s+/dAqm+8iYzxLiU=; b=qfdqwtzoE5ahxybW0kCOMIqSWN13ARCqvuUTHh/CWPuKJjVFgVaYWOBrQ4ESZJSaE0 9UH0sEivqWLMBIu97Owz8RrSzQdfk2v8I9IMCmodTVXkNjB7R8z2xtNaAd8SuPvC6yqC 3VjcdNC/q7SA6KrpEmmF/Omgc+suRzLQ3F7/Onai/HQC1ZZtebBlia4Fk8u0bGT3t06W 2dqZg72hP+tO8XWa4OtCCHw+LSIyj/8wEYfpBJ2eFaNtMHj2I6GyVm2dKxH2SQMqahIQ 0FduYeW02S8PkhLW2IJLa2BwsebtohzQxcE0sxoQpXp49UWcsy+ncCQLUQpFCODRb5tV dVZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date; bh=Qjm+Wd9fZ75mYa05whBeg61tyV+s+/dAqm+8iYzxLiU=; b=fLI2pcUIrQi9uBhkFuB9aFA0RMYl9LetvN7ZOpKWqY0raG+UPrLzbUFWC2Bi+lyZGw KNB5rhs9YGxOyIbq9ErvpL2x25LVfiTg85PqDEFGVpwYwR5mSXsQ6WcnQ1r+ClJvv59M 2V7e72Nctb/sApXgr2mifJrhtvU0TLS2x6i/Kzz/J80Em8uFOYhsL6aHDJHzFWmCg0gD iD3ClYptAWm8FowLII70FkZYzaqkI6cHFlTeEzL44AjrzqXqHkponVY/fHUrqoEH6BTt T7NTFb3G5668nK6TP57jmK0HZfIoaQw4Tvt+FmpVLa9bXYKbpusblfA0lyTD8237lZnd LF9A== X-Gm-Message-State: ACrzQf2gaaP/pi+Kv+TrQuFP7eGS3CuUSw8FtANdsYsbGmag8CMy2cLV CreoodUgDlo8xULcoxH8WIhEF2Pr7b7bQoAIYZC0etr5SIcI0OWNfZncjRlQGoeyRnFs4PKc+HR R8lRHwnU8DxRQgki+93vclj20oVIELCEj5yT5Z+vF6Rh+hBZOQuH4xXJZiSs= X-Google-Smtp-Source: AMsMyM6InciYdP6czvXFVg6cVXy1aSK419LcF11w0CHNV90OjJQCDJxjx8VNKME1Z7KVwxcRFMPyXcIk9Y8= X-Received: from adelva.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:47a8]) (user=adelva job=sendgmr) by 2002:a05:6a00:15c4:b0:54a:13f1:1118 with SMTP id o4-20020a056a0015c400b0054a13f11118mr26088786pfu.52.1664225269470; Mon, 26 Sep 2022 13:47:49 -0700 (PDT) Date: Mon, 26 Sep 2022 20:47:47 +0000 Mime-Version: 1.0 X-Mailer: git-send-email 2.37.3.998.g577e59143f-goog Message-ID: <20220926204747.862654-1-adelva@google.com> Subject: [PATCH] Makefile: Disable PLATFORM_LIBGCC for LLVM toolchain From: Alistair Delva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Nick Desaulniers Content-Type: text/plain; charset="UTF-8" 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 The LLVM toolchain does not have or need libgcc, so do not require it to exist on the library path. Even if "-print-libgcc-file-name" returned the empty string, -lgcc would be specified. This leaves CONFIG_USE_PRIVATE_LIBGCC alone because I did not have a target/toolchain combination available for testing. Signed-off-by: Alistair Delva Cc: Simon Glass Cc: Tom Rini Cc: Nick Desaulniers --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 8af67ebd63..af06b7aa19 100644 --- a/Makefile +++ b/Makefile @@ -874,8 +874,10 @@ u-boot-main := $(libs-y) ifeq ($(CONFIG_USE_PRIVATE_LIBGCC),y) PLATFORM_LIBGCC = arch/$(ARCH)/lib/lib.a else +ifneq ($(cc-name),clang) PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(c_flags) -print-libgcc-file-name`) -lgcc endif +endif PLATFORM_LIBS += $(PLATFORM_LIBGCC) ifdef CONFIG_CC_COVERAGE -- 2.30.2