Failed to build C,C++ GNU GCC ToolChain for M68K (windows MSYS2)
with items:
GCC-14.1.0, NEWLIB-4.4.0, BINUTILS-2.42, GDB-14.2.
What fails is the compilation of GCC-14.1.0 giving error: implicit declaration of function ‘coshl’ (and more).
I can build the ToolChain successfully by replacing GCC-14.1.0 with GCC-13.3.0
This is the piece of script (part of my full GNU toolchain builder) that I use to compile GCC:
#----------------------------------
# Build GCC and NEWLIB together
#----------------------------------
mkdir gcc-newlib
(
cd gcc-newlib
#--------------
echo "Configuring gcc and newlib (for details see build/gcc-newlib-configure.log)"
../../source/${GCC}/configure
--build=${BUILD_MACH}
--host=${HOST_MACH}
--target=${TARGET}
--prefix=${PREFIX}
--enable-languages=c,c++
--with-arch=m68k
--with-newlib
--with-headers=${SRCDIR}/source/gcc-14.1.0/newlib/libc/include
--with-gnu-as
--with-gnu-ld
--with-gmp
--with-mpfr
--with-mpc
--without-long-double-128
--disable-werror
--disable-decimal-float
--disable-libffi
--disable-libgomp
--disable-libmudflap
--disable-libphobos
--disable-libquadmath
--disable-libssp
--disable-libstdcxx-pch
--disable-multilib
--disable-nls
--disable-shared
--disable-threads
--disable-tls
--with-pkgversion='M68K GNU GCC ToolChain-${RELISE}'
> ../gcc-newlib-configure.log 2>&1
#-------------
echo "Building gcc and newlib (for details see build/gcc-newlib-make.log)"
make -j $JOBCOUNT > ../gcc-newlib-make.log 2>&1
#-------------
echo "Installing gcc and newlib (for details see build/gcc-newlib-install.log)"
make install > ../gcc-newlib-install.log 2>&1
#-------------
echo "done"
)
And this is the failure
CC libm/complex/libm_a-cargf.o
CC libm/complex/libm_a-catanhf.o
CC libm/complex/libm_a-cexpf.o
CC libm/complex/libm_a-cpowf.o
CC libm/complex/libm_a-csinhf.o
CC libm/complex/libm_a-cabsl.o
CC libm/complex/libm_a-creall.o
CC libm/complex/libm_a-cimagl.o
CC libm/complex/libm_a-ccoshl.o
../../../../source/gcc-14.1.0/newlib/libm/complex/ccoshl.c: In function 'ccoshl':
../../../../source/gcc-14.1.0/newlib/libm/complex/ccoshl.c:43:13: error: implicit declaration of function 'coshl'; did you mean 'coshf'? [-Wimplicit-function-declaration]
43 | w = coshl(x) * cosl(y) + (sinhl(x) * sinl(y)) * I;
| ^~~~~
| coshf
../../../../source/gcc-14.1.0/newlib/libm/complex/ccoshl.c:43:24: error: implicit declaration of function 'cosl'; did you mean 'cosf'? [-Wimplicit-function-declaration]
43 | w = coshl(x) * cosl(y) + (sinhl(x) * sinl(y)) * I;
| ^~~~
| cosf
../../../../source/gcc-14.1.0/newlib/libm/complex/ccoshl.c:43:35: error: implicit declaration of function 'sinhl'; did you mean 'sinhf'? [-Wimplicit-function-declaration]
43 | w = coshl(x) * cosl(y) + (sinhl(x) * sinl(y)) * I;
| ^~~~~
| sinhf
../../../../source/gcc-14.1.0/newlib/libm/complex/ccoshl.c:43:46: error: implicit declaration of function 'sinl'; did you mean 'sinf'? [-Wimplicit-function-declaration]
43 | w = coshl(x) * cosl(y) + (sinhl(x) * sinl(y)) * I;
| ^~~~
| sinf
make[3]: *** [Makefile:43137: libm/complex/libm_a-ccoshl.o] Error 1
make[3]: *** Waiting for unfinished jobs....
CC libm/complex/libm_a-cacoshl.o
make[3]: Leaving directory '/home/mario/gcc141_maker/build/gcc-newlib/m68k-elf/newlib'
make[2]: *** [Makefile:5304: all] Error 2
make[2]: Leaving directory '/home/mario/gcc141_maker/build/gcc-newlib/m68k-elf/newlib'
make[1]: *** [Makefile:13461: all-target-newlib] Error 2
make[1]: Leaving directory '/home/mario/gcc141_maker/build/gcc-newlib'
make: *** [Makefile:1069: all] Error 2
I suppose that the problem is related to the M68K because I can compile GCC-14.1.0 without problems for ARM and AVR while for M68K I can only compile GCC-13.3.0
Please, what a can do to solve??