🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52835

PROBLEM with cccp, cross-compiling and GCC_EXEC_PATH

#52835
From: Risto Kankkunen
Date: Wed, 13 May 1992 16:31
40 lines
2229 bytes
I think GCC_EXEC_PATH is not used reasonably when cccp (version 2.1) is
searching for include files. Suppose I have compiled gcc for a few
different targets. I have not changed the default built-in paths as I'll
probably install the compilers and related files there later. For the
moment I have, however, installed them for testing under my home
directory.

The stuff is in directories $HOME/lib/gcc-lib/<target>/<version>, which
contain the compiler proper, c preprocessor, gcc library and include
directory. To compile programs for different targets I set
GCC_EXEC_PREFIX to $HOME/lib/gcc-lib and use the -b switch to specify
the target architecture for gcc. This works fine, except for cpp.

gcc adds <target>/<version> to the GCC_EXEC_PREFIX, so the right
utilities and libraries are used. However, cpp just modifies the normal
include directories from the default

   /usr/local/lib/gcc-lib/<target>/<version>/include

to

   $GCC_EXEC_PREFIX/include

and all the include files for different targets are searched for from
the same location. Wouldn't it be more useful to transform the default
path(s) to something like

   $GCC_EXEC_PREFIX/<target>/<version>/include?

I can circumvent this problem by setting C_INCLUDE_PATH to
$HOME/<target>/<version>/include, but it's a bit annoying to change that
every time you want to compile for a different target. And obviously
GCC_EXEC_PREFIX is intented just for this.

Would it be reasonable to change the behaviour of cccp? Has anyone done
it yet (patches, newer version)? Or have I set up my system poorly?

-- 
                                                               no sig today
Technical Details
Message-ID: <1992May13.163132.6346@klaava.Helsinki.FI>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!hydra!klaava!kankkune

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,6c310dd4c3f7b643,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-05-13 05:11:50 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!hydra!klaava!kankkune
From: kankkune@klaava.Helsinki.FI (Risto Kankkunen)
Newsgroups: gnu.gcc.help
Subject: PROBLEM with cccp, cross-compiling and GCC_EXEC_PATH
Message-ID: <1992May13.163132.6346@klaava.Helsinki.FI>
Date: 13 May 92 16:31:32 GMT
Organization: University of Helsinki, Department of Computer Science
Lines: 40