[MDEV-25807] ARM build failure due to missing ISB instruction on ARMv6 Created: 2021-05-28  Updated: 2021-06-01  Resolved: 2021-06-01

Status: Closed
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 10.5.10
Fix Version/s: 10.5.11

Type: Bug Priority: Major
Reporter: Vicențiu Ciorbaru Assignee: Daniel Black
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-24630 MY_RELAX_CPU assembly instruction upg... Closed

 Description   

The problem was introduced by MDEV-24630.

Compilation fails with:

selected processor doesn't support 'ISB' in ARM mode.

If the processor is ARMv6, it doesn't support isb instruction, as per the documentation here:
https://www.keil.com/support/man/docs/armasm/armasm_dom1361289871865.htm

The proper fix is to detect if the current compiling processor supports the inline assembly and only then activate the performance optimization feature.



 Comments   
Comment by Marko Mäkelä [ 2021-05-28 ]

cvicentiu, what about cross-compilation? Someone might compile on a Raspberry Pi 2 (whose processor implements the ARMv7 ISA) and expect the result to be runnable on an older Raspberry Pi (with ARMv6 ISA). Do we need that instruction at all on any 32-bit ARM? Those who want performance are likely using ARMv8 anyway.

Comment by Daniel Black [ 2021-05-28 ]

Happy with krunalbauskar's fix on MDEV-24630. Thank you.

Cross-compulations should use CMAKE_CROSSCOMPILING_EMULATOR for checking capability bits (discussion - https://github.com/MariaDB/server/pull/1805).

As ARMv7 doesn't really fall under our supported platforms I'm not sure its worth a significant effort to support isb under that.

Comment by Daniel Black [ 2021-06-01 ]

fixed using krunalbauskar's patch. There may not be any benefit in the MDEV-24630 for ARM32v7 (completely unknown) so a simple aarch64 vs 32 compile time differentiator used for simplicity.

Generated at Thu Feb 08 09:40:33 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.