On Monday, 27 April 2015 at 05:19:52 UTC, Timo Sintonen wrote:


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.


Given the other replies in this thread, this looks promising. However, I went to give it a test today, and found out my host PC's distribution (Arch Linux) hasn't yet released GCC 5.1; it's still in testing.

So, I'm going to refrain from testing until the Arch Linux package gets officially released. My current builds don't use startup files, libgcc, or any of the other toolchain libs, and I only using Cortex-M4F cores, so I'm not sure if my tests will prove much of anything, other than successful compilation.

Nevertheless, when GCC 5.1 is official released for my distribution, I'll give it a test (if it's not too late by then).

If you suspect it might work for GCC 4.9.2, I'll give it a try.

Mike

Reply via email to