This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
updated question : Three questions when building newlib with arm-none-eabi toolchain
- From: Can Finner <can dot finner at gmail dot com>
- To: newlib at sourceware dot org
- Date: Wed, 30 Mar 2011 18:28:57 +0800
- Subject: updated question : Three questions when building newlib with arm-none-eabi toolchain
Hi, I previously sent this message but got no suggestion. in the past
days I got a little progress and try to present the question again
now.
in file ./libgloss/config/default.mh, it says that the multilib option
is passed in $(CFLAGS).
targets like m68k seem to use
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES)
<target-specific-defines> -o $@ -c
to compile target libraries and crt0s.
the problem is that the counterpart Makefile rules in arm target as
following does not use $(CFLAGS).
$(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
This results in target libraries like librdimon.a are built without
multilib option, which are useless.
So any tips? Thanks.
--
Regards.
---------- Forwarded message ----------
From: Can Finner <can.finner@gmail.com>
Date: Fri, Mar 25, 2011 at 2:09 PM
Subject: Three questions when building newlib with arm-none-eabi toolchain
To: newlib@sourceware.org
Hi all,
I am now trying to build newlib 1.18.0 with arm-none-eabi
toolchain(enable multilib), having three questions during building
process.
1,
In file ./newlib-1.18.0/libgloss/arm/Makefile.in
there are Makefile rules like:
rdimon-syscalls.o: syscalls.c
??? $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
the question is the multilib options(like "-mthumb -march=armv7
-mfix-cortex-m3-ldrd") are passed in $(CFLAGS)
which is not used in this rule. This results in all multilib
librdimon.a are same, built with default multilib options.
2, when configuring newlib with following commands
newlib-1.18.0/configure --build=i686-linux-gnu --target=arm-none-eabi
--prefix=/opt/arm --host=i686-pc-linux --enable-newlib-io-long-long
--enable-newlib-register-fini --disable-nls
--disable-newlib-supplied-syscalls
there are errors when building crt0.S for armv6-m version multilib like:
arm-none-eabi-gcc ...... ?? -g -O2 ...... -g -O2? -mthumb
-march=armv6-m -c ....../newlib-1.18.0/libgloss/arm/crt0.S
......./newlib-1.18.0/libgloss/arm/crt0.S: Assembler messages:
......./newlib-1.18.0/libgloss/arm/crt0.S:30: Error: selected
processor does not support ARM opcodes
......./newlib-1.18.0/libgloss/arm/crt0.S:83: Error: attempt to use an
ARM instruction on a Thumb-only processor -- `ldr r3,.Lstack'
Though the building process continues, I guess there are something wrong here.
3 when configuring newlib with following command
newlib-1.18.0/configure --build=i686-linux-gnu --target=arm-none-eabi
--prefix=/opt/arm --host=i686-pc-linux --enable-newlib-io-long-long
--enable-newlib-register-fini --disable-nls
There are errors complain about missing files, like
arm-none-eabi-ar: ../sys/lib.a: No such file or directory
arm-none-eabi-ranlib libc.a
rm -rf tmp
rm -f crt0.o
ln sys/crt0.o crt0.o >/dev/null 2>/dev/null || cp sys/crt0.o crt0.o
cp: cannot stat `sys/crt0.o': No such file or directory
So any ideas? Any tips will be appreciated. Many thanks.
--
Regards.