Mail Archives: djgpp/2005/07/04/14:15:29
kishore taid <k_taid AT yahoo DOT com> wrote:
> i have been trying to build a dos->linux cross-compiler for the past few days. As a reference, i am following the article:
> Linux x86 Host Cross Compiler HOWTO for the DJGPP Target Revised by
> Charles Wilkins Nov 14 2002
> .....which is present in the how to repository of the djgpp homepage.
You are aware of that that howto is about making a cross-compiler that
compiles to DJGPP, while you're trying to make a cross-compiler that
compiles in DOS to Linux?
> the files i am using are the following:
> binutils-2.16.tar.gz, djcrx203.zip, gcc400s2.zip, gcc-4.00.tar.gz
> i have been able to build the binutils, however, the gcc-build gets stuck at an 'undefined reference' to a function called "_fixpath()".
> I came to know that _fixpath() is a library function of libc for
> djgpp. So I tried putting the library libc.a into some directiry and
> making a small change in the corresponding makefile
> (packages/cross/gnu/gcc-4.00-obj/gcc/Makefile) - the one which
> generates this error - so that it explicitly reads the libc.a in the
> gcc command. This can be seen below as the last argument of the gcc
> command. However, inspite of this i am getting the "undefined
> reference" error.
>
>
> make[1]: Entering directory `/home/sriram/kishore/packages/cross/gnu/gcc-4.00-ob
> j/gcc'
> gcc -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototy
> pes -Wmissing-prototypes -DHAVE_CONFIG_H -o cc1.exe \
> c-parse.o c-lang.o stub-objc.o attribs.o c-errors.o c-lex.o c-pragma.o c
> -decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-sem
> antics.o c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o c-objc-co
> mmon.o c-dump.o c-pch.o c-gimplify.o tree-mudflap.o c-pretty-print.o main.o li
> bbackend.a ../libcpp/libcpp.a ../libcpp/libcpp.a ../libiberty/libiberty.a ../l
> ibiberty/libc.a
> prefix.o(.text+0x2f0): In function `update_path':
> ./../gcc-4.00/gcc/prefix.c:346: undefined reference to `_fixpath'
> collect2: ld returned 1 exit status
> make[1]: *** [cc1.exe] Error 1
> make[1]: Leaving directory `/home/sriram/kishore/packages/cross/gnu/gcc-4.00-obj
> /gcc'
> make: *** [all-gcc] Error 2
Alas I'm not very experienced in making cross-compilers and I might be
totally wrong, but libc.a in libiberty/ is strange. Shouldn't it be in
target/lib or something.
Here are some suggestions that might help (or not):
You could try starting with the pristine .tar.gz gcc source.
You could try following another (not so DJGPP specific) HOWTO/FAQ for
cross-compilers.
You could try another gcc version.
Right,
MartinS
- Raw text -