Page MenuHomeFreeBSD

[PowerPC64] LLVM as default toolchain for PowerPC and PowerPC64
Needs ReviewPublic

Authored by alfredo.junior_eldorado.org.br on May 23 2019, 2:09 PM.

Details

Summary

**Warning: to be commited on "flag day"

This enables LLVM as default toolchain/compiler/linker for PowerPC, PowerPCSPE and PowerPC64 platforms.

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 27439
Build 25677: arc lint + arc unit

Event Timeline

alfredo.junior_eldorado.org.br planned changes to this revision.May 23 2019, 2:16 PM
alfredo.junior_eldorado.org.br edited the summary of this revision. (Show Details)

All known outstanding issues are recorded as parents of this review?

share/mk/src.opts.mk
281

Should this part be committed independently now? (I.e., this should be applied regardless of what the default is?)

336

I suppose we cannot turn LLVM_LIBUNWIND on in advance (with gcc 4.2.1)

share/mk/src.opts.mk
281

Actually this is just a preparation for the flag day, marking this as "Plan Changes" to avoid accidental commit.
This shouldn't be commited now, but reviews are welcome.

336

True. This need to wait for the flag day.

emaste added inline comments.May 23 2019, 6:31 PM
share/mk/src.opts.mk
281

I mean, it seems this specific __LLVM_TARGET_FILT change is a bug fix that should go in before the flag day? Any use of Clang on powerpc64 is inherently not the default but needs this change? It doesn't really matter if this doesn't go in until later, just something I wondered about.

alfredo.junior_eldorado.org.br marked 3 inline comments as done.May 23 2019, 7:19 PM
alfredo.junior_eldorado.org.br added inline comments.
share/mk/src.opts.mk
281

oh yeah, this is bug fix! I guess it could go in before, but I personally didn't verified for undesired side effects with current default ABI.
If you prefer to split this part, just let me know.

alfredo.junior_eldorado.org.br marked an inline comment as done.Jun 25 2019, 2:07 PM

Moved _LLVM_TARGET_FILT change to D20756

alfredo.junior_eldorado.org.br planned changes to this revision.Jun 25 2019, 3:23 PM

Can't this be done for powerpc*? powerpcspe is probably the only thing that doesn't fully work upstream yet, but I have patches in-flight that might land in LLVM9 before too long.

Can't this be done for powerpc*? powerpcspe is probably the only thing that doesn't fully work upstream yet, but I have patches in-flight that might land in LLVM9 before too long.

Sure, this would require changes in D20261 as well since base LLD is not ready

alfredo.junior_eldorado.org.br retitled this revision from [PowerPC64] LLVM is now the default toolchain for PowerPC64 target binutils BFD linker is kept for compiling 32 bit binaries such as LIB32 and stand/slof to [PowerPC64] LLVM as default toolchain for PowerPC and PowerPC64.
alfredo.junior_eldorado.org.br edited the summary of this revision. (Show Details)
  • Includes PowerPC 32 bit in the list.
  • removes LLDB for PowerPC64, since it expects "powerpc64le" and we are in BE.
alfredo.junior_eldorado.org.br planned changes to this revision.Jul 8 2019, 12:38 PM

Patch updated to resolve conflict with current HEAD, and also makes LLD as LD in powerpc (thanks to @bdragon)

pkubaj added a subscriber: pkubaj.EditedWed, Nov 6, 12:43 PM

Changes to share/man/man5/src.conf.5 are also necessary.

pkubaj added a comment.Wed, Nov 6, 1:08 PM

ObsoleteFiles.inc will also need updates since we switch from ld.bfd for 32-bits after all.

You will also need updates to share/man/man7/arch.7 to account for default compiler and linker changes.

emaste added a comment.Fri, Nov 8, 7:11 PM

Is this blocked on anything now?

alfredo.junior_eldorado.org.br planned changes to this revision.Fri, Nov 8, 7:23 PM

AFAIK the plan is to switch all three powerpc* at once and there are currently problems on powerpc64 with linuxkpi (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241728) and on powerpc with PF kernel module.

alfredo.junior_eldorado.org.br edited the summary of this revision. (Show Details)

enables clang on powerpcspe
disable lld on powerpc and powerpcspe

bdragon added inline comments.Sat, Nov 9, 4:14 AM
share/man/man7/arch.7
347

minor nit: "mips or sparc64" is a bit tidier than "mips, nor sparc64", English wise.

alfredo.junior_eldorado.org.br edited the summary of this revision. (Show Details)

update man file with @bdragon's comment

alfredo.junior_eldorado.org.br marked an inline comment as done.Mon, Nov 11, 12:11 PM