On 26 April 2015 at 22:41, Jens Bauer via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > On Sunday, 26 April 2015 at 18:23:47 UTC, Martin Nowak wrote: >> >> On 04/26/2015 07:29 PM, Jens Bauer wrote: >>> >>> Unfortunately, I have not been able to build with multilib yet, so my >>> setup cannot build code for Cortex-M0; it keeps stuffing Cortex-M3 and >>> Cortex-M4 instructions in there. >> >> >> The wiki says to disable multilib >> >> (http://wiki.dlang.org/Bare_Metal_ARM_Cortex-M_GDC_Cross_Compiler#Build_GCC), >> what's the problem? > > > The problem is that I cannot have a single compiler, which compiles for > these architectures: > ARM7TDMI > Cortex-M0 > Cortex-M3 > Cortex-M4 > > Using a Cortex-M3 or Cortex-M4 compiler to build code for a Cortex-M0, will > insert 32-bit instructions randomly (most code is 16-bit, though, so parts > of it gets it right). As soon as the microcontroller tries to run a 32-bit > instruction, it will crash. > > -In order to build code for Cortex-M0 or Cortex-M0+, I will have to rebuild > the compiler. > The alternative is to build 5 different compilers. I don't want that either. > > ... > > The reason I cannot build GDC with multilib, is that I get a compile-error > when building the final GCC+GDC. > Building GCC alone without GDC gives me no such error. > -So if I want to have multilib support, I will have to be without GDC.
Where exactly does it error? I can't think of a sole reason why gdc/libphobos would throw an error in multilib builds, so it must be something collateral (libstdc++) ? Regards Iain.