[PATCH u-boot v4 21/36] ARM: make gd a function call for LTO and set via set_gd()

2021-05-20 Thread Marek Behún
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

Re: [PATCH u-boot v4 21/36] ARM: make gd a function call for LTO and set via set_gd()

2021-05-20 Thread Simon Glass
On Thu, 20 May 2021 at 05:25, Marek Behún wrote: > > 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 ove

Re: [PATCH u-boot v4 21/36] ARM: make gd a function call for LTO and set via set_gd()

2021-05-24 Thread Tom Rini
On Thu, May 20, 2021 at 01:24:10PM +0200, Marek Behún wrote: > 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 diffic