Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-25807

ARM build failure due to missing ISB instruction on ARMv6

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.5.10
    • 10.5.11
    • Compiling
    • None

    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.

      Attachments

        Issue Links

          Activity

            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.

            marko Marko Mäkelä added a comment - 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.
            danblack Daniel Black added a comment -

            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.

            danblack Daniel Black added a comment - 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.
            danblack Daniel Black added a comment -

            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.

            danblack Daniel Black added a comment - 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.

            People

              danblack Daniel Black
              cvicentiu Vicențiu Ciorbaru
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.