]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
loongarch: add back support for object attributes v1
authorMatthieu Longo <matthieu.longo@arm.com>
Mon, 22 Dec 2025 14:25:35 +0000 (14:25 +0000)
committerMatthieu Longo <matthieu.longo@arm.com>
Tue, 23 Dec 2025 11:10:39 +0000 (11:10 +0000)
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

gas/config/tc-loongarch.h
gas/configure
gas/configure.ac

index a2444aae0d190e17f536d8355a72352981c41dd9..206e7b4313a05c794ffa724a4942bd1432095d5d 100644 (file)
@@ -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
index 52bbfdc3e8119dbff7b6adf50e818282d8092214..2bcb85bb6661d708e0540713f695203e2c807d4c 100755 (executable)
@@ -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
index f176578870d65891bdaf37dddaf45725e1c2d97b..1ec1f4a3bf8cc13bafd53c40a406fb8ef3b47de0 100644 (file)
@@ -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