delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2005/07/05/01:01:53

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
s=s1024; d=yahoo.com;
h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding;
b=ysqXxIQ8Rl8MPc8nBsTxhFbL/e2IxEF6cI98h6MJhCZbcy8WXVRQuWBxUeODV33upb4EhY361UgReVazRxBQrEZzt/nt0r+ZUSBssAkIpcrkxFQNzbaq86x0rw5zdZUTBpG3nLfHi/g+QpZhMmROO7xi9uPyA7xLbVkKMBj5xzE= ;
Message-ID: <20050705050012.20384.qmail@web33305.mail.mud.yahoo.com>
Date: Mon, 4 Jul 2005 22:00:12 -0700 (PDT)
From: kishore taid <k_taid AT yahoo DOT com>
Subject: Re: linking problems while building dos->linux cross-compiler
To: djgpp AT delorie DOT com
In-Reply-To: <42c979be$0$172$cc7c7865@news.luth.se>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

--0-873732684-1120539612=:17499
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

 
thank you martin, for your suggestion. yes, i am fully aware that the referred article is for linux->djgpp cross-compiler. What i was trying to do was to follow it and do the same for a djgpp->linux cross-compiler. I also referred to one ibm article on cross-compilers and feel the procedures to be quite similar. Upto what I have been able know, we can probably do it by specifying the target and the host system while running the configure script, which then generates the required makefiles.

As for the libc.a, actually yes, it is strange......because it was put by me in libiberty to ensure that it is read by the linker as it was unable to find a reference to _fixpath(). And I am using the .tar.gz gcc source from the gnu site only.
 
kishore
 
Martin Str|mberg <ams AT speedy DOT ludd DOT ltu DOT se> wrote:
kishore taid 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


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
--0-873732684-1120539612=:17499
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<DIV>&nbsp;</DIV>
<DIV>thank you martin, for your suggestion. yes, i am fully aware that the referred article is for linux-&gt;djgpp cross-compiler. What i was trying to do was to follow it and do the same for a&nbsp;djgpp-&gt;linux cross-compiler. I also referred to one ibm article on cross-compilers and feel the procedures to be quite similar. Upto what I have been able know, we can probably do it by specifying the target and the host system while running the&nbsp;configure script, which then generates the required makefiles.<BR></DIV>
<DIV>As for the libc.a, actually yes, it is strange......because it was put by me in&nbsp;libiberty to ensure that it is read by the linker as it was unable to find a reference to&nbsp;_fixpath().&nbsp;And I am using the .tar.gz gcc source from the gnu site only.</DIV>
<DIV>&nbsp;</DIV>
<DIV>kishore</DIV>
<DIV>&nbsp;</DIV>
<DIV><B><I>Martin Str|mberg &lt;ams AT speedy DOT ludd DOT ltu DOT se&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">kishore taid <K_TAID AT YAHOO DOT COM>wrote:<BR>&gt; i have been trying to build a dos-&gt;linux cross-compiler for the past few days. As a reference, i am following the article:<BR><BR>&gt; Linux x86 Host Cross Compiler HOWTO for the DJGPP Target Revised by<BR>&gt; Charles Wilkins Nov 14 2002 <BR>&gt; .....which is present in the how to repository of the djgpp homepage.<BR><BR>You are aware of that that howto is about making a cross-compiler that<BR>compiles to DJGPP, while you're trying to make a cross-compiler that<BR>compiles in DOS to Linux?<BR><BR>&gt; the files i am using are the following:<BR><BR>&gt; binutils-2.16.tar.gz, djcrx203.zip, gcc400s2.zip, gcc-4.00.tar.gz<BR><BR>&gt; i have been able to build the binutils, however, the gcc-build gets stuck at an 'undefined reference' to a function called "_fixpath()". <BR>&gt; I came to know that _fixpath() is a library function of libc
 for<BR>&gt; djgpp. So I tried putting the library libc.a into some directiry and<BR>&gt; making a small change in the corresponding makefile<BR>&gt; (packages/cross/gnu/gcc-4.00-obj/gcc/Makefile) - the one which<BR>&gt; generates this error - so that it explicitly reads the libc.a in the<BR>&gt; gcc command. This can be seen below as the last argument of the gcc<BR>&gt; command. However, inspite of this i am getting the "undefined<BR>&gt; reference" error.<BR><BR>&gt; <BR>&gt; <BR>&gt; make[1]: Entering directory `/home/sriram/kishore/packages/cross/gnu/gcc-4.00-ob<BR>&gt; j/gcc'<BR>&gt; gcc -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototy<BR>&gt; pes -Wmissing-prototypes -DHAVE_CONFIG_H -o cc1.exe \<BR>&gt; c-parse.o c-lang.o stub-objc.o attribs.o c-errors.o c-lex.o c-pragma.o c<BR>&gt; -decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-sem<BR>&gt; antics.o c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o
 c-objc-co<BR>&gt; mmon.o c-dump.o c-pch.o c-gimplify.o tree-mudflap.o c-pretty-print.o main.o li<BR>&gt; bbackend.a ../libcpp/libcpp.a ../libcpp/libcpp.a ../libiberty/libiberty.a ../l<BR>&gt; ibiberty/libc.a<BR>&gt; prefix.o(.text+0x2f0): In function `update_path':<BR>&gt; ./../gcc-4.00/gcc/prefix.c:346: undefined reference to `_fixpath'<BR>&gt; collect2: ld returned 1 exit status<BR>&gt; make[1]: *** [cc1.exe] Error 1<BR>&gt; make[1]: Leaving directory `/home/sriram/kishore/packages/cross/gnu/gcc-4.00-obj<BR>&gt; /gcc'<BR>&gt; make: *** [all-gcc] Error 2<BR><BR>Alas I'm not very experienced in making cross-compilers and I might be<BR>totally wrong, but libc.a in libiberty/ is strange. Shouldn't it be in<BR>target/lib or something.<BR><BR><BR>Here are some suggestions that might help (or not):<BR><BR>You could try starting with the pristine .tar.gz gcc source.<BR><BR>You could try following another (not so DJGPP specific) HOWTO/FAQ for<BR>cross-compilers.<BR><BR>You could try
 another gcc version.<BR><BR><BR>Right,<BR><BR>MartinS<BR><BR></BLOCKQUOTE><p>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com 
--0-873732684-1120539612=:17499--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019