This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc and include dirs -> do we need a /etc/includes.conf?
- From: "Gerold J. Wucherpfennig" <gjwucherpfennig at gmx dot net>
- To: gcc at gcc dot gnu dot org
- Cc: Michael S. Zick <mszick at goquest dot com>; Lars Segerlund <lars dot segerlund at comsys dot se>
- Date: Fri, 28 Feb 2003 16:43:25 +0100
- Subject: Re: gcc and include dirs -> do we need a /etc/includes.conf?
- References: <200302280819.41504.gjwucherpfennig@gmx.net> <03022808203700.01090@wolf466>
> symlinks...
Oh, this is really heavy :-)
so many symlinks...
My current solution to this issue is to use
a custom shell script which is in /etc/profile.d :
PATH="$PATH:/usr/local/bin";
for i in /opt/*/bin /opt/*/sbin
do
PATH="$PATH:$i"
done
CPPFLAGS="-I/usr/X11R6/include"
for i in /opt/*/include
do
CPPFLAGS="$CPPFLAGS -I$i"
done
LD_LIBRARY_PATH="/usr/local/lib:/usr/X11R6/lib"
for i in /opt/*/lib
do
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$i"
done
CFLAGS="$CPPFLAGS -mcpu=athlon -O2"
CXXFLAGS="$CFLAGS"
export PATH CPPFLAGS CFLAGS CXXFLAGS
On Friday February 28 2003 15:20, you wrote:
> On Friday 28 February 2003 01:19 am, Gerold J. Wucherpfennig wrote:
...
>
> Try it this way (If ASCII art still works)
>
> /opt/<product><release>/{bin, lib, include, man, infc, ...}
> - - - -
> /opt/<product><release>/{bin, lib, include, man, info, ...}
>
> For every product-release your have. (Which I understand is what you
> have already done.)
>
> Then "fake" a unified installation with:
>
> /opt/bin {ln -s /opt/<product><release>/bin/* . } (The period counts)
> /opt/lib {ln -s /opt/<product><release>/lib/* . } (The period counts)
> /opt/include {ln -s /opt/<product><release>/include/* . } (The period
> counts) /opt/man {ln -s /opt/<product><release>/man/* . } (The period
> counts)
>
> Then to get the new stuff first in path: export PATH=/opt/bin:$PATH
>
> Tell ld.so about them, by putting "/opt/lib" in ld.so.conf and running
> ldconfig. Which leaves the ld.so cache pointing into /opt/lib/<library>
> which is really a link to the actual product's location - but I expect that
> it will work.
>
> I am not sure if everything in the world will follow the
> /opt/include/*=>link but I do expect some version of this scheme to work.
>
> If I run into problems with this scheme (I am building a personal distro),
> I'll post a follow-up -- so consider this an untested suggestion.
>
> Mike
>
> Mike