diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2023-07-18 13:55:24 +0000 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2023-08-25 04:59:51 +0000 |
commit | 1e5fcc42f19a527eadbc13874757a1746362f3a5 (patch) | |
tree | 416c59cdedddd5c8f198601c803a10f56d74129f | |
parent | c4289c1ddb1279e50bc711c35d0ccc0d379a5017 (diff) | |
download | ports-1e5fcc42f19a527eadbc13874757a1746362f3a5.tar.gz ports-1e5fcc42f19a527eadbc13874757a1746362f3a5.zip |
science/tinker: Fix build on non-Intel architectures
* add NATIVE option
* rename option SSE into SIMD and not make it default
Reported by: fallout
(cherry picked from commit 812c99755d385807b720cc36e4500b7911db4833)
-rw-r--r-- | science/tinker/Makefile | 16 | ||||
-rw-r--r-- | 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 |