svn commit: r336343 - in head: . Mk/Uses

Tijl Coosemans tijl at FreeBSD.org
Wed Jul 2 11:58:23 UTC 2014


On Sun, 29 Jun 2014 23:19:33 +0200 (CEST) Gerald Pfeifer wrote:
> On Fri, 13 Dec 2013, Tijl Coosemans wrote:
>> Added: head/Mk/Uses/fortran.mk
>> ==============================================================================
>> +.if ${fortran_ARGS} == gcc
>> +_GCC_VER=	46
> 
> We have already made this ${GCC_DEFAULT:S/.//}...
> 
>> +BUILD_DEPENDS+=	gfortran${_GCC_VER}:${PORTSDIR}/lang/gcc
>> +RUN_DEPENDS+=	gfortran${_GCC_VER}:${PORTSDIR}/lang/gcc
>> +USE_BINUTILS=	yes
>> +F77=		gfortran${_GCC_VER}
>> +FC=		gfortran${_GCC_VER}
>> +FFLAGS+=	-Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER}
>> +LDFLAGS+=	-Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER}
> 
> ...but is there a way to avoid this duplication of logic in bsd.gcc.mk
> (and Uses/compiler)?

For *FLAGS it would be ideal if we didn't need them at all.  If
"gcc49 -o test test.c" would just work I think they can be removed from
bsd.gcc.mk.  In fortran.mk they probably need to stay because some ports
link gfortran object files using "${CC}" or "${CXX}" which may be clang.

There's another problem though, with the *_DEPENDS lines.  They depend
on lang/gcc unconditionally while GCC_DEFAULT is supposed to be a user
tunable.  The dependency should be on lang/gcc${_GCC_VER}, but then
${_GCC_VER} and ${GCC_DEFAULT} would have to be empty to depend on
lang/gcc which is awkward.  Would it be possible to get rid of lang/gcc
by moving it to lang/gcc47?  That would make the gcc ports similar to
the other ports that use the default-versions system like lang/perlXYZ
or www/apacheXY etc.


More information about the svn-ports-head mailing list