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.

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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; 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.