| f7a41fb4 | 10-Oct-2024 |
Boyan Karatotev <boyan.karatotev@arm.com> |
perf(build): be clever about uppercasing
Most of the macros in build_macros.mk get lazily evaluated. That's mostly fine, except for the fact that the `uppercase` macro needs to spawn a subshell to g
perf(build): be clever about uppercasing
Most of the macros in build_macros.mk get lazily evaluated. That's mostly fine, except for the fact that the `uppercase` macro needs to spawn a subshell to get its output. And the target for every file requires calling `uppercase` many, MANY, times, thrashing performance on even the most trivial of make commands.
We can be a little clever and only call `uppercase` a handful of times and then pass around the already uppercased strings.
The same is true about the verbosity augmentation variables. Simply changing them to simply expanded variables allows for them to be pre-processed and then used over and over again.
`make realclean` is a pretty good benchmark for this as it doesn't do much else but must process all the rules, like every other make command. On a clean checkout of TF-A on an Intel Xeon Gold 5218 (i.e. slow single-core) workstation, that command used to take about 7 seconds. With this patch it takes about 0.5.
Change-Id: I632236a12a40f169e834974ecbc73ff80aac3462 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 8292f240 | 14-Jun-2024 |
Andre Przywara <andre.przywara@arm.com> |
fix(fpga): avoid stripping kernel trampoline
The Arm FPGA platform builds a final AXF file, which is an ELF file containing some required trampolines and binaries, like the DTB. This is more a "cont
fix(fpga): avoid stripping kernel trampoline
The Arm FPGA platform builds a final AXF file, which is an ELF file containing some required trampolines and binaries, like the DTB. This is more a "container with load addresses" than an object or executable file, but it's still built with the linker tool. Commit acf0076ae2e5 ("build(fpga): correctly handle gcc as linker for LTO") pulled in ${TF_LDFLAGS} when building this AXF file, which includes "--gc-sections". That strips the kernel trampoline off that file, making the board hang when the kernel is loaded at 0x80200000 (the recommended load address for "newer" kernels).
Drop the usage of TF_LDFLAGS altogether, since we need none of the options specified there for our special linker step. Instead collect the needed options (like -nostdlib) in a separate variable, and just account for the slight syntax differences between GCC and clang. "--strip-debug" turns out to be redundant, since "-s" already strips more symbols, so remove that from the list.
Change-Id: I1349d58fa93973ba3add8cab2272259abdea84e0 Fixes: acf0076ae2e5 ("build(fpga): correctly handle gcc as linker for LTO") Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|