help build mpich with gcc6

Anton Shterenlikht mexas at
Tue Feb 21 18:15:47 UTC 2017

>From mexas Tue Feb 21 15:00:10 2017
>To: freebsd-ports at
>Subject: help build mpich with gcc6
>Reply-To: mexas at
>I added
>USE_GCC=        6+
>to net/mpich/Makefile
>but it seems this affected only the C and C++ parts:
>$ mpichversion
>MPICH CC:       gcc6  -O2 -pipe  -fstack-protector -Wl,-rpath=/usr/local/lib/gcc6 -fno-strict-aliasing 
>MPICH CXX:      g++6  -O2 -pipe -fstack-protector -Wl,-rpath=/usr/local/lib/gcc6 -fno-strict-aliasing  -Wl,-rpath=/usr/local/lib/gcc6
>MPICH F77:      gfortran49  -O -Wl,-rpath=/usr/local/lib/gcc49
>MPICH FC:       gfortran49  -Wl,-rpath=/usr/local/lib/gcc49
>The Fortran parts remained at lang/gcc level.
>What settings shall I use to make Fortran components
>built with gfortran6 instead?

I moved one step further.


in /etc/make.conf

I get:

MPICH CC:       cc  -O2 -pipe  -fstack-protector -fno-strict-aliasing 
MPICH CXX:      c++  -O2 -pipe -fstack-protector -fno-strict-aliasing 
MPICH F77:      gfortran6  -O -Wl,-rpath=/usr/local/lib/gcc6
MPICH FC:       gfortran6  -Wl,-rpath=/usr/local/lib/gcc6

which seems to be fine for my purposes.
But is DEFAULT_VERSIONS the best solution?



More information about the freebsd-ports mailing list