From: Matthieu Longo Date: Mon, 22 Dec 2025 14:25:35 +0000 (+0000) Subject: loongarch: add back support for object attributes v1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d162e9f91b99daee2dffdaf179b30f9f1b800eaf;p=thirdparty%2Fbinutils-gdb.git loongarch: add back support for object attributes v1 A previous commit [1] mistakenly removed support for Object Attributes for LoongArch targets. This patch adds back the OA feature into Gas for the LoongArch targets following the new approach which consists in: - defining TC_OBJ_ATTR to 1 in tc-loongarch.h - enabling the compilation of obj-elf-attr.c in gas/configure.ac [1]: 28a51085ae59fdb530fbdce1e2a7d160667e3007 --- diff --git a/gas/config/tc-loongarch.h b/gas/config/tc-loongarch.h index a2444aae0d1..206e7b4313a 100644 --- a/gas/config/tc-loongarch.h +++ b/gas/config/tc-loongarch.h @@ -149,4 +149,7 @@ struct reloc_info #define md_finish loongarch_md_finish extern void loongarch_md_finish (void); +/* The target supports Object Attributes. */ +#define TC_OBJ_ATTR 1 + #endif diff --git a/gas/configure b/gas/configure index 52bbfdc3e81..2bcb85bb666 100755 --- a/gas/configure +++ b/gas/configure @@ -12701,7 +12701,7 @@ _ACEOF # Does the target support Object Attributes ? case ${cpu_type} in - arc* | arm* | csky | m68k | mips* | msp430 | ppc* \ + arc* | arm* | csky | loongarch | m68k | mips* | msp430 | ppc* \ | riscv* | s390* | sparc* | tic6x) for f in config/obj-elf-attr.o; do case " $extra_objects " in diff --git a/gas/configure.ac b/gas/configure.ac index f176578870d..1ec1f4a3bf8 100644 --- a/gas/configure.ac +++ b/gas/configure.ac @@ -434,7 +434,7 @@ changequote([,])dnl # Does the target support Object Attributes ? case ${cpu_type} in - arc* | arm* | csky | m68k | mips* | msp430 | ppc* \ + arc* | arm* | csky | loongarch | m68k | mips* | msp430 | ppc* \ | riscv* | s390* | sparc* | tic6x) for f in config/obj-elf-attr.o; do case " $extra_objects " in