building arm gcc native-tool chain

Asked by vinay hunachyal

Im building native tool chain using gcc source code gcc-4.7 version. i downloaded GMP. MPFR, MPC, PPL, BINUTILS, GCC source code . I configured GMP, MPC, MPFR and PPL with following configuration
-$./configure --host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi --prefix=/home/vinay.hunachyal/GMP_arm
-$./configure --host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi --prefix=/home/vinay.hunachyal/MPFR_arm --with-gmp=/home/vinay.hunachyal/GMP_arm
./configure --host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi --prefix=/home/vinay.hunachyal/ppl_arm --with-mpfr=/home/vinay.hunachyal/GMP_arm

./configure --host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi --prefix=/home/vinay.hunachyal/ppl_arm --with-gmp=/home/vinay.hunachyal/GMP_arm
for all make & make install i did

after complete building of GMP,MPFR,MPC,PPL..
i configured gcc as following
configure --host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi --prefix=/home/vinay.hunachyal/ppl_arm --with-gmp=/home/vinay.hunachyal/GMP_arm --with-mpfr=/home/vinay.hunachyal/MPFR_arm --with-mpc=/home/vinay.hunachyal/MPC_arm --with-binutils=/home/vinay.hunachyal/BINutils_arm --with-ppl=/home/vinay.hunachyal/ppl_arm --enable-languages=c --with-gnu-as --with-gnu-ld --disable-multilib --with-float=soft --disable-sjlj-exceptions --disable-nls --enable-threads=posix --disable-libmudflap --disable-libssp --enable-long-longx --with-shared

its successfully configured . but while building im gettin error like this

configure: WARNING: decimal float is not supported for this target, ignored
checking whether fixed-point is supported... no
checking whether to use setjmp/longjmp exceptions... no
checking if the linker (/home/vinay.hunachyal/opt/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld) is GNU ld... yes
checking for thread model used by GCC... posix
checking whether assembler supports CFI directives... yes
checking for __attribute__((visibility("hidden")))... yes
checking whether the target assembler supports thread-local storage... yes
checking whether the thread-local storage support is from emutls... no
configure: updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: linking ../../../gcc-4.7.0/libgcc/enable-execute-stack-empty.c to enable-execute-stack.c
config.status: linking ../../../gcc-4.7.0/libgcc/config/arm/unwind-arm.h to unwind.h
config.status: linking ../../../gcc-4.7.0/libgcc/config/no-unwind.h to md-unwind-support.h
config.status: linking ../../../gcc-4.7.0/libgcc/config/arm/sfp-machine.h to sfp-machine.h
config.status: linking ../../../gcc-4.7.0/libgcc/gthr-posix.h to gthr-default.h
config.status: executing default commands
make[2]: Entering directory `/home/vinay.hunachyal/Downloads/SRCDIR/gcc_new/arm-none-linux-gnueabi/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
DEFINES='' HEADERS='../../../gcc-4.7.0/libgcc/config/arm/bpabi-lib.h' \
  ../../../gcc-4.7.0/libgcc/mkheader.sh > tmp-libgcc_tm.h
/bin/bash ../../../gcc-4.7.0/libgcc/../move-if-change tmp-libgcc_tm.h libgcc_tm.h
echo timestamp > libgcc_tm.stamp
arm-none-linux-gnueabi-gcc -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -fno-inline -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fPIC -fno-inline -I. -I. -I../.././gcc -I../../../gcc-4.7.0/libgcc -I../../../gcc-4.7.0/libgcc/. -I../../../gcc-4.7.0/libgcc/../gcc -I../../../gcc-4.7.0/libgcc/../include -DHAVE_CC_TLS -o _thumb1_case_sqi_s.o -MT _thumb1_case_sqi_s.o -MD -MP -MF _thumb1_case_sqi_s.dep -DSHARED -DL_thumb1_case_sqi -xassembler-with-cpp -c ../../../gcc-4.7.0/libgcc/config/arm/lib1funcs.S
cc1: error: unrecognized command line option "-fbuilding-libgcc"
make[2]: *** [_thumb1_case_sqi_s.o] Error 1
make[2]: Leaving directory `/home/vinay.hunachyal/Downloads/SRCDIR/gcc_new/arm-none-linux-gnueabi/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/home/vinay.hunachyal/Downloads/SRCDIR/gcc_new'
make: *** [all] Error 2

 unrecognized command line option "-fbuilding-libgcc"..... this error im getting

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Terry Guo
Solved:
Last query:
Last reply:
Revision history for this message
Terry Guo (terry.guo) said :
#1

Hi Vinay,

I haven't got chance to try your build process. But just from your configuration options, I can tell you are doing something beyond the scope of this tool chain. This tool chain and its sources target for arm-none-eabi, not the arm-none-linux-gnueabi. It means source packages should be configured with "--target=arm-none-eabi", not the "--target=arm-none-linux-gnueabi". There are a lot of differences between those two targets. For example the first one will use Newlib as c library and the later one will use glibc as c library. If you intends to build a tool chain for arm-none-linux-gnueabi, recommend you to try out Linaro tool chain which is at https://wiki.linaro.org/WorkingGroups/ToolChain.

Revision history for this message
vinay hunachyal (vinayhunachyal) said :
#2

Hi Terry guo,
i tried Crosstool_ng for building arm-native-tools,but the problem is that it support only cross and canadian building option but not for native.
so is there any tools to build arm native GCC tool chain or can u guide me how can i build arm-Gcc-native-tools

Revision history for this message
Terry Guo (terry.guo) said :
#3

Hi Vinay,

The last time I worked on Crosstool_ng is months ago. So my knowledge on it is very limited. So can you please explain "arm-native-tool" or "arm-gcc-native-tools" in more detailed way? I think you are trying to build a GNU tool chain. What's your target? What's your host? And what's your build environment?
For example the target of our tool chain is arm-none-eabi, the host is i686-pc-linux and the build is also i686-pc-linux.

Revision history for this message
vinay hunachyal (vinayhunachyal) said :
#4

I need a tool chain that runs on qemu arm architecture , so im trying to build arm gcc tool which compile the code in qemu arm and execute in qemu without cross-compiling outside.. here arm native tool means binaries of gcc must run in arm architecture .so here my host is arm-none-linux-gnueabi ( arm) , build is i686-pc-linux ( x86_64 ) and my target is arm-none-linux-gnueabi ( arm.) . so my requirement is when i emulate arm zImage in qemu with my rootfile system , then i need to compile my program and then execute it

Revision history for this message
Best Terry Guo (terry.guo) said :
#5

Thank you, vinay. Now I got your idea but bad news is that we are not the right guys to answer your question. The build process for your target is vastly different from the one for our target. In fact our build process is quite simpler than yours. Additionally we don't want to give answers that we haven't tried and verified. Maybe you should seek help from Crosstool_ng or Linaro.

Revision history for this message
vinay hunachyal (vinayhunachyal) said :
#6

Thank you for your suggestion, may i know your build process for tool chain so that it may help me something .

Revision history for this message
Terry Guo (terry.guo) said :
#7

Our build process is comprised of three shell scripts in the source package gcc-arm-none-eabi-4_7-2012q4-20121208-src.tar.bz2. We also have manual in pdf file named how-to-build-toolchain.pdf. You can download them from this website.

Revision history for this message
vinay hunachyal (vinayhunachyal) said :
#8

Thanks Terry Guo, that solved my question.