2.9.2010 9:28, Andriy Sukhynyuk kirjoitti:
Still I cannot figure out how to add Cortex-M0 support with multilib enabled. By
default libraries for armv6-m are not built. I have to include interworking
support as well.
Isn't there a ARM CPU type for which the Cortex-M0 is a 'subset'. One
which understands both the ARM and Thumb codes and the Thumb one would
be identical with the one made for Cortex-M0 ? If there is, then using
its name in the '--with-cpu=' and using '--with-mode=thumb' and
'--enable-multilib' (default, leaving '--disable-multilib' away would
be the same) could be the solution
It looks like to build GCC with multilib enabled, one has to edit
\gcc-4.5.0\gcc\config\arm\t-arm-elf file.
Maybe...
Well I spent yesterday and could not find how to do it. It all ends up in error
trying to compile test file with -march=armv6-m but without -mthumb.
Please describe 'compile'... Producing the assembly source and even
the object file should succeed but linking the object with a Thumb-only
C library of course would lead into troubles. Tests with my similar
GCC on Linux built by pure curiosity :
[root@localhost tprintf]# gcc-arm-eabi-4.5 -v
Reading specs from /usr/local/lib/gcc/arm-eabi/4.5.1/specs
COLLECT_GCC=gcc-arm-eabi-4.5
Target: arm-eabi
Configured with: ../configure --build=i686-linux-gnu
--host=i686-linux-gnu --target=arm-eabi --enable-languages=c,c++
--with-newlib --disable-shared --enable-newlib --disable-multilib
--disable-interwork --disable-threads --disable-nls
--enable-libstdcxx-allocator=malloc
--with-gxx-include-dir=/usr/local/include/c++/4.5.1 --with-dwarf2
--enable-version-specific-runtime-libs --with-cpu=cortex-m0
--with-mode=thumb --with-pkgversion='by Kai Ruottu 2010q3'
Thread model: single
gcc version 4.5.1 (by Kai Ruottu 2010q3)
told that there were no problems in normal "compiles" :
[root@localhost tprintf]# gcc-arm-eabi-4.5 -Os -S -o tst_arm-eabi.s
tprintf.c
[root@localhost tprintf]# gcc-arm-eabi-4.5 -march=armv6-m -Os -S -o
tst_arm-eabi.s tprintf.c
[root@localhost tprintf]# gcc-arm-eabi-4.5 -Os -c -o tst_arm-eabi.o
tprintf.c [root@localhost tprintf]# gcc-arm-eabi-4.5 -march=armv6-m
-Os -c -o tst_arm-eabi.o tprintf.c
I didn't build newlib, only binutils and GCC (with its extra libraries),
using the generic newlib-1.18.0 headers preinstalled during the build
of course...
Is it possible to build multilib in one step or I should perform many builds and
later copy libraries to appropritae folders?
Doing it in one step should succeed...