pmaports/main/unixbench/0001-Stop-using-native-CPU-optimizations.patch
2025-10-01 23:34:17 +02:00

39 lines
1.3 KiB
Diff

From 378b3eaff1354ed9fb861d7cbcbb549072842ec1 Mon Sep 17 00:00:00 2001
From: Jens Reidel <adrian@travitia.xyz>
Date: Wed, 1 Oct 2025 23:28:10 +0200
Subject: [PATCH] Stop using native CPU optimizations
This is not portable for packaging in distributions and may result in
illegal instructions on CPUs older than the ones used by the builder.
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
---
Makefile | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/Makefile b/Makefile
index 3169c03..158e204 100644
--- a/Makefile
+++ b/Makefile
@@ -90,18 +90,6 @@ else
## OS detection. Comment out if gmake syntax not supported by other 'make'.
OSNAME:=$(shell uname -s)
ARCH ?= $(shell uname -m)
- ifeq ($(OSNAME),Linux)
- # Not all CPU architectures support "-march" or "-march=native".
- # - Supported : x86, x86_64, ARM, AARCH64, riscv64, etc..
- # - Not Supported: IBM Power, etc...
- ifeq ($(ARCH),$(filter $(ARCH),ppc64 ppc64le))
- OPTON += -mcpu=native -mtune=native
- else ifeq ($(ARCH),riscv64)
- OPTON += -march=rv64g -mabi=lp64d
- else
- OPTON += -march=native -mtune=native
- endif
- endif
ifeq ($(OSNAME),Darwin)
# (adjust flags or comment out this section for older versions of XCode or OS X)
--
2.51.0