Can't build arm-elf cross compiler
hiroyuki matsumoto
h.matsumoto@topcon.co.jp
Wed Oct 31 02:47:00 GMT 2001
Hello,
I constructed the cross compiler for arm-elf on Cygwin,
referring to "Getting Started with GNU" by William Gatliff.
But, I have not succeeded in construction yet.
Then, I have some questions.Please answer.
<Environment>
Cygwin : 1.3.2
GCC : gcc-core-3.0.1
gcc-g++-3.0.1
BINUTILS : binutils-2.11.2
NEWLIB : newlib-1.9.0
HOST : Windows98 machine (i586-pc-cygwin)
TARGET : ARM7(arm-elf)
<Construction>
STEP1
PATH was set in the file of "Cygwin.bat" as follows.
...
SET PATH=/tools/arm-elf/bin:$PATH
SET PATH=/bin
...
and, after "Cygwin" had been started, typing later.
$ export PATH=$PATH:/tools/arm-elf/bin
STEP2
$ ../binutils-2.10.1/configure --target=arm-elf \
--prefix=/tools 2>&1 | tee configure.log
$ make all install 2>&1 | tee make.log
These succeeded.
STEP3
$ cd /src/gcc-3.0.1
$ ln -s /src/newlib-1.9.0/newlib
Is this link necessary?
Is "libgloss" also necessary?
Or, is neither necessary?
STEP4
Before executing "gcc-configure", I added the definition to
"/src/gcc-3.0.1/gcc/config/arm elf.h" as follows.
Because not call "main()".
Add:
#define HAS_INIT_SECTION
to beginning of elf.h file.
Is this correct?
Or,do not change it?
STEP5
$ ../gcc-3.0.1/configure --target=arm-elf --prefix=/tools \
--without-headers --with-newlib 2>&1 | tee
configure.log
This succeeded.
STEP6
Before executing "gcc-make", I changed "tmp/build/gcc/gcc makefile" as
follows.
change from:
# Additional target-dependent options for compiling libgcc2.a.
TARGET_LIBGCC2_CFLAGS =
to:
# Additional target-dependent options for compiling libgcc2.a.
TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc
Is this correct?
Or,do not change it?
STEP7
$ make all-gcc install-gcc 2>&1 | tee make.log
The following errors occur at "gcc-make".
"arm-elf-ar:not found"
Then, the error was compulsorily excluded by setting PATH
of the directory with "arm-elf-ar".
$ export PATH=$PATH:/tools/bin
The error occurs in my PC if "gcc-make" is executed at once after
"gcc-configure".
Therefore, my PC has been reactivated before "gcc-make" is done.
For this, is not "arm-elf-ar" found?
And, how should deal?
STEP8
$ ../newlib-1.9.0/configure --target=arm-elf --prefix=/tools \
2>&1 | tee configure.log
$ make all install 2>&1 | tee make.log
These succeeded.
STEP9
$ ../gcc-3.0.1/configure --target=arm-elf --prefix=/tools \
2>&1 | tee configure.log
$ make all install 2>&1 | tee make.log
It is the same as the result of "STEP7".
<Execution>
When compiling by the compiler made according to procedure above,
the following errors occur.
libgcc.a(unwind-dw2-fde.o) : In function `size_of_encoded_value':
unwind-dw2-fde.o(.text+0x5c) : undefined reference to `abort'
libgcc.a(unwind-dw2-fde.o) : In function `read_encoded_value_with_base':
unwind-dw2-fde.o(.text+0x1d8) : undefined reference to `abort'
libgcc.a(unwind-dw2-fde.o) : In function `__register_frame':
unwind-dw2-fde.o(.text+0x274) : undefined reference to `malloc'
libgcc.a(unwind-dw2-fde.o) : In function `__register_frame_table':
unwind-dw2-fde.o(.text+0x32c) : undefined reference to `malloc'
libgcc.a(unwind-dw2-fde.o) : In function `__deregister_frame_info_bases':
unwind-dw2-fde.o(.text+0x3e4) : undefined reference to `free'
unwind-dw2-fde.o(.text+0x41c) : undefined reference to `abort'
unwind-dw2-fde.o(.text+0x41c) : undefined reference to `abort'
libgcc.a(unwind-dw2-fde.o) : In function `__deregister_frame':
unwind-dw2-fde.o(.text+0x450) : undefined reference to `free'
libgcc.a(unwind-dw2-fde.o) : In function `base_from_object':
unwind-dw2-fde.o(.text+0x4b4) : undefined reference to `abort'
libgcc.a(unwind-dw2-fde.o) : In function `get_cie_encoding':
unwind-dw2-fde.o(.text+0x4e8) : undefined reference to `strlen'
libgcc.a(unwind-dw2-fde.o) : In function `start_fde_sort':
unwind-dw2-fde.o(.text+0x1274): undefined reference to `malloc'
unwind-dw2-fde.o(.text+0x1298): undefined reference to `malloc'
libgcc.a(unwind-dw2-fde.o) : In function `end_fde_sort':
unwind-dw2-fde.o(.text+0x1350): undefined reference to `free'
unwind-dw2-fde.o(.text+0x138c): undefined reference to `abort'
unwind-dw2-fde.o(.text+0x1390): undefined reference to `abort'
Please answer.
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list