This repository has been archived by the owner on Nov 14, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[HACK] msm: ipa: Enhance IPA_EMULATION guarding to avoid undefined re…
…ferences When compiling the kernel using GCC LTO, we hit the following errors at link time: /usr/lib/gcc/aarch64-linux-gnu/11.2.0/../../../../aarch64-linux-gnu/bin/ld: /tmp/cclIai5s.ltrans87.ltrans.o: in function `ipa_pci_remove': <artificial>:(.text+0xfc): undefined reference to `ipa_ut_module_exit' /usr/lib/gcc/aarch64-linux-gnu/11.2.0/../../../../aarch64-linux-gnu/bin/ld: /tmp/cclIai5s.ltrans87.ltrans.o: in function `ipa_pci_probe': <artificial>:(.text+0x2310c): undefined reference to `ipa_ut_module_init' collect2: error: ld returned 1 exit status make[1]: *** [/home/0ctobot/Android/OnePlus/kebab/neutrino_kernel_oneplus_sm8250/Makefile:1211: vmlinux] Error 1 make: *** [Makefile:146: sub-make] Error 2 This seems to be a result of DCE, as these functions become effectively unreachable with !CONFIG_IPA_UT and the compiler has optimized out code for if-statements that it can prove are always false. This little hack may not jibe perfectly with what the original author had in mind, but it's sufficient for our usecase. Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
- Loading branch information