From 14bafc6d899ed6373b9fd8044e8b6928c9894aa0 Mon Sep 17 00:00:00 2001
From: Clayton Craft <clayton@craftyguy.net>
Date: Sun, 17 Apr 2022 21:32:47 -0700
Subject: [PATCH] community/kyotocabinet: disable project's build-time compiler
 optimizations

This project uses -march=native by default, which causes problems when
the package is built on a system with a newer ISA than the target CPUs.
--disable-opt causes it to use the default -march in gcc, which should
be something safe (right?)

In this particular case, it fixes an issue where the swpa instruction
was being included by gcc, causing a SIGILL on CPUs (like the cortex
A53) where this instruction is *not* supported. See:
https://github.com/rinigus/osmscout-server/issues/345
---
 community/kyotocabinet/APKBUILD | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/community/kyotocabinet/APKBUILD b/community/kyotocabinet/APKBUILD
index 1e1b801e64fb..f3ffb5df3ee2 100644
--- a/community/kyotocabinet/APKBUILD
+++ b/community/kyotocabinet/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Bart Ribbers <bribbers@disroot.org>
 pkgname=kyotocabinet
 pkgver=1.2.79
-pkgrel=2
+pkgrel=3
 pkgdesc="library of routines for managing a database"
 url="https://dbmx.net/kyotocabinet/"
 arch="all !armhf"
@@ -21,7 +21,7 @@ case "$CARCH" in
 esac
 
 build() {
-	./configure --prefix=/usr --enable-lzo --enable-lzma
+	./configure --prefix=/usr --enable-lzo --enable-lzma --disable-opt
 	make
 }
 
-- 
GitLab