Searched hist:ddc918b1f30926e8a41856ec2cfc22733c4e850d (Results 1 – 2 of 2) sorted by relevance
| /rk3399_ARM-atf/make_helpers/ |
| H A D | cflags.mk | ddc918b1f30926e8a41856ec2cfc22733c4e850d Tue Apr 29 14:48:07 UTC 2025 Boyan Karatotev <boyan.karatotev@arm.com> feat(build): allow full LTO builds with clang
GCC doesn't like LTOing __builtins. This has been broken for time immemorial (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63215) and there is no fix coming. Prior to GCC 14 a build of the libc with LTO will simply not work. From GCC14 a workaround is possible passing -ffat-lto-objects. The underlying issue is that the linker "forgets" about builtin symbols it added during LTO. The non-LTO copies make these forgotten functions available during final resolution. However, this still does not LTO the libc, it just allows for it to build with -flto.
Since GCC is our main compiler, and we do not differentiate the libc from any other lib we build, we have simply not built libs with LTO so far. However, there is no need to kneecap clang for GCC's failings, so LTO all libs on clang when enabled.
When GCC14 becomes the oldest reasonable compiler we support, this can be done for GCC too, although with the workaround above. This still won't LTO the libc, but it will at least LTO other libs.
Change-Id: Ic5b4851480131f4e8aefd678cc05d4dd02ee01ef Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
|
| /rk3399_ARM-atf/docs/getting_started/ |
| H A D | build-options.rst | ddc918b1f30926e8a41856ec2cfc22733c4e850d Tue Apr 29 14:48:07 UTC 2025 Boyan Karatotev <boyan.karatotev@arm.com> feat(build): allow full LTO builds with clang
GCC doesn't like LTOing __builtins. This has been broken for time immemorial (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63215) and there is no fix coming. Prior to GCC 14 a build of the libc with LTO will simply not work. From GCC14 a workaround is possible passing -ffat-lto-objects. The underlying issue is that the linker "forgets" about builtin symbols it added during LTO. The non-LTO copies make these forgotten functions available during final resolution. However, this still does not LTO the libc, it just allows for it to build with -flto.
Since GCC is our main compiler, and we do not differentiate the libc from any other lib we build, we have simply not built libs with LTO so far. However, there is no need to kneecap clang for GCC's failings, so LTO all libs on clang when enabled.
When GCC14 becomes the oldest reasonable compiler we support, this can be done for GCC too, although with the workaround above. This still won't LTO the libc, but it will at least LTO other libs.
Change-Id: Ic5b4851480131f4e8aefd678cc05d4dd02ee01ef Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
|