On Sunday, 26 April 2015 at 18:23:47 UTC, Martin Nowak wrote:
The wiki says to disable multilib
(http://wiki.dlang.org/Bare_Metal_ARM_Cortex-M_GDC_Cross_Compiler#Build_GCC),
what's the problem? Maybe ask Iain/Johannes if it's GDC
specific.
I have also tried for years to build a working multilib without
success. Now I think I have been able to get all versions to
work. I welcome everyone to test and report if this works.
The build script:
../gcc/configure --disable-bootstrap \
--enable-languages=c,d --disable-nls --target=arm-eabi \
--without-headers --with-newlib --without-isl --without-cloog \
--disable-libphobos --disable-libstdcxx --disable-libbacktrace\
--enable-multilib
And I replace the whole gcc/config/arm/t-arm-elf with this:
MULTILIB_OPTIONS += mcpu=cortex-m0/mcpu=cortex-m3/mcpu=cortex-m4
mfloat-abi=hard mfpu=fpv4-sp-d16
MULTILIB_DIRNAMES += cortex-m0 cortex-m3 cortex-m4
MULTILIB_REQUIRED += mcpu=cortex-m0
MULTILIB_REQUIRED += mcpu=cortex-m3
MULTILIB_REQUIRED += mcpu=cortex-m4 #/mfloat-abi=hard
#/mfpu=fpv4-sp-d16
MULTILIB_EXTRA_OPTS += mthumb
This will build m0 and m3 with soft float and m4 with hard float.
I have used gdc head + gcc 6 head from about a week ago. It may
be possible this will work with gcc 5.1 release + gdc 5 and I
hope somebody will test this.
Please note: This is the first time ever I have suceeded. This
will not work with any gcc before april. An older gcc will not
build m4 or it may even not pass configuring.
So please test and report.
What libc are you using? The gcc-arm-embedded project uses
newlib and
newlib-nano. https://launchpad.net/gcc-arm-embedded
I have used standard newlib from sources. There were some
discussions that libc should not be needed any more to build the
compiler. I can not test this because I do not have a totally
clean environment right now. So if anybody could advice me or
just test if it is currently possible to build without libc.