New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os_test TA build reports duplicated __aeabi_unwind_cpp_pr0() definition #440
Comments
Sounds like a reasonable fix but I must admit I have not totally understood what's happening :-/ Here is what I know:
Like you, I don't understand why Perhaps the best way forward is to remove the problematic functions from libutils when |
Fix a TA build issue found when CFG_UNWIND=n. This issue produces a build error trace like the below: .../toolchains/aarch32/bin/arm-linux-gnueabihf-ld.bfd: .../toolchains/aarch32/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/libgcc_eh.a(unwind-arm.o): in function `__aeabi_unwind_cpp_pr0': /tmp/dgboter/bbs/rhev-vm8--rhe6x86_64/buildbot/rhe6x86_64--arm-linux-gnueabihf/build/src/gcc/libgcc/config/arm/unwind-arm.c:494: multiple definition of `__aeabi_unwind_cpp_pr0'; .../optee_os/out/arm/export-ta_arm32/lib/libutils.a(aeabi_unwind.o): .../optee_os/lib/libutils/ext/arch/arm/aeabi_unwind.c:9: first defined here .../optee_os/out/arm/export-ta_arm32/mk/link.mk:109: recipe for target 'out/5b9e0e40-2636-11e1-ad9e-0002a5d5c51b.elf' failed I don't understand why toolchain support for __aeabi_unwind_cpp_pr0() conflicts with the libutils implementation only when CFG_UNWIND=n. Yet the current change works around the issue. Fixes: OP-TEE/optee_test#440 Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Thanks @jforissier for your feedback. |
Fix a TA build issue found when CFG_UNWIND=n. This issue produces a build error trace like the below: .../toolchains/aarch32/bin/arm-linux-gnueabihf-ld.bfd: .../toolchains/aarch32/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/libgcc_eh.a(unwind-arm.o): in function `__aeabi_unwind_cpp_pr0': /tmp/dgboter/bbs/rhev-vm8--rhe6x86_64/buildbot/rhe6x86_64--arm-linux-gnueabihf/build/src/gcc/libgcc/config/arm/unwind-arm.c:494: multiple definition of `__aeabi_unwind_cpp_pr0'; .../optee_os/out/arm/export-ta_arm32/lib/libutils.a(aeabi_unwind.o): .../optee_os/lib/libutils/ext/arch/arm/aeabi_unwind.c:9: first defined here .../optee_os/out/arm/export-ta_arm32/mk/link.mk:109: recipe for target 'out/5b9e0e40-2636-11e1-ad9e-0002a5d5c51b.elf' failed I don't understand why toolchain support for __aeabi_unwind_cpp_pr0() conflicts with the libutils implementation only when CFG_UNWIND=n. Yet the current change works around the issue. Fixes: OP-TEE/optee_test#440 Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Fix a TA build issue found when CFG_UNWIND=n. This issue produces a build error trace like the below: .../toolchains/aarch32/bin/arm-linux-gnueabihf-ld.bfd: .../toolchains/aarch32/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/libgcc_eh.a(unwind-arm.o): in function `__aeabi_unwind_cpp_pr0': /tmp/dgboter/bbs/rhev-vm8--rhe6x86_64/buildbot/rhe6x86_64--arm-linux-gnueabihf/build/src/gcc/libgcc/config/arm/unwind-arm.c:494: multiple definition of `__aeabi_unwind_cpp_pr0'; .../optee_os/out/arm/export-ta_arm32/lib/libutils.a(aeabi_unwind.o): .../optee_os/lib/libutils/ext/arch/arm/aeabi_unwind.c:9: first defined here .../optee_os/out/arm/export-ta_arm32/mk/link.mk:109: recipe for target 'out/5b9e0e40-2636-11e1-ad9e-0002a5d5c51b.elf' failed I don't understand why toolchain support for __aeabi_unwind_cpp_pr0() conflicts with the libutils implementation only when CFG_UNWIND=n. Yet the current change works around the issue. Fixes: OP-TEE/optee_test#440 Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Fix a TA build issue found when CFG_UNWIND=n. This issue produces a build error trace like the below: .../toolchains/aarch32/bin/arm-linux-gnueabihf-ld.bfd: .../toolchains/aarch32/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/libgcc_eh.a(unwind-arm.o): in function `__aeabi_unwind_cpp_pr0': /tmp/dgboter/bbs/rhev-vm8--rhe6x86_64/buildbot/rhe6x86_64--arm-linux-gnueabihf/build/src/gcc/libgcc/config/arm/unwind-arm.c:494: multiple definition of `__aeabi_unwind_cpp_pr0'; .../optee_os/out/arm/export-ta_arm32/lib/libutils.a(aeabi_unwind.o): .../optee_os/lib/libutils/ext/arch/arm/aeabi_unwind.c:9: first defined here .../optee_os/out/arm/export-ta_arm32/mk/link.mk:109: recipe for target 'out/5b9e0e40-2636-11e1-ad9e-0002a5d5c51b.elf' failed I don't understand why toolchain support for __aeabi_unwind_cpp_pr0() conflicts with the libutils implementation only when CFG_UNWIND=n. Yet the current change works around the issue. Fixes: OP-TEE/optee_test#440 Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Fix a TA build issue found when CFG_UNWIND=n. This issue produces a build error trace like the below: .../toolchains/aarch32/bin/arm-linux-gnueabihf-ld.bfd: .../toolchains/aarch32/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/libgcc_eh.a(unwind-arm.o): in function `__aeabi_unwind_cpp_pr0': /tmp/dgboter/bbs/rhev-vm8--rhe6x86_64/buildbot/rhe6x86_64--arm-linux-gnueabihf/build/src/gcc/libgcc/config/arm/unwind-arm.c:494: multiple definition of `__aeabi_unwind_cpp_pr0'; .../optee_os/out/arm/export-ta_arm32/lib/libutils.a(aeabi_unwind.o): .../optee_os/lib/libutils/ext/arch/arm/aeabi_unwind.c:9: first defined here .../optee_os/out/arm/export-ta_arm32/mk/link.mk:109: recipe for target 'out/5b9e0e40-2636-11e1-ad9e-0002a5d5c51b.elf' failed I don't understand why toolchain support for __aeabi_unwind_cpp_pr0() conflicts with the libutils implementation only when CFG_UNWIND=n. Yet the current change works around the issue. Fixes: OP-TEE/optee_test#440 Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Found a build issue introduced by 1a205ae ("Add regression 1031 (C++ support in TAs)") when OP-TEE built with
CFG_UNWIND=n
:Issue found on both qemu_v7 and stm32mp1 OP-TEE setup.
Seems
__aeabi_unwind_cpp_pr0()
is already defined in the toolchain (arm-linux-gnueabihf/8.3.0/libgcc_eh.a) and conflicts with the one exported by optee_os libutils.I don't understand why this pops out only when
CFG_UNWIND=n
.FYI I worked around this issue by adding weak attribute to the function in libutils.
(another workaround is to revert 1a205ae ):
Note: maybe this issue should be created in optee_os.
The text was updated successfully, but these errors were encountered: