From mboxrd@z Thu Jan 1 00:00:00 1970 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 07D18C77B73 for ; Mon, 22 May 2023 21:14:06 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CC60884761; Mon, 22 May 2023 23:14:04 +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="cnqHB0Qk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E71D784761; Mon, 22 May 2023 23:14:02 +0200 (CEST) Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) (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 67F1480A0C for ; Mon, 22 May 2023 23:14:00 +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-yb1-xb29.google.com with SMTP id 3f1490d57ef6-b9e27684b53so5799639276.0 for ; Mon, 22 May 2023 14:14:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1684790039; x=1687382039; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=DUdDvRDVzz3E87e7k+JAijGBOdjh9ehHdsFoskZ3Mx0=; b=cnqHB0QkA3DqmNve5VPb1ZlwdNgd3TCTvKGAbr4zPr4VekVcGpcP4B0rEY1fdil/AI 1MN02kzxgmVJ2PzQa+/4r3Zv0o80QF1abtcr/JYvKcSpNhCuYAZmyJIVx5jeZpHCy1jY I0b5NvY79gsHaVZ5z1wuDKwJ9pUJ9kVCP8d0g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684790039; x=1687382039; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=DUdDvRDVzz3E87e7k+JAijGBOdjh9ehHdsFoskZ3Mx0=; b=L4jnCeTXFND/44vz2weE8pwgcJOOLgJ9nLUntl1OippZSs7pXOjKBS/Ji7pOD8dgqq 4BNEoyW7jrblArAf+NrIyoVtcaD8HwFeTAjlxUQjxi9BlCP/qQ23olasrCkyMdfKD05C /5M/iTYX8aixpGbhuMntBu2BFmmTKOm3ff8bOM6p7lyZuGJw+aasYue+7+4MBdE0FeRN hw3KMnaY8uqL4HDbU5+QQ5kxJRIbbgO8rzOYf1QV+hTgS5cBWS0rmauiECXZIQEAFDvY Qwa5WrSNscTFlYl2M8hzBASqAguOcA3dKMvdFIdQsa2P4w9JZhma0gtv+fy3EnANNI6n 6mtw== X-Gm-Message-State: AC+VfDwi3xVmP6f13pETPzvN4bXBd/UxxVPdgidIUzrUwDNWBmC2UElY 6K6ggpp+2N8x1dgT8nOwUZtATg== X-Google-Smtp-Source: ACHHUZ7/532SIQi9JIvyl2ut5ia8VXFdA4D0zMOqH+yn1jMPZKbNBrzomj+162nM9pQg5Qj5WRn89A== X-Received: by 2002:a25:f40b:0:b0:ba8:1961:28c8 with SMTP id q11-20020a25f40b000000b00ba8196128c8mr11686669ybd.7.1684790039111; Mon, 22 May 2023 14:13:59 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-3081-5f50-b42e-8ecc.res6.spectrum.com. [2603:6081:7b00:6400:3081:5f50:b42e:8ecc]) by smtp.gmail.com with ESMTPSA id i10-20020a056902068a00b00ba773472647sm1692953ybt.19.2023.05.22.14.13.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 14:13:58 -0700 (PDT) Date: Mon, 22 May 2023 17:13:56 -0400 From: Tom Rini To: Sam Edwards Cc: Michal Simek , Heinrich Schuchardt , u-boot@lists.denx.de, Alper Nebi Yasak , Andrew Scull , Ilias Apalodimas , Kever Yang , Marek =?iso-8859-1?Q?Beh=FAn?= , Nathan Barrett-Morrison , Pali =?iso-8859-1?Q?Roh=E1r?= , Peng Fan , Philip Oberfichtner , Philipp Tomsich , Quentin Schulz , Simon Glass Subject: Re: [RFC PATCH 00/10] Improve ARM target's support for LLVM toolchain Message-ID: <20230522211356.GA3218766@bill-the-cat> References: <20230520205547.1009254-1-CFSworks@gmail.com> <23EFB5F3-C3F5-44BC-BB6D-730656F67578@gmx.de> <2355e4a5-1474-5579-2171-8339226db14f@gmail.com> <35cdee04-e94c-0915-85cb-89fb0ea9a6d9@amd.com> <20230522153006.GD8649@bill-the-cat> <7640951a-8a3a-6747-52fb-ab19417e813f@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qscGgbX9bdO+6qtZ" Content-Disposition: inline In-Reply-To: <7640951a-8a3a-6747-52fb-ab19417e813f@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett 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 --qscGgbX9bdO+6qtZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 22, 2023 at 01:59:33PM -0600, Sam Edwards wrote: > Hi Tom, >=20 > On 5/22/23 09:30, Tom Rini wrote: > > I think objcopy is a bit of a stretch at this > > point and it's not clear from the above if you're also making use of the > > assembler. >=20 > I agree, since getting llvm-objcopy to play nice with this currently > requires that I make a handful of small hack edits to the makefiles. It d= oes > offer a great advantage over GNU's objcopy in that it doesn't balk at ELFs > from a foreign arch, but I'm only supporting it "opportunistically" right > now. >=20 > I do make use of LLVM's assembler, but LLVM bundles its assembler inside = the > Clang binary (`clang -cc1as` and/or just pass .S files to Clang) rather t= han > installing a separate program. This is not to be confused with `llvm-as` > which is for bitcode/IR manipulation only. But in general, if you're using > Clang, you're also using the LLVM assembler. Ah, ok. > > We might also want to look at backporting > > scripts/Makefile.clang from the current kernel build system and then > > adapting the "guess the --target argument" logic based on CONFIG_$ARCH > > rather than ARCH=3D (which we don't use). That would also solve the LTO > > problem as that's a result of us missing some flags that the kernel has > > as LLVM+LTO (logically) requires LLVM LD not GNU LD. >=20 > Having something like Linux's `LLVM=3D1` to enable LLVM would be ideal, I > think. I probably won't be doing that backporting in this patch series si= nce > my goal for now is just to fill in some of the pitfalls for people like me > who are too stubborn to install a GNU toolchain. It honestly shouldn't be too much work to just backport that file (and move/remove some of the logic we have scattered elsewhere instead). > > At that point, and once the EFI guid_t warning is resolved to everyones > > satisfaction we can put qemu_arm* + clang in the CI loop, to catch new > > warnings there. I've already got clang + Pi in my CI loop, but that > > doesn't fail on warnings. >=20 > Do you mean, on the current master branch, and only Clang (no LLD)? I'm in > favor, but since a few of the patches in this series (#3-5) are to support > some of the libcalls that LLVM's codegen likes to emit, I'd be surprised = if > that worked on all targets. Feel free to pull whatever necessary patches = of > mine here into your own series though. :) The reason it's not in CI right now is that there's compiler warnings, due to the EFI guid_t alignment thing that's being discussed in another thread. I am running (and so booting and running pytest) in my CI loop clang-built U-Boot for Pi 3 (32bit and 64bit) and a few other targets too. But there's also certainly room to improve and I think some of the issues you've addressed here are why other targets for example are too large to boot. --=20 Tom --qscGgbX9bdO+6qtZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmRr2xEACgkQFHw5/5Y0 tyyNbQwAqxV3HlB/wIbg7wJMtLT4iTkbIAjR+4f+xWYIzAzEBsTaX470yNYXd1Zg 7lJMGJ0xplQBanKedqa+wsqYq6Yb41BTijDGxXY04dlEyj9xG6RJ5gE0Olau+c6j p4/ZGrX9d/PiY+AUE4/R3LnR12xWhjDv4XdFGIpnjrPZU2NFsbzi6i4Gi7Fs5m24 Ok+RFIkSwedPAPjD3V1tMOIVJ0ib29ncqpZR6MjaFWOasi2xM8mL8aWbCimtqsNK t/GLlx4fPEonEdbz/OrHa2l3SnfktL3nP0vFPgNQJ55CHCXteXlbSIgxWp/h2VdT XSsJqJEJz4sDm+1XTyYBtupkg6vnEXrdUpFfJNEr9pVCqRog1bg/+Rw5ZF3tIVfA s9VWHZGMNIenAKQWjqAYTb6jZ7vEL4Pv6ciDa2zJpqE/x32ktpwTx9ZMQM7AKEIK yQq4bbpND+fdoTwrSOaqxfeIqBp4qcz0fh2w01kQJdp7OkOLK8EMZEsBcgFvTKdu iGXLBkFH =2Ej7 -----END PGP SIGNATURE----- --qscGgbX9bdO+6qtZ--