Marek Behún
86c5e21013
ARM: make gd a function call for LTO and set via set_gd()
...
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>
2021-05-24 14:21:30 -04:00
..
2021-01-12 10:58:04 +05:30
2018-05-07 09:34:12 -04:00
2018-05-07 09:34:12 -04:00
2018-05-07 09:34:12 -04:00
2021-01-18 15:23:06 -05:00
2018-05-07 09:34:12 -04:00
2018-05-07 09:34:12 -04:00
2020-04-28 15:57:58 -04:00
2020-07-29 10:13:41 -04:00
2018-05-07 09:34:12 -04:00
2018-05-07 09:34:12 -04:00
2021-03-05 10:25:41 +05:30
2020-05-18 21:19:23 -04:00
2019-01-25 12:12:57 -05:00
2020-12-13 16:51:09 -07:00
2021-04-08 09:18:29 +02:00
2021-04-08 20:29:52 +02:00
2021-04-08 09:18:29 +02:00
2020-04-18 12:54:43 +02:00
2021-02-21 06:08:00 +01:00
2021-02-08 14:01:19 +05:30
2020-08-03 22:19:54 -04:00
2021-04-06 11:10:29 +02:00
2019-07-11 10:58:03 +02:00
2021-01-23 13:40:29 +01:00
2021-04-08 23:59:50 +02:00
2021-01-23 13:40:29 +01:00
2021-04-08 09:18:29 +02:00
2021-01-23 13:40:29 +01:00
2020-07-17 09:30:13 -04:00
2021-01-23 13:40:29 +01:00
2021-01-23 13:40:29 +01:00
2020-07-17 09:30:13 -04:00
2020-08-25 08:01:16 +02:00
2020-08-25 08:01:16 +02:00
2018-12-10 06:09:34 +01:00
2020-05-18 14:54:24 -04:00
2020-05-18 14:54:24 -04:00
2018-05-07 09:34:12 -04:00
2020-07-07 17:11:58 -04:00
2019-11-17 17:23:24 +08:00
2018-05-07 09:34:12 -04:00
2019-05-08 17:34:12 +08:00
2019-05-08 17:34:12 +08:00
2019-05-08 17:34:12 +08:00
2019-05-08 17:34:12 +08:00
2019-05-08 17:34:12 +08:00
2020-05-18 14:54:24 -04:00
2019-05-08 17:34:12 +08:00
2019-05-08 17:34:12 +08:00
2019-05-08 17:34:12 +08:00
2021-04-10 11:52:43 +02:00
2019-05-08 17:34:12 +08:00
2018-09-25 21:49:18 -04:00
2020-12-09 10:57:50 +01:00
2020-12-09 10:57:50 +01:00
2020-12-09 10:57:50 +01:00
2020-12-09 10:57:50 +01:00
2020-12-09 10:57:50 +01:00
2018-05-07 09:34:12 -04:00
2021-04-16 01:12:58 +01:00
2021-02-02 15:33:42 -05:00
2019-06-05 09:16:33 -07:00
2019-06-05 09:16:33 -07:00
2019-06-05 09:16:33 -07:00
2020-05-18 21:19:23 -04:00
2018-05-07 09:34:12 -04:00
2019-06-05 09:16:33 -07:00
2020-12-13 16:51:09 -07:00
2020-01-17 17:53:40 -05:00
2020-05-01 11:34:01 -04:00
2018-05-07 09:34:12 -04:00
2021-04-08 09:18:29 +02:00
2019-07-18 11:31:24 -04:00
2021-02-02 15:33:42 -05:00
2020-10-23 09:16:07 -04:00
2021-01-18 15:14:15 -05:00
2020-05-18 21:19:23 -04:00
2018-05-07 09:34:12 -04:00
2018-09-10 21:19:33 -04:00
2017-03-18 20:28:01 -04:00
2018-09-25 21:49:18 -04:00
2018-05-07 09:34:12 -04:00
2020-05-18 21:19:23 -04:00
2018-05-07 09:34:12 -04:00
2018-05-07 09:34:12 -04:00
2021-03-02 15:53:37 -05:00
2021-04-22 14:09:45 -04:00
2018-05-07 09:34:12 -04:00
2020-05-18 14:54:24 -04:00
2020-05-22 15:22:35 +02:00
2020-05-18 14:54:24 -04:00
2018-05-07 09:34:12 -04:00
2020-07-29 10:37:11 -04:00
2021-05-24 14:21:30 -04:00
2021-01-18 15:14:15 -05:00
2020-01-24 11:19:52 -05:00
2020-08-25 08:01:16 +02:00
2019-05-28 13:58:06 -04:00
2018-11-16 13:34:33 -05:00
2016-10-06 20:57:40 -04:00
2020-07-10 14:10:43 -04:00
2020-05-18 14:54:24 -04:00
2020-12-13 16:51:09 -07:00
2021-02-21 06:08:00 +01:00
2020-05-18 21:19:23 -04:00
2020-12-13 16:51:09 -07:00
2020-05-18 14:54:24 -04:00
2018-05-07 09:34:12 -04:00
2018-05-07 09:34:12 -04:00
2018-05-07 09:34:12 -04:00
2019-05-05 08:48:50 -04:00
2020-05-18 21:19:23 -04:00
2018-05-07 09:34:12 -04:00
2021-05-24 14:21:30 -04:00
2018-05-07 09:34:12 -04:00
2021-05-24 14:21:30 -04:00
2018-05-07 09:34:12 -04:00
2018-09-11 08:32:55 -04:00
2016-12-27 11:24:15 -05:00
2021-03-02 15:53:37 -05:00
2018-09-10 20:48:16 -04:00
2020-01-17 13:27:30 -05:00
2018-05-07 09:34:12 -04:00
2018-05-07 09:34:12 -04:00
2018-05-07 09:34:12 -04:00
2020-08-14 15:18:27 -04:00