Hello,
I added some code in my $UBOOT/board/freescale/mx6sabresd.c.
which is some calculation of double precision variables.
then when I build my u-boot-imx with "bitbake u-boot-imx"
following errors occurs.
/MY-ROOT/uboot/board/freescale/mx6sabresd/mx6sabresd.c:2135: undefined reference to `__aeabi_d2iz'
arm-poky-linux-gnueabi-ld.bfd: /MY-ROOT/uboot/board/freescale/mx6sabresd/mx6sabresd.c:2135: undefined reference to `__aeabi_d2iz'
arm-poky-linux-gnueabi-ld.bfd: /MY-ROOT/uboot/board/freescale/mx6sabresd/mx6sabresd.c:2137: undefined reference to `__aeabi_dcmplt'
arm-poky-linux-gnueabi-ld.bfd: /MY-ROOT/uboot/board/freescale/mx6sabresd/mx6sabresd.c:2149: undefined reference to `__aeabi_dcmpgt'
arm-poky-linux-gnueabi-ld.bfd: /MY-ROOT/uboot/board/freescale/mx6sabresd/mx6sabresd.c:2143: undefined reference to `__aeabi_dcmplt'
arm-poky-linux-gnueabi-ld.bfd: /MY-ROOT/uboot/board/freescale/mx6sabresd/mx6sabresd.c:2149: undefined reference to `__aeabi_dcmpgt'
arm-poky-linux-gnueabi-ld.bfd: /MY-ROOT/uboot/board/freescale/mx6sabresd/mx6sabresd.c:2149: undefined reference to `__aeabi_dcmpgt'
make: *** [Makefile:1704: u-boot] Error 1
the double precision calculation codes are copied from my earlier project in u-boot.2009.
and there was no problem with 2009 version.
Please help with any suggestions.
Thank you!!
Solved! Go to Solution.
Here's solution..
in arch/arm/config.mk
Here's solution..
in arch/arm/config.mk
modified defconfig with
"# CONFIG_USE_PRIVATE_LIBGCC is not set"
then
arm-poky-linux-gnueabi-ld.bfd: error: /home/brant/work/imx/bld-imx6dlsabresd-xwayland-full/_local/tool/sysroots/cortexa9t2hf-neon-poky-linux-gnueabi/usr/lib/arm-poky-linux-gnueabi/10.2.0/libgcc.a(_udivmoddi4.o) uses VFP register arguments, u-boot does not
arm-poky-linux-gnueabi-ld.bfd: warning: /home/brant/work/imx/bld-imx6dlsabresd-xwayland-full/_local/tool/sysroots/cortexa9t2hf-neon-poky-linux-gnueabi/usr/lib/arm-poky-linux-gnueabi/10.2.0/libgcc.a(_udivmoddi4.o) uses 4-byte wchar_t yet the output is to use 2-byte wchar_t; use of wchar_t values across objects may fail
arm-poky-linux-gnueabi-ld.bfd: failed to merge target specific data of file /home/brant/work/imx/bld-imx6dlsabresd-xwayland-full/_local/tool/sysroots/cortexa9t2hf-neon-poky-linux-gnueabi/usr/lib/arm-poky-linux-gnueabi/10.2.0/libgcc.a(_udivmoddi4.o)
make: *** [Makefile:1704: u-boot] Error 1
added "-mfpu=vfpv3 -mfloat-abi=hard"
to PLATFORM_RELFLAGS in config.mk
https://community.nxp.com/t5/i-MX-Processors/how-to-use-float-operation-in-uboot-codes/m-p/1071182
this topic says no floating point supported in u-boot.
also double precision?
Hello Brant8484,
__aeabi_d2iz lives in libgcc.a. libgcc.a must be linked *AFTER* libm.a.
Adding "gcc" to the Linker | Libraries | Libraries pane after "m" fixed the problem.
We had a -lgcc in the Miscellaneous Linker Flags pane, which apparently caused libgcc.a to be linked BEFORE libm.a.
However please try the latest uboot is fully tested and works ok.
Regards
Hello,
Thank you for your reply.
I'm working with u-boot version lf_v2020.04.
I added my Makefile (board/freescale/mx6sabresd/Makefile) like below,