delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/17/05:49:18

Date: Mon, 17 Apr 2000 10:18:38 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Ultan Henry <ultan AT cix DOT compulink DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: Environment variables
In-Reply-To: <memo.397209@cix.compulink.co.uk>
Message-ID: <Pine.SUN.3.91.1000417101814.14867E-100000@is>
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

On Sun, 16 Apr 2000, Ultan Henry wrote:

> Without setting the GCC_EXEC_PREFIX or COMPILER_PATH variables, the 
> compiler does seem to use the correct built-in specs for 
> my cross-development configuration. However, using the -v option shows 
> that these seem to be applied recursively to invocations of CPP until DOS 
> memory is exhausted.

The problem with recursive invocations of cpp was reported a few times
here.  I don't remember what its solution is, but you should be able
to find it by searching at http://www.delorie.com/djgpp/mail-archives/.

> > In particular, neither GCC_EXEC_PREFIX nor COMPILER_PATH are relevant 
> > to where GCC looks for crt0.o.
> 
> According to the GCC documentation, the GCC_EXEC_PREFIX is used for 
> finding files such as 'crt0.o' during linking. Is this documentation out 
> of date?

My memory says that this isn't true, but I'm not sure enough to give
you a definitive answer.  You might consider asking on gnu.gcc.bug
news group, or using -v to see what the truth is.

> > I suggest to reconfigure with prefix=c:/armtools/.. or /dev/c/armtools
> 
> I was hoping to avoid building the tools with an absolute path so that 
> they could be installed on different drives.  I believe the DJGPP DOS 
> binaries are configured with relative paths but seem to work correctly 
> when invoked from another drive.

There is much more to the DJGPP setup than relative paths.  The
standard DJGPP setup of GCC is relative to the directory pointed to by
the DJGPP environment variable.  This involves special code in the
DJGPP port of GCC which examines the DJGPP variable (and refuses to
work if it is not defined).

Other DJGPP ports work because there are special environment variables
set in DJGPP.ENV which tell them where to find the auxiliary files
those ports need.

This all seems deceptively simple to a naive user, but in fact is
fairly complex and involves lots of small nits and bolts spread
throughout many ports and special library features (for some insight,
see the node "Features" in the kb.info file, from the DOS prompt type
"info know hidden features").

If you want this kind of installation-independent operation, you will
need to make sure your cross binaries are installed in the same
directories where the native DJGPP binaries are usually found.
Since you probably don't want to lose your native DJGPP binaries, you
should probably rename the cross binaries (e.g. gcc -> arm-gcc) and
set GCC_EXEC_PREFIX to the the prefix ("arm-" in the above example).

Another idea is to configure with --prefix=/dev/env/ARMDIR, and define
the environment variable ARMDIR to point to the root of your
installation tree for the cross-development tools.  (As explained in
the library docs, the special prefix "/dev/env/FOO" is expanded at run
time into the value of the environment variable FOO.)

- Raw text -


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