sys-libs/db: compile-fix by dropping mutex=ARM/gcc-assembly
authorRobin H. Johnson <robbat2@gentoo.org>
Wed, 8 May 2019 21:19:50 +0000 (14:19 -0700)
committerRobin H. Johnson <robbat2@gentoo.org>
Wed, 8 May 2019 21:24:42 +0000 (14:24 -0700)
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@gmail.com>
Reported-By: Luke-Jr <luke-jr@utopios.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
sys-libs/db/db-4.7.25_p4.ebuild
sys-libs/db/db-4.8.30-r2.ebuild
sys-libs/db/db-5.1.29-r1.ebuild
sys-libs/db/db-5.3.28-r2.ebuild
sys-libs/db/db-5.3.28-r3.ebuild
sys-libs/db/db-6.0.35-r1.ebuild
sys-libs/db/db-6.0.35.ebuild

index 2f341da53d5ff802abaed770e470801b376c8b31..807fc0adc0282f871770a84feb7d7e67421b5313 100644 (file)
@@ -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"
 }
index b19ec4fc505cbe34de51f1da0178de36ceb44296..bdedb3547a75dc9577e593bdc5576896fd4935f2 100644 (file)
@@ -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() {
index a00e96a4a1b2039dbb4633a196b28fd9bbf270fd..5f28da0d3676a6517f3580e0c6b2f9efa421ed2a 100644 (file)
@@ -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() {
index 8738e10e0083c1d4c20594faa76f230e5301b9cd..47b37d93ea645b57d25e2effcb77ad794ea24619 100644 (file)
@@ -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() {
index 24f0d3c333b966717c1a6d4c7735f6464edc5648..d29b9bb65a4ea0cfcb7a04a1c0f9b6725034d2dd 100644 (file)
@@ -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() {
index 0cd34cc3b7ac2aef49bed0312dd18586b8748e79..a2d1df993e549164f8f4c785ea7750bf79a42e35 100644 (file)
@@ -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() {
index b03e9d66b02396cee1a39f13b9653ffa5a482845..476381c66a9062c2b14ec4665380cfa247832911 100644 (file)
@@ -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() {