mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-18 10:48:51 +00:00
86c5e21013
On ARM, the gd pointer is stored in registers r9 / x18. For this the -ffixed-r9 / -ffixed-x18 flag is used when compiling, but using global register variables causes errors when building with LTO, and these errors are very difficult to overcome. Richard Biener says [1]: Note that global register vars shouldn't be used with LTO and if they are restricted to just a few compilation units the recommended fix is to build those CUs without -flto. We cannot do this for U-Boot since all CUs use -ffixed-reg flag. It seems that with LTO we could in fact store the gd pointer differently and gain performance or size benefit by allowing the compiler to use r9 / x18. But this would need more work. So for now, when building with LTO, go the clang way, and instead of declaring gd a global register variable, we make it a function call via macro. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68384 Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org> |
||
---|---|---|
.. | ||
include/mach | ||
clock.c | ||
clock_init.h | ||
clock_init_exynos4.c | ||
clock_init_exynos5.c | ||
common_setup.h | ||
config.mk | ||
dmc_common.c | ||
dmc_init_ddr3.c | ||
dmc_init_exynos4.c | ||
exynos4_setup.h | ||
exynos5_setup.h | ||
Kconfig | ||
lowlevel_init.c | ||
Makefile | ||
mmu-arm64.c | ||
pinmux.c | ||
power.c | ||
sec_boot.S | ||
soc.c | ||
spl_boot.c | ||
system.c | ||
tzpc.c |