Skip to content

SPARC Linux support #1931

Open
Open
@XVilka

Description

rizin@rizin:~/rizin/rizin$ uname -a
Linux rizin 5.14.0-3-sparc64 #1 Debian 5.14.12-1 (2021-10-14) sparc64 GNU/Linux
rizin@rizin:~/rizin/rizin$ ninja -C build
ninja: Entering directory `build'
[570/1726] Compiling C object subproje...-c/libtree-sitter-c.a.p/src_parser.c.o
In file included from ../subprojects/tree-sitter-c/src/parser.c:1:
../subprojects/tree-sitter-c/src/parser.c: In function ‘ts_lex_keywords’:
../subprojects/tree-sitter-c/src/tree_sitter/parser.h:135:8: warning: variable ‘eof’ set but not used [-Wunused-but-set-variable]
  135 |   bool eof = false;             \
      |        ^~~
../subprojects/tree-sitter-c/src/parser.c:4147:3: note: in expansion of macro ‘START_LEXER’
 4147 |   START_LEXER();
      |   ^~~~~~~~~~~
[841/1726] Compiling C object librz/asm/librz_asm.so.0.4.0-git.p/p_asm_xap.c.o
In file included from ../librz/asm/arch/xap/dis.c:11,
                 from ../librz/asm/p/asm_xap.c:9:
../librz/asm/arch/xap/dis.h:80: warning: "REG_Y" redefined
   80 | #define REG_Y  3
      | 
In file included from /usr/include/signal.h:303,
                 from ../librz/include/rz_util.h:16,
                 from ../librz/asm/p/asm_xap.c:7:
/usr/include/sparc64-linux-gnu/sys/ucontext.h:113: note: this is the location of the previous definition
  113 | # define REG_Y   (3)
      | 
[1067/1726] Compiling C object librz/a...ysis.so.0.4.0-git.p/p_analysis_xap.c.o
In file included from ../librz/include/../asm/arch/xap/dis.c:11,
                 from ../librz/analysis/p/analysis_xap.c:9:
../librz/include/../asm/arch/xap/dis.h:80: warning: "REG_Y" redefined
   80 | #define REG_Y  3
      | 
In file included from /usr/include/signal.h:303,
                 from ../librz/include/rz_util.h:16,
                 from ../librz/include/rz_bin.h:4,
                 from ../librz/include/rz_asm.h:9,
                 from ../librz/analysis/p/analysis_xap.c:7:
/usr/include/sparc64-linux-gnu/sys/ucontext.h:113: note: this is the location of the previous definition
  113 | # define REG_Y   (3)
      | 
[1170/1726] Compiling C object librz/d...ebug.so.0.4.0-git.p/p_debug_native.c.o
../librz/debug/p/debug_native.c: In function ‘rz_debug_native_bp’:
../librz/debug/p/debug_native.c:1427:18: warning: unused variable ‘dbg’ [-Wunused-variable]
 1427 |         RzDebug *dbg = bp->user;
      |                  ^~~
../librz/debug/p/debug_native.c: At top level:
../librz/debug/p/debug_native.c:1629:2: warning: #warning Unsupported architecture [-Wcpp]
 1629 | #warning Unsupported architecture
      |  ^~~~~~~
[1174/1726] Compiling C object librz/d...0-git.p/p_native_linux_linux_debug.c.o
FAILED: librz/debug/librz_debug.so.0.4.0-git.p/p_native_linux_linux_debug.c.o 
cc -Ilibrz/debug/librz_debug.so.0.4.0-git.p -I. -I.. -I../librz/include -I../librz/bin/format/elf -I../shlr/qnx/include -I../shlr/gdb/include -I../shlr/gdb/include/gdbclient -I../shlr/gdb/include/gdbserver -I../shlr/bochs/include -I../shlr/winkd -Isubprojects/sdb -I../subprojects/sdb -Isubprojects/sdb/src -I../subprojects/sdb/src -I../librz/analysis/arch/gb -I../librz/analysis/arch/hexagon -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -g --std=gnu99 -D_GNU_SOURCE -Werror=sizeof-pointer-memaccess -fvisibility=hidden -fPIC -DRZ_PLUGIN_INCORE=1 -MD -MQ librz/debug/librz_debug.so.0.4.0-git.p/p_native_linux_linux_debug.c.o -MF librz/debug/librz_debug.so.0.4.0-git.p/p_native_linux_linux_debug.c.o.d -o librz/debug/librz_debug.so.0.4.0-git.p/p_native_linux_linux_debug.c.o -c ../librz/debug/p/native/linux/linux_debug.c
../librz/debug/p/native/linux/linux_debug.c: In function ‘linux_reg_profile’:
../librz/debug/p/native/linux/linux_debug.c:61:2: error: #error "Unsupported Linux CPU"
   61 | #error "Unsupported Linux CPU"
      |  ^~~~~
../librz/debug/p/native/linux/linux_debug.c: In function ‘print_fpu’:
../librz/debug/p/native/linux/linux_debug.c:1060:2: warning: #warning print_fpu not implemented for this platform [-Wcpp]
 1060 | #warning print_fpu not implemented for this platform
      |  ^~~~~~~
../librz/debug/p/native/linux/linux_debug.c: In function ‘linux_reg_read’:
../librz/debug/p/native/linux/linux_debug.c:1164:2: warning: #warning getfpregs not implemented for this platform [-Wcpp]
 1164 | #warning getfpregs not implemented for this platform
      |  ^~~~~~~
../librz/debug/p/native/linux/linux_debug.c:1170:17: error: unknown type name ‘RZ_DEBUG_REG_T’; did you mean ‘RZ_DEBUG_H’?
 1170 |                 RZ_DEBUG_REG_T regs;
      |                 ^~~~~~~~~~~~~~
      |                 RZ_DEBUG_H
../librz/debug/p/native/linux/linux_debug.c:1065:14: warning: variable ‘showfpu’ set but not used [-Wunused-but-set-variable]
 1065 |         bool showfpu = false;
      |              ^~~~~~~
../librz/debug/p/native/linux/linux_debug.c: In function ‘linux_reg_write’:
../librz/debug/p/native/linux/linux_debug.c:1270:69: warning: passing argument 4 of ‘rz_debug_ptrace’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1270 |                 int ret = rz_debug_ptrace(dbg, PTRACE_SETREGS, pid, buf, NULL);
      |                                                                     ^~~
In file included from ../librz/debug/p/native/linux/linux_debug.c:7:
../librz/include/rz_debug.h:612:96: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
  612 | static inline long rz_debug_ptrace(RzDebug *dbg, rz_ptrace_request_t request, pid_t pid, void *addr, rz_ptrace_data_t data) {
      |                                                                                          ~~~~~~^~~~
At top level:
../librz/debug/p/native/linux/linux_debug.c:969:13: warning: ‘print_fpu’ defined but not used [-Wunused-function]
  969 | static void print_fpu(void *f) {
      |             ^~~~~~~~~
[1175/1726] Compiling C object librz/d...it.p/p_native_linux_linux_coredump.c.o
ninja: build stopped: subcommand failed.
rizin@rizin:~/rizin/rizin$ 

Readily available QEMU VM is at rizin-debian-11-sparc-qemu-qcow2.zip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Type

No type

Projects

  • Status

    To do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions