https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109121
Bug ID: 109121
Summary: m68k/coldfire: multilib: arithmetic functions missing
Product: gcc
Version: 12.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcc
Assignee: unassigned at gcc dot gnu.org
Reporter: angelo70 at gmail dot com
Target Milestone: ---
Hi all,
i am using the following toolchain, from kernel.org, to build
the whole range of coldfire-based boards in u-boot.
/opt/toolchains/m68k/gcc-12.2.0-nolibc/m68k-linux/bin/m68k-linux-gcc -v
Using built-in specs.
COLLECT_GCC=/opt/toolchains/m68k/gcc-12.2.0-nolibc/m68k-linux/bin/m68k-linux-gcc
COLLECT_LTO_WRAPPER=/opt/toolchains/m68k/gcc-12.2.0-nolibc/m68k-linux/bin/../libexec/gcc/m68k-linux/12.2.0/lto-wrapper
Target: m68k-linux
Configured with: /home/arnd/git/gcc/configure --target=m68k-linux
--enable-targets=all
--prefix=/home/arnd/cross/x86_64/gcc-12.2.0-nolibc/m68k-linux
--enable-languages=c --without-headers --disable-bootstrap --disable-nls
--disable-threads --disable-shared --disable-libmudflap --disable-libssp
--disable-libgomp --disable-decimal-float --disable-libquadmath
--disable-libatomic --disable-libcc1 --disable-libmpx --enable-checking=release
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 12.2.0 (GCC)
m68k: + M5253DEMO
+m68k-linux-ld.bfd: board/freescale/m5253demo/flash.o: in function
`flash_print_info':
+board/freescale/m5253demo/flash.c:107: undefined reference to `__fixsfsi'
+m68k-linux-ld.bfd: arch/m68k/lib/mulsf3.o: in function `__mulsf3':
+arch/m68k/lib/mulsf3.c:5: undefined reference to `__extendsfdf2'
+m68k-linux-ld.bfd: arch/m68k/lib/mulsf3.c:5: undefined reference to
`__mulXf3__'
+make[1]: *** [Makefile:1754: u-boot] Error 1
+make: *** [Makefile:177: sub-make] Error 2
m68k: + M5249EVB
+m68k-linux-ld.bfd: m68k:isa-a:mac architecture of input file
`arch/m68k/lib/ashldi3.o' is incompatible with m68k:isa-a:emac output
+m68k-linux-ld.bfd: m68k:isa-a:mac architecture of input file
`arch/m68k/lib/lshrdi3.o' is incompatible with m68k:isa-a:emac output
+m68k-linux-ld.bfd: m68k:isa-a:mac architecture of input file
`arch/m68k/lib/muldi3.o' is incompatible with m68k:isa-a:emac output
+make[1]: *** [Makefile:1754: u-boot] Error 1
+make: *** [Makefile:177: sub-make] Error 2
m68k: + amcore
+m68k-linux-ld.bfd: m68k:isa-aplus:emac architecture of input file
`arch/m68k/lib/ashldi3.o' is incompatible with m68k:isa-a:mac output
+m68k-linux-ld.bfd: m68k:isa-aplus:emac architecture of input file
`arch/m68k/lib/lshrdi3.o' is incompatible with m68k:isa-a:mac output
+m68k-linux-ld.bfd: m68k:isa-aplus:emac architecture of input file
`arch/m68k/lib/muldi3.o' is incompatible with m68k:isa-a:mac output
+make[1]: *** [Makefile:1754: u-boot] Error 1
+make: *** [Makefile:177: sub-make] Error 2
Also tested same version built here, enabling multilib:
/opt/toolchains/m68k/m68k-kernelspace-elf/bin/m68k-kernelspace-elf-gcc -v
Using built-in specs.
COLLECT_GCC=/opt/toolchains/m68k/m68k-kernelspace-elf/bin/m68k-kernelspace-elf-gcc
COLLECT_LTO_WRAPPER=/opt/toolchains/m68k/m68k-kernelspace-elf/bin/../libexec/gcc/m68k-kernelspace-elf/12.2.0/lto-wrapper
Target: m68k-kernelspace-elf
Configured with:
/home/angelo/dev-kernelspace/crosstool-ng/.build/m68k-kernelspace-elf/src/gcc/configure
--build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu
--target=m68k-kernelspace-elf
--prefix=/home/angelo/dev-kernelspace/crosstool-ng/x-tools/m68k-kernelspace-elf
--exec_prefix=/home/angelo/dev-kernelspace/crosstool-ng/x-tools/m68k-kernelspace-elf
--with-local-prefix=/home/angelo/dev-kernelspace/crosstool-ng/x-tools/m68k-kernelspace-elf/m68k-kernelspace-elf
--with-headers=/home/angelo/dev-kernelspace/crosstool-ng/x-tools/m68k-kernelspace-elf/m68k-kernelspace-elf/include
--with-newlib --enable-threads=no --disable-shared
--with-pkgversion='crosstool-NG 1.25.0.131_ee5a402_dirty' --enable-__cxa_atexit
--disable-libgomp --disable-libmudflap --disable-libmpx --disable-libssp
--disable-libquadmath --disable-libquadmath-support --disable-libstdcxx-verbose
--with-gmp=/home/angelo/dev-kernelspace/crosstool-ng/.build/m68k-kernelspace-elf/buildtools
--with-mpfr=/home/angelo/dev-kernelspace/crosstool-ng/.build/m68k-kernelspace-elf/buildtools
--with-mpc=/home/angelo/dev-kernelspace/crosstool-ng/.build/m68k-kernelspace-elf/buildtools
--with-isl=/home/angelo/dev-kernelspace/crosstool-ng/.build/m68k-kernelspace-elf/buildtools
--disable-lto --enable-default-pie --enable-target-optspace --disable-nls
--enable-multiarch --with-multilib-list=5253,5329,5373 --enable-languages=c
--disable-shared
Thread model: single
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (crosstool-NG 1.25.0.131_ee5a402_dirty)
Still getting some
mcf54415
+m68k-kernelspace-elf-ld.bfd: m68k:isa-a:mac architecture of input file
`arch/m68k/lib/ashldi3.o' is incompatible with m68k:isa-c:emac output
+m68k-kernelspace-elf-ld.bfd: m68k:isa-a:mac architecture of input file
`arch/m68k/lib/lshrdi3.o' is incompatible with m68k:isa-c:emac output
+m68k-kernelspace-elf-ld.bfd: m68k:isa-a:mac architecture of input file
`arch/m68k/lib/muldi3.o' is incompatible with m68k:isa-c:emac output
+make[1]: *** [Makefile:1754: u-boot] Error 1
and
M5253DEMO
+m68k-kernelspace-elf-ld.bfd: board/freescale/m5253demo/flash.o: in function
`flash_print_info':
+board/freescale/m5253demo/flash.c:107: undefined reference to `__fixsfsi'
+m68k-kernelspace-elf-ld.bfd: arch/m68k/lib/mulsf3.o: in function `__mulsf3':
+arch/m68k/lib/mulsf3.c:5: undefined reference to `__extendsfdf2'
+m68k-kernelspace-elf-ld.bfd: arch/m68k/lib/mulsf3.c:5: undefined reference to
`__mulXf3__'
+make[1]: *** [Makefile:1754: u-boot] Error 1
+make: *** [Makefile:177: sub-make] Error 2
I think in the past, in older gcc versions, likely 5.2, the build was not
failing, so seems such arithmetic functions has been removed.
Please let me know if i can help on this, or if there is any workaround.
Regards,
angelo