aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Pizzamiglio <pizzamig@FreeBSD.org>2023-03-26 14:51:28 +0000
committerLuca Pizzamiglio <pizzamig@FreeBSD.org>2023-03-26 14:51:28 +0000
commitbb383ff0fbcb0e4cc3f73da30b2f04266da14d30 (patch)
treed9190a212453fd8779599f04007ca8d7359422b5
parent9694390ba01279f701ebf70fb9907f21aaca2076 (diff)
downloadports-bb383ff0fbcb0e4cc3f73da30b2f04266da14d30.tar.gz
ports-bb383ff0fbcb0e4cc3f73da30b2f04266da14d30.zip
-rw-r--r--benchmarks/unixbench/Makefile11
-rw-r--r--benchmarks/unixbench/files/patch-Makefile32
2 files changed, 11 insertions, 32 deletions
diff --git a/benchmarks/unixbench/Makefile b/benchmarks/unixbench/Makefile
index 81d71c91c934..71b578e03425 100644
--- a/benchmarks/unixbench/Makefile
+++ b/benchmarks/unixbench/Makefile
@@ -2,6 +2,7 @@ PORTNAME= unixbench
DISTVERSIONPREFIX= v
DISTVERSION= 5.1.3-51
DISTVERSIONSUFFIX= -g6705203
+PORTREVISION= 1
CATEGORIES= benchmarks
MAINTAINER= pizzamig@FreeBSD.org
@@ -22,9 +23,19 @@ USE_XORG= x11 xext
CFLAGS+= -I${LOCALBASE}/include \
-L${LOCALBASE}/lib
+OPTIONS_DEFINE= OPTIMIZED_CFLAGS
+OPTIONS_EXCLUDE_aarch64= OPTIMIZED_CFLAGS
+MAKE_ENV= "UB_GCC_OPTIONS=-O3 -ffast-math -fomit-frame-pointer"
+#march generates code that can be incompatibe with previous CPU generations
+OPTIMIZED_CFLAGS_MAKE_ENV= "UB_GCC_OPTIONS=-O3 -ffast-math -fomit-frame-pointer -march=native"
+
SUB_FILES= unixbench
SHEBANG_FILES= Run pgms/gfx-x11
+post-patch:
+ ${REINPLACE_CMD} -e 's/^CC=gcc/#CC=gcc/' ${WRKSRC}/Makefile
+ ${REINPLACE_CMD} -e 's/^# GRAPHIC_TESTS = defined/GRAPHIC_TESTS = defined/' ${WRKSRC}/Makefile
+
do-install:
${INSTALL_SCRIPT} ${WRKDIR}/unixbench ${STAGEDIR}${PREFIX}/bin/
${MKDIR} ${STAGEDIR}${PREFIX}/libexec/unixbench
diff --git a/benchmarks/unixbench/files/patch-Makefile b/benchmarks/unixbench/files/patch-Makefile
deleted file mode 100644
index 3c2539dc046d..000000000000
--- a/benchmarks/unixbench/files/patch-Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
---- Makefile.orig 2023-02-07 23:18:07.000000000 +0100
-+++ Makefile 2023-03-26 13:40:57.699042000 +0200
-@@ -46,7 +46,7 @@
- # X11 libraries on your system. (e.g. libX11-devel mesa-libGL-devel)
- #
- # Comment the line out to disable these tests.
--# GRAPHIC_TESTS = defined
-+GRAPHIC_TESTS = defined
-
- # Set "GL_LIBS" to the libraries needed to link a GL program.
- GL_LIBS = -lGL -lXext -lX11
-@@ -55,7 +55,7 @@
- # COMPILER CONFIGURATION: Set "CC" to the name of the compiler to use
- # to build the binary benchmarks. You should also set "$cCompiler" in the
- # Run script to the name of the compiler you want to test.
--CC=gcc
-+#CC=gcc
-
- # OPTIMISATION SETTINGS:
- # Use gcc option if defined UB_GCC_OPTIONS via "Environment variable" or "Command-line arguments".
-@@ -113,6 +113,13 @@
- CFLAGS += -Wa,-q
- endif
-
-+ ifeq ($(OSNAME),FreeBSD)
-+ ifeq ($(ARCH),aarch64)
-+ OPTON += -fomit-frame-pointer
-+ else
-+ OPTON += -march=native -mtune=native -fomit-frame-pointer
-+ endif
-+ endif
- endif