git: 812c99755d38 - main - science/tinker: Fix build on non-Intel architectures
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 19 Jul 2023 18:26:09 UTC
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=812c99755d385807b720cc36e4500b7911db4833 commit 812c99755d385807b720cc36e4500b7911db4833 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2023-07-18 13:55:24 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2023-07-19 18:26:05 +0000 science/tinker: Fix build on non-Intel architectures * add NATIVE option * rename option SSE into SIMD and not make it default Reported by: fallout --- science/tinker/Makefile | 16 ++++++++-------- science/tinker/files/patch-make_Makefile | 9 +++++++++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/science/tinker/Makefile b/science/tinker/Makefile index 139976dfc474..72b6a296d2c6 100644 --- a/science/tinker/Makefile +++ b/science/tinker/Makefile @@ -1,5 +1,6 @@ PORTNAME= tinker DISTVERSION= 8.10.5 +PORTREVISION= 1 CATEGORIES= science MASTER_SITES= https://dasher.wustl.edu/tinker/downloads/ @@ -29,16 +30,15 @@ SUB_FILES= pkg-message BINARY_ALIAS= gfortran=gfortran${GCC_DEFAULT} -OPTIONS_DEFINE= OPTIMIZED_FFLAGS DOCS EXAMPLES +OPTIONS_DEFINE= NATIVE OPTIMIZED_FFLAGS DOCS EXAMPLES +OPTIONS_DEFINE_amd64= SIMD +OPTIONS_DEFINE_i386= SIMD -OPTIONS_DEFINE_amd64= SSE -OPTIONS_DEFINE_i386= SSE -OPTIONS_DEFAULT_amd64= SSE -OPTIONS_DEFAULT_i386= SSE +NATIVE_MAKE_ARGS= PORT_SIMD_FLAGS+="-march=native" -SSE_MAKE_ARGS= PORT_SIMD_FLAGS="-msse -msse2 -mfpmath=sse" +OPTIMIZED_FFLAGS_DESC= Fortran compilation optimizations -OPTIMIZED_FFLAGS_DESC= compilation optimizations +SIMD_MAKE_ARGS= PORT_SIMD_FLAGS+="-msse -msse2 -mssse3" PORTDOCS= * PORTEXAMPLES= * @@ -50,7 +50,7 @@ FFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops .if (${ARCH} == "i386") FFLAGS+= -mfancy-math-387 -malign-double .endif # i386 -.endif +.endif # OPTIMIZED_FFLAGS post-extract: @${RM} ${BUILD_WRKSRC}/*.c diff --git a/science/tinker/files/patch-make_Makefile b/science/tinker/files/patch-make_Makefile index 5f647f400faf..4781c07cc428 100644 --- a/science/tinker/files/patch-make_Makefile +++ b/science/tinker/files/patch-make_Makefile @@ -1,5 +1,14 @@ --- make/Makefile.orig 2023-03-09 06:01:09 UTC +++ make/Makefile +@@ -87,7 +87,7 @@ APBS_LIBS = -lapbsmainroutines -lapbs -lmaloc -lapbsbl + F77 = gfortran + F77FLAGS = -c + #OPTFLAGS = -Ofast -march=native -fopenmp +-OPTFLAGS = -Ofast -mssse3 -fopenmp ++OPTFLAGS = -Ofast $(PORT_SIMD_FLAGS) -fopenmp + #OPTFLAGS = -Og -fbacktrace -fcheck=bounds -Wunused -Wmaybe-uninitialized + LIBDIR = -L. -L$(TINKER_LIBDIR)/macos + LIBS = @@ -818,136 +818,136 @@ listing: cat *.f *.c > tinker.txt