delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/13/06:34:29

Date: Mon, 13 Apr 1998 13:32:52 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Paul Derbyshire <pderbysh AT usa DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: Inconsistent gcc and gxx behavior
In-Reply-To: <QoiY.2496$Ni2.1596543@news21.bellglobal.com>
Message-ID: <Pine.SUN.3.91.980413131842.6982B-100000@is>
MIME-Version: 1.0

On Mon, 13 Apr 1998, Paul Derbyshire wrote:

> Using builtin specs.
  ^^^^^^^^^^^^^^^^^^^
I think this is a symptom of your problem.  Does gcc print this line as 
well?  Or does it say "Using specs from c:/djgpp/lib\specs"?

> gcc version pgcc-2.90.23 980102 (egcs-1.0.1 release)
>  ld -o datetest.exe crt0.o datetest.o ofcdate.o ofcser.o
                      ^^^^^^
This is another telltale sign of a problem: crt0.o should be mentioned 
with its full pathname, in your case c:/djgpp/lib\crt0.o.

> crt0.o is in C:\DJGPP\Lib right where the linker expects it to be....and where
> it finds it, if I compile with gcc instead of gxx.

The linker doesn't expect crt0.o to be anywhere.  For the linker, crt0.o 
is just another object file, so it needs to see its full pathname, 
otherwise it will look for it in the current directory only.

The way it should work, gcc calls ld and attaches %DJDIR%/lib to crt0.o 
when it constructs the ld command line.

I cannot guess why gcc invoked by gxx doesn't read lib/specs and doesn't
prepend %DJDIR%/lib to crt0.o; it does for me.  Are you using gxx from
djdev201.zip (that's what I'm using)?  Did you maybe edit DJGPP.ENV?  If
so, please try the original DJGPP.ENV.  If these two clues don't help, try
to find the cause for this. 

- Raw text -


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