Subject: Integrating gcc-3.4 into pkgsrc
To: None <tech-pkg@netbsd.org>
From: John R. Shannon <shannonjr@netbsd.org>
List: tech-pkg
Date: 06/01/2004 13:52:53
=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've been using a modified mk/compiler/gcc.mk for awhile to build packages=
=20
using gcc 3.4.0. The changes will follow at the end of this post.
Would other please review and consider for inclusion?
Thank You.
# cvs diff gcc.mk
Index: gcc.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/mk/compiler/gcc.mk,v
retrieving revision 1.67
diff -r1.67 gcc.mk
1d0
< # $NetBSD: gcc.mk,v 1.67 2004/05/17 05:33:08 jlam Exp $
12c11
< # _GCC_DIST_VERSION is the highest version of GCC installed by the pkgsrc
=2D ---
> # _PKGSRC_GCC_VERSION is the highest version of GCC installed by the pkgs=
rc
15a15
> _PKGSRC_GCC_VERSION=3D 3.4.0
22a23,26
> 2.[1-9][0-9][0-9]* 3.3.3
>
> # _GCC34_PATTERNS matches N s.t. 2.95.3 < N.
> _GCC34_PATTERNS=3D 2.95.[4-9]* 2.95.[1-9][0-9]* 2.9[6-9] 2.9[6-9].* =
=20
\
95a100,103
> # See what we have
> _HAVE_GCC3=3D `${PKG_INFO} -qe gcc3-c`
> _HAVE_GCC34=3D `${PKG_INFO} -qe gcc-3.4.0`
>
103c111,112
< _NEED_GCC3?=3D no
=2D ---
> _NEED_GCC3?=3D no
> _NEED_GCC34?=3D no
106c115,126
< _NEED_GCC3=3D yes
=2D ---
> # gcc-3.4 satisfies the _GCC3_PATTERNS
> # We will prefer gcc 3.4 unless gcc3 is already installed
> . if empty(_HAVE_GCC3:M[yY][eE][sS])
> _NEED_GCC34=3D yes
> . else
> _NEED_GCC3=3D yes
> . endif
> . endif
> .endfor
> .for _pattern_ in ${_GCC34_PATTERNS}
> . if !empty(_GCC_REQD:M${_pattern_})
> _NEED_GCC34=3D yes
109,111d128
< .if !empty(_NEED_GCC2:M[nN][oO]) && !empty(_NEED_GCC3:M[nN][oO])
< _NEED_GCC3=3D yes
< .endif
119a137,139
> .if !empty(_NEED_GCC34:M[yY][eE][sS])
> LANGUAGES.gcc=3D c c++ fortran java objc ada
> .endif
161a182,195
> .elif !empty(_NEED_GCC34:M[yY][eE][sS])
> #
> # We require gcc-3.4.0 in the lang/gcc-3.4 directory.
> #
> _GCC_PKGBASE=3D gcc
> . if !empty(PKGPATH:Mlang/gcc-3.4)
> _IGNORE_GCC=3D yes
> MAKEFLAGS+=3D _IGNORE_GCC=3Dyes
> . endif
> . if !defined(_IGNORE_GCC)
> _GCC_PKGSRCDIR=3D ../../lang/gcc-3.4
> _GCC_DEPENDENCY=3D gcc>=3D${_GCC_REQD}:../../lang/gcc-3.4
> USE_GCC_SHLIB?=3D yes
> . endif
233c267
< _PKGSRC_GCC_VERSION=3D ${_GCC_PKGBASE}-${_GCC_DIST_VERSION}
=2D ---
> _PKGSRC_GCC_VERSION=3D _GCC_PKG_VERSION
=2D --=20
John R. Shannon
shannonjr@netbsd.org
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)
iEYEARECAAYFAkC83pUACgkQOKbCxya4HYsO4gCeLnjij//865RhEyrjflXeGhYJ
lUsAoKBeXmJLeH/J0UUDUFIIuqQwb+mJ
=3DMzZD
=2D----END PGP SIGNATURE-----