Subject: native compilers [Re: CVS commit: pkgsrc/graphics/png]
To: Jan Schaumann <>
From: Lubomir Sedlacik <>
List: tech-pkg
Date: 06/12/2003 19:17:25
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jun 12, 2003 at 03:40:32PM +0000, Jan Schaumann wrote:
> Module Name:	pkgsrc
> Committed By:	jschauma
> Date:		Thu Jun 12 15:40:32 UTC 2003
> Modified Files:
> 	pkgsrc/graphics/png: Makefile
> Log Message:
> Under IRIX, we don't need gcc's buildlink.  MIPSPro does just fine.

i think this change is definitely not TRT.  what if someone actually
wants to use gcc?  are you going to fix all the packages including gcc
buildlink?  why not fix it directly in the

i am currently running pkgsrc on a Solaris machine with Forte compiler
and i was thinking about the right fix for this issue.  we should decide
on a more generic way of selecting a compiler and things around it.  the
obvious place seems to be defs.${OPSYS}.mk but maybe separate would be better.  e.g., Forte C++ compiler doesn't accept
-Wl, flag so i need to fix this in the buildlink wrapper.  it doesn't
accept -Whatever gccisms neither.  i need to know what compiler i am
using and avoid compiling gcc initiated from

the path i am thinking about is:

1a) decide what compiler $CC is in defs.${OPSYS}.mk, set a unique
    variable, e.g. USE_SUNFORTE, USE_MIPSPRO, USE_GCC{,3}
1b) let the user set the variable, defaulting to USE_GCC(?) in mk.conf,
    provide sane defaults for $CC, et al.

2) fix to take effect only of one of the USE_GCC{,3}
   variables is set

3) fix buildlink wrappers and other mk/ files to avoid gccisms and
   sanitize the environment (e.g., -Wl, or -Whatever transforms)

i have few local patches which allow me to use the Forte compiler quite
successfully (all my ~70 pkgsrc packages are built with the native
compiler, no gcc installed at all.  man, everything is _SO_ fast!, no
libgcc dependencies, ...).  i will rethink this a bit more and send
diffs soon.

thoughts?  ideas?


-- Lubomir Sedlacik <>                   --
--                  <>                   --

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.2 (NetBSD)