Support for Build Attributes (BA) was originally added in [1]. To facilitate their use in customers codebases and avoid requiring a new Autotools test for BA support, the specification was later amended. Toolchains that generate BA sections and support the assembler directives should define the following preprocessor macro: __ARM_BUILDATTR64_FV <format-version> Where <format-version> is the same value as in [2]. Currently, only version 'A' (0x41) is defined.
This patch also introduces two tests: one that verifies the macro definition for positive detection of BA support; and another that ensures that no such macro is defined when BA support is absent. [1]: 98f5547dce2503d9d0f0cd454184d6870a315538 [2]: [Formal syntax of an ELF Attributes Section](https://github.com/smithp35/abi-aa/blob/build-attributes/buildattr64/buildattr64.rst#formal-syntax-of-an-elf-attributes-section) gcc/ChangeLog: * config/aarch64/aarch64-c.cc (aarch64_define_unconditional_macros): Define __ARM_BUILDATTR64_FV when BA support is detected in GAS. gcc/testsuite/ChangeLog: * gcc.target/aarch64/build-attributes/build-attribute-define-nok.c: New test. * gcc.target/aarch64/build-attributes/build-attribute-define-ok.c: New test. Matthieu Longo (1): aarch64: Define __ARM_BUILDATTR64_FV gcc/config/aarch64/aarch64-c.cc | 5 +++++ .../aarch64/build-attributes/build-attribute-define-nok.c | 5 +++++ .../aarch64/build-attributes/build-attribute-define-ok.c | 7 +++++++ 3 files changed, 17 insertions(+) create mode 100644 gcc/testsuite/gcc.target/aarch64/build-attributes/build-attribute-define-nok.c create mode 100644 gcc/testsuite/gcc.target/aarch64/build-attributes/build-attribute-define-ok.c -- 2.52.0
