public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Sam Edwards <cfsworks@gmail.com>
Cc: "Michal Simek" <michal.simek@amd.com>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	u-boot@lists.denx.de,
	"Alper Nebi Yasak" <alpernebiyasak@gmail.com>,
	"Andrew Scull" <ascull@google.com>,
	"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
	"Kever Yang" <kever.yang@rock-chips.com>,
	"Marek Behún" <kabel@kernel.org>,
	"Nathan Barrett-Morrison" <nathan.morrison@timesys.com>,
	"Pali Rohár" <pali@kernel.org>, "Peng Fan" <peng.fan@nxp.com>,
	"Philip Oberfichtner" <pro@denx.de>,
	"Philipp Tomsich" <philipp.tomsich@vrull.eu>,
	"Quentin Schulz" <quentin.schulz@theobroma-systems.com>,
	"Simon Glass" <sjg@chromium.org>
Subject: Re: [RFC PATCH 00/10] Improve ARM target's support for LLVM toolchain
Date: Mon, 22 May 2023 17:13:56 -0400	[thread overview]
Message-ID: <20230522211356.GA3218766@bill-the-cat> (raw)
In-Reply-To: <7640951a-8a3a-6747-52fb-ab19417e813f@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2885 bytes --]

On Mon, May 22, 2023 at 01:59:33PM -0600, Sam Edwards wrote:
> Hi Tom,
> 
> 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.
> 
> 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 does
> 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.
> 
> 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 than
> 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= (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.
> 
> Having something like Linux's `LLVM=1` to enable LLVM would be ideal, I
> think. I probably won't be doing that backporting in this patch series since
> 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.
> 
> 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.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

      reply	other threads:[~2023-05-22 21:14 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-20 20:55 [RFC PATCH 00/10] Improve ARM target's support for LLVM toolchain Sam Edwards
2023-05-20 20:55 ` [RFC PATCH 01/10] makefile: Fix symbol typo in binary_size_check Sam Edwards
2023-05-20 20:55 ` [RFC PATCH 02/10] arm: set alignment properly for asm funcs Sam Edwards
2023-05-20 20:55 ` [RFC PATCH 03/10] arm: exclude eabi_compat from LTO Sam Edwards
2023-05-20 20:55 ` [RFC PATCH 04/10] arm: add __aeabi_memclr in eabi_compat Sam Edwards
2023-05-20 20:55 ` [RFC PATCH 05/10] arm: add aligned-memory aliases to eabi_compat Sam Edwards
2023-05-20 20:55 ` [RFC PATCH 06/10] arm: discard .gnu.version* sections Sam Edwards
2023-05-20 20:55 ` [RFC PATCH 07/10] arm: efi_loader: discard hash, unwind information Sam Edwards
2023-05-22  7:00   ` Ilias Apalodimas
2023-05-22 19:25     ` Sam Edwards
2023-05-22 20:28       ` Ilias Apalodimas
2023-05-23  5:08       ` Heinrich Schuchardt
2023-05-20 20:55 ` [RFC PATCH 08/10] arm: efi_loader: move .dynamic out of .text in EFI Sam Edwards
2023-05-22  7:30   ` Ilias Apalodimas
2023-05-22  8:10   ` Heinrich Schuchardt
2023-05-22 17:13     ` Sam Edwards
2023-05-20 20:55 ` [RFC PATCH 09/10] arm: discard all .dyn* sections Sam Edwards
2023-05-20 20:55 ` [RFC PATCH 10/10] arm: migrate away from sections.c Sam Edwards
2023-05-23  6:56   ` Ilias Apalodimas
2023-05-21  4:26 ` [RFC PATCH 00/10] Improve ARM target's support for LLVM toolchain Heinrich Schuchardt
2023-05-21  4:59   ` Sam Edwards
2023-05-22  6:52     ` Ilias Apalodimas
2023-05-22 19:37       ` Sam Edwards
2023-05-22 20:15         ` Heinrich Schuchardt
2023-05-23  6:54         ` Ilias Apalodimas
2023-05-22 10:39     ` Michal Simek
2023-05-22 15:30       ` Tom Rini
2023-05-22 19:59         ` Sam Edwards
2023-05-22 21:13           ` Tom Rini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230522211356.GA3218766@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=alpernebiyasak@gmail.com \
    --cc=ascull@google.com \
    --cc=cfsworks@gmail.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=kabel@kernel.org \
    --cc=kever.yang@rock-chips.com \
    --cc=michal.simek@amd.com \
    --cc=nathan.morrison@timesys.com \
    --cc=pali@kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=philipp.tomsich@vrull.eu \
    --cc=pro@denx.de \
    --cc=quentin.schulz@theobroma-systems.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox