commit:     c8762844e2a26ab7ed62a161195106652675828b
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Wed May  8 21:19:50 2019 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Wed May  8 21:24:42 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8762844

sys-libs/db: compile-fix by dropping mutex=ARM/gcc-assembly

This is a compile-fix so that old versions build on newer ARM hardware.

The ARM assembly code does not work on newer hardware
so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.

Specifically, it uses the SWPB op, which was deprecated [1]
The SWPB op ALSO cannot be used in ARM-Thumb mode.

>=sys-libs/db-6.1 uses LDREX instead, but that fix CANNOT be backported
due differing licenses in the new versions (the new version is AGPL).

Trust the compiler instead for older sys-libs/db versions, and just drop
--with-mutex=ARM/gcc-assembly from the configure.

[1] http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm

Fixes: https://bugs.gentoo.org/555740
Reported-By: Christohper Harrington <ironiridis <AT> gmail.com>
Reported-By: Luke-Jr <luke-jr <AT> utopios.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 sys-libs/db/db-4.7.25_p4.ebuild | 10 ++++++++--
 sys-libs/db/db-4.8.30-r2.ebuild | 10 ++++++++--
 sys-libs/db/db-5.1.29-r1.ebuild | 10 ++++++++--
 sys-libs/db/db-5.3.28-r2.ebuild |  8 +++++++-
 sys-libs/db/db-5.3.28-r3.ebuild |  8 +++++++-
 sys-libs/db/db-6.0.35-r1.ebuild |  8 +++++++-
 sys-libs/db/db-6.0.35.ebuild    |  8 +++++++-
 7 files changed, 52 insertions(+), 10 deletions(-)

diff --git a/sys-libs/db/db-4.7.25_p4.ebuild b/sys-libs/db/db-4.7.25_p4.ebuild
index 2f341da53d5..807fc0adc02 100644
--- a/sys-libs/db/db-4.7.25_p4.ebuild
+++ b/sys-libs/db/db-4.7.25_p4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=0
@@ -118,13 +118,19 @@ src_compile() {
                --enable-o_direct \
                --without-uniquename \
                $(use_enable rpc) \
-               $(use arm && echo --with-mutex=ARM/gcc-assembly) \
                $(use amd64 && echo --with-mutex=x86/gcc-assembly) \
                $(use_enable cxx) \
                $(use_enable java) \
                ${myconf} \
                $(use_enable test) \
                "$@"
+       # The embedded assembly on ARM does not work on newer hardware
+       # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
+       # Specifically, it uses the SWPB op, which was deprecated:
+       # 
http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
+       # The op ALSO cannot be used in ARM-Thumb mode.
+       # Trust the compiler instead.
+       # >=db-6.1 uses LDREX instead.
 
        emake || die "make failed"
 }

diff --git a/sys-libs/db/db-4.8.30-r2.ebuild b/sys-libs/db/db-4.8.30-r2.ebuild
index b19ec4fc505..bdedb3547a7 100644
--- a/sys-libs/db/db-4.8.30-r2.ebuild
+++ b/sys-libs/db/db-4.8.30-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -125,13 +125,19 @@ multilib_src_configure() {
                --enable-compat185 \
                --enable-o_direct \
                --without-uniquename \
-               $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) \
                $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
                $(use_enable cxx) \
                $(use_enable cxx stl) \
                $(multilib_native_use_enable java) \
                "${myconf[@]}" \
                $(use_enable test)
+       # The embedded assembly on ARM does not work on newer hardware
+       # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
+       # Specifically, it uses the SWPB op, which was deprecated:
+       # 
http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
+       # The op ALSO cannot be used in ARM-Thumb mode.
+       # Trust the compiler instead.
+       # >=db-6.1 uses LDREX instead.
 }
 
 multilib_src_test() {

diff --git a/sys-libs/db/db-5.1.29-r1.ebuild b/sys-libs/db/db-5.1.29-r1.ebuild
index a00e96a4a1b..5f28da0d367 100644
--- a/sys-libs/db/db-5.1.29-r1.ebuild
+++ b/sys-libs/db/db-5.1.29-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -148,7 +148,6 @@ src_configure() {
                --enable-sql \
                --enable-sql_codegen \
                --disable-sql_compat \
-               $(use arm && echo --with-mutex=ARM/gcc-assembly) \
                $(use amd64 && echo --with-mutex=x86/gcc-assembly) \
                $(use_enable cxx) \
                $(use_enable cxx stl) \
@@ -156,6 +155,13 @@ src_configure() {
                ${myconf} \
                $(use_enable test) \
                "$@"
+       # The embedded assembly on ARM does not work on newer hardware
+       # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
+       # Specifically, it uses the SWPB op, which was deprecated:
+       # 
http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
+       # The op ALSO cannot be used in ARM-Thumb mode.
+       # Trust the compiler instead.
+       # >=db-6.1 uses LDREX instead.
 }
 
 src_compile() {

diff --git a/sys-libs/db/db-5.3.28-r2.ebuild b/sys-libs/db/db-5.3.28-r2.ebuild
index 8738e10e008..47b37d93ea6 100644
--- a/sys-libs/db/db-5.3.28-r2.ebuild
+++ b/sys-libs/db/db-5.3.28-r2.ebuild
@@ -159,13 +159,19 @@ multilib_src_configure() {
                --enable-sql \
                --enable-sql_codegen \
                --disable-sql_compat \
-               $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) \
                $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
                $(use_enable cxx) \
                $(use_enable cxx stl) \
                $(multilib_native_use_enable java) \
                "${myconf[@]}" \
                $(use_enable test)
+       # The embedded assembly on ARM does not work on newer hardware
+       # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
+       # Specifically, it uses the SWPB op, which was deprecated:
+       # 
http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
+       # The op ALSO cannot be used in ARM-Thumb mode.
+       # Trust the compiler instead.
+       # >=db-6.1 uses LDREX instead.
 }
 
 multilib_src_install() {

diff --git a/sys-libs/db/db-5.3.28-r3.ebuild b/sys-libs/db/db-5.3.28-r3.ebuild
index 24f0d3c333b..d29b9bb65a4 100644
--- a/sys-libs/db/db-5.3.28-r3.ebuild
+++ b/sys-libs/db/db-5.3.28-r3.ebuild
@@ -161,13 +161,19 @@ multilib_src_configure() {
                --disable-sql \
                --disable-sql_codegen \
                --disable-sql_compat \
-               $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) \
                $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
                $(use_enable cxx) \
                $(use_enable cxx stl) \
                $(multilib_native_use_enable java) \
                "${myconf[@]}" \
                $(use_enable test)
+       # The embedded assembly on ARM does not work on newer hardware
+       # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
+       # Specifically, it uses the SWPB op, which was deprecated:
+       # 
http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
+       # The op ALSO cannot be used in ARM-Thumb mode.
+       # Trust the compiler instead.
+       # >=db-6.1 uses LDREX instead.
 }
 
 multilib_src_install() {

diff --git a/sys-libs/db/db-6.0.35-r1.ebuild b/sys-libs/db/db-6.0.35-r1.ebuild
index 0cd34cc3b7a..a2d1df993e5 100644
--- a/sys-libs/db/db-6.0.35-r1.ebuild
+++ b/sys-libs/db/db-6.0.35-r1.ebuild
@@ -159,13 +159,19 @@ multilib_src_configure() {
                --disable-sql \
                --disable-sql_codegen \
                --disable-sql_compat \
-               $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) \
                $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
                $(use_enable cxx) \
                $(use_enable cxx stl) \
                $(multilib_native_use_enable java) \
                "${myconf[@]}" \
                $(use_enable test)
+       # The embedded assembly on ARM does not work on newer hardware
+       # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
+       # Specifically, it uses the SWPB op, which was deprecated:
+       # 
http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
+       # The op ALSO cannot be used in ARM-Thumb mode.
+       # Trust the compiler instead.
+       # >=db-6.1 uses LDREX instead.
 }
 
 multilib_src_install() {

diff --git a/sys-libs/db/db-6.0.35.ebuild b/sys-libs/db/db-6.0.35.ebuild
index b03e9d66b02..476381c66a9 100644
--- a/sys-libs/db/db-6.0.35.ebuild
+++ b/sys-libs/db/db-6.0.35.ebuild
@@ -157,13 +157,19 @@ multilib_src_configure() {
                --enable-sql \
                --enable-sql_codegen \
                --disable-sql_compat \
-               $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) \
                $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
                $(use_enable cxx) \
                $(use_enable cxx stl) \
                $(multilib_native_use_enable java) \
                "${myconf[@]}" \
                $(use_enable test)
+       # The embedded assembly on ARM does not work on newer hardware
+       # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
+       # Specifically, it uses the SWPB op, which was deprecated:
+       # 
http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
+       # The op ALSO cannot be used in ARM-Thumb mode.
+       # Trust the compiler instead.
+       # >=db-6.1 uses LDREX instead.
 }
 
 multilib_src_install() {

Reply via email to