Page MenuHomeFreeBSD

[PowerPC] Switch powerpc32 from BFD to LLD10.
ClosedPublic

Authored by bdragon on Wed, Mar 18, 3:53 AM.

Details

Summary

Fully switch powerpc32 to LLD10.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

bdragon created this revision.Wed, Mar 18, 3:53 AM
emaste accepted this revision.Wed, Mar 18, 5:26 PM

Also update share/man/man7/arch.7, tools/build/options/WITH_BINUTILS, and tools/build/options/WITHOUT_BINUTILS.

This revision is now accepted and ready to land.Wed, Mar 18, 5:26 PM
bdragon updated this revision to Diff 69669.Wed, Mar 18, 11:15 PM

Addressing comments. Working on further cleaning up.

This revision now requires review to proceed.Wed, Mar 18, 11:15 PM
bdragon added inline comments.Wed, Mar 18, 11:18 PM
gnu/usr.bin/binutils/Makefile
20 ↗(On Diff #69669)

This also implies that the entire ld/ subdirectory can go away after this is in.

tools/build/mk/OptionalObsoleteFiles.inc
418 ↗(On Diff #69669)

Someone double check this, but as far as I can tell, we want NEITHER a MK_BINUTILS nor a MK_LLD_IS_LD check at this point -- the existence of this file should be based purely on whether or not base/binutils is installed.

emaste added a subscriber: jhb.Thu, Mar 19, 12:27 AM
emaste added inline comments.
gnu/usr.bin/binutils/Makefile
20 ↗(On Diff #69669)

Yep. IMO you could also do it in the same commit (because ld/ is pretty much trivial), fine with me either way.

tools/build/mk/OptionalObsoleteFiles.inc
418 ↗(On Diff #69669)

I believe you are correct, paging @jhb
That said the other WITH_PORT_BASE_BINUTILS cases are in the top-level ObsoleteFiles.inc.

emaste accepted this revision.Thu, Mar 19, 12:27 AM
This revision is now accepted and ready to land.Thu, Mar 19, 12:27 AM
jhb added inline comments.Thu, Mar 19, 9:59 PM
tools/build/mk/OptionalObsoleteFiles.inc
418 ↗(On Diff #69669)

Yes, this should probably move to the top-level at some point. I think it would be fine to do that separately as part of removing support for in-tree ld.bfd and perhaps not part of this change? I would also put removing ld in that change as well. They may be small, but I think it's worth splitting those up.

emaste added inline comments.Thu, Mar 19, 10:43 PM
tools/build/mk/OptionalObsoleteFiles.inc
418 ↗(On Diff #69669)

Yep, fine with me either way

bdragon updated this revision to Diff 69905.Fri, Mar 27, 12:26 AM
bdragon edited the summary of this revision. (Show Details)
bdragon added a reviewer: jhibbits.

Reroll against latest, still tweaking things.

This revision now requires review to proceed.Fri, Mar 27, 12:26 AM
bdragon added inline comments.Fri, Mar 27, 12:52 AM
stand/defs.mk
102 ↗(On Diff #69905)

will take this comment back out, powerpc is lowest common denominator and should work fine even for stuff for use on book-E.

jhibbits accepted this revision.Fri, Mar 27, 12:54 AM

Works great for powerpcspe!

This revision is now accepted and ready to land.Fri, Mar 27, 12:54 AM
This revision was automatically updated to reflect the committed changes.
arichardson added inline comments.
head/share/mk/bsd.compat.mk
59

Shouldn't this be LD="${LD} -m elf32ppc_fbsd"? It seems like this would pass -m elf32ppc_fbsd to make and make ignores it since the directory doesn't exist?

-m directory
             Specify a directory in which to search for sys.mk and makefiles included via the <file>-style include statement.

The -m flag doesn't do much for lld since it will just set infer everything from the first .o file if not present. The only thing that the _fbsd suffix does is set the OSABI field (which might not be required since the crt files add the freebsd note section).

bdragon marked an inline comment as done.Fri, Mar 27, 6:38 PM

Currently testing a fix.

I guess it's mainly important when using CROSS_TOOLCHAIN

head/share/mk/bsd.compat.mk
59

You're right, committed rS359373 to fix this.