tech-pkg archive

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

Re: pkgsrc gcc discussion #3874



On 01/02/18 10:20, Dr. Thomas Orgis wrote:
Am Tue, 2 Jan 2018 09:52:39 -0600
schrieb Jason Bacon <bacon4000%gmail.com@localhost>:

Maintaining platform-specific defaults for PKGSRC_G*_VERSION seems like
a good idea, along with visibly documenting the fact that they can be
set by the user at bootstrap time
I am not sure if this whole discussion affects me, so I better ask:
Does all this business change the situation of people who exlicitly
want pkgsrc to use an externally-provided gcc version? Currently, I
build my GCC (together with an MPI library) and then bootstrap pkgsrc
to use that dedicated build environment. I pass --compiler=gcc or
--compiler=icc and have CC and friends indicate the compiler I want
(also ICCBASE). I then put stuff like that into mk.conf:

PKGSRC_COMPILER=gcc
CC=gcc
CXX=g++
FC=gfortran
GCCBASE=/sw/compiler/gcc-6.4.0
USE_NATIVE_GCC=yes
TOOLS_PLATFORM.cpp=/sw/compiler/gcc-6.4.0/bin/cpp
TOOLS_PLATFORM.ld=/sw/compiler/gcc-6.4.0/bin/ld
TOOLS_PLATFORM.readelf=/sw/compiler/gcc-6.4.0/bin/readelf
TOOLS_PLATFORM.strip=/sw/compiler/gcc-6.4.0/bin/strip
CFLAGS+= -I/sw/env/gcc-6.4.0/openmpi/2.1.0/include -I/sw/compiler/gcc-6.4.0/include
FFLAGS=-O3 -march=native
FCFLAGS=${FFLAGS}
# RPATH hackery
LDFLAGS+=  -L/sw/env/gcc-6.4.0/openmpi/2.1.0/lib/openmpi -L/sw/env/gcc-6.4.0/openmpi/2.1.0/lib -L/sw/compiler/gcc-6.4.0/lib64 -L/sw/compiler/gcc-6.4.0/lib
LDFLAGS+=  -Wl,-R/sw/env/gcc-6.4.0/openmpi/2.1.0/lib/openmpi -Wl,-R/sw/env/gcc-6.4.0/openmpi/2.1.0/lib -Wl,-R/sw/compiler/gcc-6.4.0/lib64 -Wl,-R/sw/compiler/gcc-6.4.0/lib
BUILDLINK_PASSTHRU_DIRS+= /sw/env/gcc-6.4.0/openmpi/2.1.0/lib/openmpi /sw/env/gcc-6.4.0/openmpi/2.1.0/lib /sw/compiler/gcc-6.4.0/lib64 /sw/compiler/gcc-6.4.0/lib /sw/env/gcc-6.4.0/openmpi/2.1.0/include /sw/compiler/gcc-6.4.0/include
BUILDLINK_PASSTHRU_RPATHDIRS+= /sw/env/gcc-6.4.0/openmpi/2.1.0/lib/openmpi /sw/env/gcc-6.4.0/openmpi/2.1.0/lib /sw/compiler/gcc-6.4.0/lib64 /sw/compiler/gcc-6.4.0/lib

You see I had some trouble getting my builds of OpenMPI (together with
my patch to use native MPI) and GCC really in there with proper RPATH.
Regardless of how ugly this is — it works sufficiently right now — will
any of this be affected by the outcome of the compiler discussion here?
I guess pkgsrc will try to build a newer GCC if my prescribed one is
too old? Or not even that?


Alrighty then,

Thomas

That will come down to the final implementation, but I don't think it would affect you.

The basic idea is set a minimum required gcc, g++, and gfortran. If they are not met by the "base" compiler, then build an appropriate pkgsrc gcc package and use that for everything that follows.

As long as your custom gcc is visible and meets the version requirements, pkgsrc should use it.

Cheers,

    Jason

--
Earth is a beta site.


Home | Main Index | Thread Index | Old Index