Source: freebsd-buildutils
Version: 10.3~svn296373-7.1
Severity: wishlist
Tags: ftbfs patch
User: debian-loonga...@lists.debian.org
Usertags: loong64

Dear maintainers,

I have added e_machine judgment for loongarch in src/usr.bin/elfdump/elfdump.c.
Reference,
/* Legal values for e_machine (architecture).  */
#define EM_NONE          0      /* No machine */
#define EM_M32           1      /* AT&T WE 32100 */
#define EM_SPARC         2      /* SUN SPARC */
......
#define EM_CSKY         252     /* C-SKY */
#define EM_LOONGARCH    258     /* LoongArch */

Please consider the patch I have attached.
I would like to remind you that the compilation dependency of freebsd-buildutils is not yet satisfied. Depends on gcc-9 when compiling freebsd-buildutils, please see d/control and d/rules. The LoongArch architecture was supported in Debian GCC since version 12.2.0-14.

If you have any questions, you can contact me at any time.

thanks,
Dandan Zhang

Description: Add e_machine judgment for loongarch
Last-Update: 2024-01-16

--- freebsd-buildutils-10.3~svn296373.orig/src/usr.bin/elfdump/elfdump.c
+++ freebsd-buildutils-10.3~svn296373/src/usr.bin/elfdump/elfdump.c
@@ -273,6 +273,7 @@ e_machines(u_int mach)
 	case EM_X86_64:	return "EM_X86_64";
 	case EM_AARCH64:return "EM_AARCH64";
 	case EM_RISCV:	return "EM_RISCV";
+	case EM_LOONGARCH: return "EM_LOONGARCH";
 	}
 	snprintf(machdesc, sizeof(machdesc),
 	    "(unknown machine) -- type 0x%x", mach);

Reply via email to