delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/02/11/13:11:39

Date: Fri, 11 Feb 2000 19:48:41 +0200 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
To: crossgcc AT sourceware DOT cygnus DOT com
cc: djgpp-workers AT delorie DOT com
Subject: Problem cross-building native compiler for i586-pc-msdosdjgpp
Message-ID: <Pine.A41.4.05.10002111923240.46724-100000@ieva01.lanet.lv>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

I tried to build native compiler for DOS (i586-pc-msdosdjgpp) using
cross-compiling under Linux (i586-pc-linux-gnu) and found following
problem:

when I earlier built cross-compiler (gcc-2.95.2) from i586-pc-linux-gnu
to i586-pc-msdosdjgpp I'm not getting some functions (like _eprintf)
in libgcc.a as defining CROSS_COMPILE forces definition of inhibit_libc
that leaves some parts of libgcc.a out. As result I'm getting unresolved
references (_eprintf) when trying to build g77 with cross-compiler as
later uses assert macro (one from gcc sources, not DJGPP one).

Perhaps one will have the same problem with canadian-crosses also
(if one tries to build FORTRAN cross-compiler using cross-compiling, but
I'm not sure g77 is only affected part)

I see some possible workarounds:
  
   - providing possibility to avoid definition of inhibit_libc in
     libgcc2.c when CROSS_COMPILE is defined (currently one needs
     to figure out the problem and modify libgcc2.c)

   - avoiding to use assert from assert.h currently included with gcc
     sources or providing _eprintf() somewhere else in sources (as 
     it can be ommited from libgcc.a)

If some workaround for this problem is applied, all builds Ok (as far as
I have tested)

Andris


- Raw text -


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