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)
Jan 22 2024, 3:58 PM
Unknown Object (File)
Dec 22 2023, 11:48 PM
Unknown Object (File)
Dec 17 2023, 5:14 AM
Unknown Object (File)
Dec 16 2023, 9:23 AM
Unknown Object (File)
Dec 13 2023, 11:42 PM
Unknown Object (File)
Dec 2 2023, 10:21 AM
Unknown Object (File)
Oct 19 2023, 8:18 PM
Unknown Object (File)
Oct 19 2023, 10:14 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.