Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jul 2014 13:57:10 +0200
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        Gerald Pfeifer <gerald@pfeifer.com>
Cc:        svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, ports-committers@freebsd.org
Subject:   Re: svn commit: r336343 - in head: . Mk/Uses
Message-ID:  <20140702135710.52876211@kalimero.tijl.coosemans.org>
In-Reply-To: <alpine.LSU.2.11.1406292318140.30120@tuna.site>
References:  <201312131322.rBDDMWZC038800@svn.freebsd.org> <alpine.LSU.2.11.1406292318140.30120@tuna.site>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140702135710.52876211>