advice on gfortran options for a port

Gerald Pfeifer gerald at pfeifer.com
Sun Nov 15 19:43:28 UTC 2015


Hi Tijl, hi Anton,

On Wed, 29 Jul 2015, Tijl Coosemans wrote:
>> Trying to build (with gfortran48 to gfortran6) I get:
>> 
>> f951: sorry, unimplemented: Graphite loop optimizations cannot be used (ISL is not available)(-fgraphite, -fgraphite-identity, -floop-block, -floop-interchange, -floop-strip-mine, -floop-parallelize-all, -floop-unroll-and-jam, and -ftree-loop-linear)
>> 
>> Are these not implemented on BSD?
>> I wonder how they build with GCC with these flags?
>> 
>> Anyway, should I leave all these flags, and -ggdb in the port?
>> Or should I use the default ports tree FFLAGS instead?
> It seems that gcc needs to be configured with --with-isl to enable
> Graphite.  Gerald, can this be enabled in the gcc ports?

I just committed a patch to lang/gcc6-devel that adds a new option 
GRAPHITE which enables support for Graphite loop optimizations and 
am looking into pushing this back into the gcc5-devel and later 
gcc5 ports.

Since this pulls in libisl as an additional dependency and I have 
only seen two requests for this (including yours) so far, I'm a 
little hesitant to make enable this option by default.

What do you think?  (Patch below.)

Gerald

Modified: head/lang/gcc6-devel/Makefile
==============================================================================
--- head/lang/gcc6-devel/Makefile	Sun Nov 15 19:09:01 2015	(r401723)
+++ head/lang/gcc6-devel/Makefile	Sun Nov 15 19:37:49 2015	(r401724)
@@ -42,7 +42,7 @@ SSP_UNSAFE=	yes
 PATCH_WRKSRC=	${SRCDIR}
 CONFIGURE_SCRIPT=	../${SRCDIR:S/${WRKDIR}\///}/configure
 
-OPTIONS_DEFINE=		BOOTSTRAP
+OPTIONS_DEFINE=		BOOTSTRAP GRAPHITE
 OPTIONS_DEFINE_i386=	JAVA
 OPTIONS_DEFINE_amd64=	JAVA
 OPTIONS_DEFAULT=	BOOTSTRAP
@@ -50,6 +50,7 @@ OPTIONS_DEFAULT_i386=	JAVA
 OPTIONS_DEFAULT_amd64=	JAVA
 OPTIONS_EXCLUDE_DragonFly=	JAVA
 BOOTSTRAP_DESC=		Build using a full bootstrap
+GRAPHITE_DESC=		Support for Graphite loop optimizations
 
 .if exists(/usr/lib32/libc.so)
 OPTIONS_DEFINE_powerpc64=	MULTILIB
@@ -125,6 +126,11 @@ INFO+=		gcc${SUFFIX}/libquadmath \
 SUB_FILES=	pkg-message
 SUB_LIST+=	TARGLIB=${TARGLIB}
 
+.if ${PORT_OPTIONS:MGRAPHITE}
+LIB_DEPENDS+=	libisl.so:${PORTSDIR}/devel/isl
+CONFIGURE_ARGS+=--with-isl=${LOCALBASE}
+.endif
+
 .if ${PORT_OPTIONS:MJAVA}
 ECJ_JAR=	${LOCALBASE}/share/java/ecj-4.5.jar
 BUILD_DEPENDS+=	${ECJ_JAR}:${PORTSDIR}/lang/gcc-ecj45 \


More information about the freebsd-fortran mailing list