Page MenuHomeFreeBSD

In kern.pre.mk, split SYSTEM_LD into two variables to avoid duplication in other files.
ClosedPublic

Authored by ian on Dec 24 2019, 11:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 6, 11:43 PM
Unknown Object (File)
Nov 20 2024, 4:05 PM
Unknown Object (File)
Nov 5 2024, 2:47 AM
Unknown Object (File)
Nov 3 2024, 2:19 PM
Unknown Object (File)
Nov 3 2024, 2:19 PM
Unknown Object (File)
Nov 3 2024, 2:19 PM
Unknown Object (File)
Nov 3 2024, 2:07 PM
Unknown Object (File)
Sep 13 2024, 2:11 AM
Subscribers
None

Details

Summary

Arm and mips systems need to replace the SYSTEM_LD variable because they need to create intermediate files which are post-processed with objcopy to create the final .TARGET file. Previously they did so by pasting the full expansion of SYSTEM_LD with the output filename replaced. This means changing SYSTEM_LD in kern.pre.mk means you need to chase down anything that replaces it and figure out how it differs so you can paste your changes in there too.

Now there is a SYSTEM_LD_BASECMD variable that holds the entire basic kernel linker command without the input and output files. This will allow arm and mips makefiles to create their custom versions by refering to SYSTEM_LD_BASECMD, which then becomes the one place where you have to make changes to the basic linker command args.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Are the Makefile.arm and Makefile.mips changes separate?

This revision is now accepted and ready to land.Dec 24 2019, 11:47 PM
In D22921#502044, @imp wrote:

Are the Makefile.arm and Makefile.mips changes separate?

Yeah, I was just getting ready to link the changes in phab and noticed that you'd already reviewed this one.