pkgsrc-Users archive

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

Re: infer GCC_REQD from USE_LANGUAGES



On 1/6/19 5:16 AM, Benny Siegert wrote:
On Sun, Jan 6, 2019 at 2:00 AM Joerg Sonnenberger <joerg%bec.de@localhost> wrote:
Mixing GCC versions doesn't work well. That's exactly what you end up
with when non-leaf packages start to randomly require higher versions.
The only reasonable solution is to actually just require a version
that's new enough for your package set up front and stick with it.
What can the pksrc infrastructure do to help the user picking a
new-enough version?

What I've settled on is setting a minimum GCC_REQD in each package I maintain and an equal or higher GCC_REQD for everything (except GCC and its deps) in mk.conf.

As you may know, GCC_REQD is actually a list from which pkgsrc chooses the highest version.  So, setting GCC_REQD in mk.conf at least as high as the highest requirement of all the packages you need ensures a consistent tool chain.

Here is a basic config for my CentOS systems:

Linux login.avi bacon ~ 993: more /usr/pkg/etc/mk.conf
# Example /usr/pkg/etc/mk.conf file produced by bootstrap-pkgsrc
# Wed Oct 24 13:00:27 CDT 2018

.ifdef BSD_PKG_MK    # begin pkgsrc settings

ABI=            64

PKG_DBDIR=        /usr/pkg/pkgdb
LOCALBASE=        /usr/pkg
VARBASE=        /usr/pkg/var
PKG_TOOLS_BIN=        /usr/pkg/sbin
PKGINFODIR=        info
PKGMANDIR=        man


.endif            # end pkgsrc settings

X11_TYPE=        modular
PREFER_NATIVE=        no
PREFER_PKGSRC=        yes
PKGSRC_FORTRAN=        gfortran
PKG_DEVELOPER=        yes
FETCH_USING=        curl
SKIP_LICENSE_CHECK=    yes
PKG_OPTIONS.libfetch=    inet6 openssl

.if     empty(PKGPATH:Marchivers/bzip2) && \
    empty(PKGPATH:Marchivers/pax) && \
    empty(PKGPATH:Marchivers/xz) && \
    empty(PKGPATH:Mconverters/help2man) && \
    empty(PKGPATH:Mconverters/libiconv) && \
    empty(PKGPATH:Mconverters/p5-Unicode-EastAsianWidth) && \
    empty(PKGPATH:Mdevel/autoconf) && \
    empty(PKGPATH:Mdevel/binutils) && \
    empty(PKGPATH:Mdevel/gettext-lib) && \
    empty(PKGPATH:Mdevel/gettext-tools) && \
    empty(PKGPATH:Mdevel/gmake) && \
    empty(PKGPATH:Mdevel/gmp) && \
    empty(PKGPATH:Mdevel/gtexinfo) && \
    empty(PKGPATH:Mdevel/pkgconf) && \
    empty(PKGPATH:Mdevel/libtool-base) && \
    empty(PKGPATH:Mdevel/m4) && \
    empty(PKGPATH:Mdevel/ncurses) && \
    empty(PKGPATH:Mdevel/nbpatch) && \
    empty(PKGPATH:Mdevel/p5-gettext) && \
    empty(PKGPATH:Mlang/gcc6) && \
    empty(PKGPATH:Mlang/gcc6-libs) && \
    empty(PKGPATH:Mlang/perl5) && \
    empty(PKGPATH:Mmath/cloog) && \
    empty(PKGPATH:Mmath/isl) && \
    empty(PKGPATH:Mmath/mpcomplex) && \
    empty(PKGPATH:Mmath/mpfr) && \
    empty(PKGPATH:Mmisc/p5-Locale-libintl) && \
    empty(PKGPATH:Mnet/libfetch) && \
    empty(PKGPATH:Mpkgtools/cwrappers) && \
    empty(PKGPATH:Mpkgtools/digest) && \
    empty(PKGPATH:Mpkgtools/pkg_install-info) && \
    empty(PKGPATH:Mpkgtools/pkgin) && \
    empty(PKGPATH:Msysutils/checkperms) && \
    empty(PKGPATH:Mtextproc/gsed) && \
    empty(PKGPATH:Mtextproc/p5-Text-Unidecode)

GCC_REQD+=6.0

.endif  # GCC_REQD

# RHEL systems may have an outdated "as" that cannot translate instructions
# from current GCC code generators, so force pkgsrc binutils.
.if exists(/etc/redhat-release) && !empty(PKGPATH:Mlang/gcc*)
CONFIGURE_ARGS+=        --with-gnu-as --with-as=${PREFIX}/bin/gas
CONFIGURE_ARGS+=        --with-gnu-ld --with-ld=${PREFIX}/bin/gld
BUILDLINK_DEPMETHOD.binutils=   full
.  include "../../devel/binutils/buildlink3.mk"
.endif




Home | Main Index | Thread Index | Old Index