This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Fwd: Crosscompilation for ARM fails (C compiler cannot create executables error)
- From: Francisco Cuesta <ndarkness at gmail dot com>
- To: gdb at sourceware dot org
- Date: Mon, 27 Jan 2014 22:31:49 +0100
- Subject: Fwd: Crosscompilation for ARM fails (C compiler cannot create executables error)
- Authentication-results: sourceware.org; auth=none
- References: <CANMvdA9DWYcVLSN=J7pc2cQG_5ibo1zNF-QFp5ABTdhD=K15cQ at mail dot gmail dot com>
Hello,
I am trying to cross-compile gdbserver 7.5 (not 7.6 since I was trying
to compile directly from scratch for my x86 and I got an pointer
casting error which aborted its compilation)for my target whose
architecture is ARM.
I have read the document
https://sourceware.org/gdb/wiki/BuildingCrossGDBandGDBserver , and I
have come across with the following script which fires the
crosscompilation options
#part for compiling just gdbserver
mkdir buil-gdbserver/
cd buil-gdbserver/
export CC="/home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc"
export CXX="/home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-g++"
export AR="/home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-ar"
CONFOPTS+="--target=arm-linux --host=arm-linux --build=i686-pc-linux-gnu "
~/gdb-7.5/configure ${CONFOPTS}
However when I run the script with make, I got
ubuntu:~/gdb-7.5/build-gdbserver$ ./gdbCompiler.sh
mkdir: cannot create directory `buil-gdbserver/': File exists
checking build system type... i686-pc-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking target system type... arm-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for arm-linux-gcc... /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc
checking for C compiler default output file name...
configure: error: in `/home/j/gdb-7.5/build-gdbserver/buil-gdbserver':
configure: error: C compiler cannot create executables
See `config.log' for more details.
Looking into the config.log,below, I can read in the highlight text
the fact that it isn't pointing at the correct gcc cros-compiler, but
I cannot understand why, if the path is the proper one...
What may it be happening?
Thanks in advance,
BEst regards
It was created by configure, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ /home/j/gdb-7.5/configure --target=arm-linux --host=arm-linux
--build=i686-pc-linux-gnu
## --------- ##
## Platform. ##
## --------- ##
hostname = ubuntu
uname -m = x86_64
uname -r = 3.8.0-29-generic
uname -s = Linux
uname -v = #42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/lib/lightdm/lightdm
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2237: checking build system type
configure:2251: result: i686-pc-linux-gnu
configure:2298: checking host system type
configure:2311: result: arm-unknown-linux-gnu
configure:2331: checking target system type
configure:2344: result: arm-unknown-linux-gnu
configure:2398: checking for a BSD-compatible install
configure:2466: result: /usr/bin/install -c
configure:2477: checking whether ln works
configure:2499: result: yes
configure:2503: checking whether ln -s works
configure:2507: result: yes
configure:2514: checking for a sed that does not truncate output
configure:2578: result: /bin/sed
configure:2587: checking for gawk
configure:2603: found /usr/bin/gawk
configure:2614: result: gawk
configure:3727: checking for arm-linux-gcc
configure:3754: result: /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc
configure:4023: checking for C compiler version
configure:4032: /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc --version >&5
/home/j/gdb-7.5/configure: line 4034:
/home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc: No such file or
directory
configure:4043: $? = 127
configure:4032: /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc -v >&5
/home/j/gdb-7.5/configure: line 4034:
/home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc: No such file or
directory
configure:4043: $? = 127
configure:4032: /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc -V >&5
/home/j/gdb-7.5/configure: line 4034:
/home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc: No such file or
directory
configure:4043: $? = 127
configure:4032: /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc -qversion >&5
/home/j/gdb-7.5/configure: line 4034:
/home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc: No such file or
directory
configure:4043: $? = 127
configure:4063: checking for C compiler default output file name
configure:4085: /home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc
conftest.c >&5
/home/j/gdb-7.5/configure: line 4087:
/home/j/SW3.2p1/bin/arm-mv5sft-linux-gnueabi-gcc: No such file or
directory
configure:4089: $? = 127
configure:4126: result:
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:4132: error: in `/home/j/gdb-7.5/build-gdbserver/buil-gdbserver':
configure:4136: error: C compiler cannot create executables
See `config.log' for more details.