pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Silly beginners question



On Thu, 26 Aug 2010, Stefan Palm wrote:

> as I need custom packages for various platforms - mainly for Solaris & 
> Linux - I decided to give pkgsrc a try. The keep the packages as much 
> in sync as possible I though it might be a goot idea to use the same 
> compiler on all platforms so I compiled "lang/gcc34". Now I'm kind of 
> uncertain how to proceed.
> 
> 1) "lang/gcc34" tells me to
> ===========================================================================
> $NetBSD: MESSAGE,v 1.2 2005/09/28 14:15:49 rillig Exp $
> 
> gcc34-3.4.6nb3 has been installed in /swmtools/gcc34
> 
> To use this compiler in pkgsrc:
> 
>    1) In your "pre-configure" target:
> 
>    .include "../../lang/gcc34/preconfigure.mk"
> 
>    2) .include "../../lang/gcc34/buildlink3.mk"
> 
> The "preconfigure.mk" makefile fragment will override the compiler tools
> selected by ../../mk/compiler.mk to use gcc version 3.4.x.
> 
> ===========================================================================

> Where should I put this two include lines? Into the "mk.conf" or do I 
> realy have to edit every Makefile of every single package I want to 
> build?

I think that MESSAGE should be removed as it is not used by the 
"end-user" but only for package maintainers.

> 2) gcc34 installs into its own dir; would I include that into my $PATH 
> or just set CC/CXX with full path in "mk.conf"?

By default, pkgsrc will use gcc. See 
http://www.netbsd.org/docs/pkgsrc/configuring.html#selecting-the-compiler

The pkgsrc/mk/compiler/gcc.mk is used to look for your gcc and make sure 
its version is good enough. So set your PATH so it sees your gcc first.



Home | Main Index | Thread Index | Old Index