libretro / gpsp

gpSP for libretro.
GNU General Public License v2.0
54 stars 53 forks source link

Compile error without HAVE_MMAP = 1 in ARM #9

Closed sergiobenrocha2 closed 3 years ago

sergiobenrocha2 commented 9 years ago

This compile error is hard to get, I got sometimes in an ARM server (real hardware) and always in launchpad (which uses qemu). If you compile without HAVE_MMAP = 1, you get zillions errors.

/usr/bin/make platform="armv hardfloat"
make[2]: Entering directory `/build/buildd/libretro-gpsp-0.9+r220~4~ubuntu14.04.1'
gcc -I. -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -marm -mfloat-abi=hard -DARM -DARM_ARCH -DARM_MEMORY_DYNAREC -DHAVE_STRINGS_H -DHAVE_STDINT_H -DHAVE_INTTYPES_H -D__LIBRETRO__ -DINLINE=inline -Wall -Werror=implicit-function-declaration -DHAVE_DYNAREC -DARM_ARCH   -DNDEBUG=1 -fPIC -DFRONTEND_SUPPORTS_RGB565 -O3 -DNDEBUG -c  -o main.o main.c
gcc -I. -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -marm -mfloat-abi=hard -DARM -DARM_ARCH -DARM_MEMORY_DYNAREC -DHAVE_STRINGS_H -DHAVE_STDINT_H -DHAVE_INTTYPES_H -D__LIBRETRO__ -DINLINE=inline -Wall -Werror=implicit-function-declaration -DHAVE_DYNAREC -DARM_ARCH   -DNDEBUG=1 -fPIC -DFRONTEND_SUPPORTS_RGB565 -O3 -DNDEBUG -c  -o cpu.o cpu.c
cpu.c: In function 'execute_arm':
cpu.c:198:7: warning: unused variable 'rn' [-Wunused-variable]
   u32 rn = (opcode >> 12) & 0x0F;                                             \
       ^
cpu.c:863:3: note: in expansion of macro 'arm_decode_multiply'
   arm_decode_multiply();                                                      \
   ^
cpu.c:1793:20: note: in expansion of macro 'arm_multiply'
                    arm_multiply(no_op, no);                                            
                    ^
cpu.c:198:7: warning: unused variable 'rn' [-Wunused-variable]
   u32 rn = (opcode >> 12) & 0x0F;                                             \
       ^
cpu.c:863:3: note: in expansion of macro 'arm_decode_multiply'
   arm_decode_multiply();                                                      \
   ^
cpu.c:1810:23: note: in expansion of macro 'arm_multiply'
                       arm_multiply(no_op, yes);                                         
                       ^
cpu.c:181:7: warning: unused variable 'rm' [-Wunused-variable]
   u32 rm = opcode & 0x0F;                                                     \
       ^
cpu.c:924:3: note: in expansion of macro 'arm_decode_psr_reg'
   arm_decode_psr_##op_type(opcode);                                           \
   ^
cpu.c:2205:17: note: in expansion of macro 'arm_psr'
                 arm_psr(reg, read, reg[REG_CPSR]);                                    
                 ^
cpu.c:179:7: warning: unused variable 'psr_field' [-Wunused-variable]
   u32 psr_field = (opcode >> 16) & 0x0F;                                      \
       ^
cpu.c:924:3: note: in expansion of macro 'arm_decode_psr_reg'
   arm_decode_psr_##op_type(opcode);                                           \
   ^
cpu.c:2205:17: note: in expansion of macro 'arm_psr'
                 arm_psr(reg, read, reg[REG_CPSR]);                                    
                 ^
cpu.c:164:7: warning: unused variable 'rd' [-Wunused-variable]
   u32 rd = (opcode >> 12) & 0x0F;                                             \
       ^
cpu.c:751:3: note: in expansion of macro 'arm_decode_data_proc_reg'
   arm_decode_data_proc_reg(opcode);                                           \
   ^
cpu.c:822:3: note: in expansion of macro 'arm_data_proc_flags_reg'
   arm_data_proc_flags_##type();                                               \
   ^
cpu.c:2233:17: note: in expansion of macro 'arm_data_proc_test_logic'
                 arm_data_proc_test_logic(reg[rn] & reg_sh, reg);                      
                 ^
cpu.c:180:7: warning: unused variable 'rd' [-Wunused-variable]
   u32 rd = (opcode >> 12) & 0x0F;                                             \
       ^
cpu.c:924:3: note: in expansion of macro 'arm_decode_psr_reg'
   arm_decode_psr_##op_type(opcode);                                           \
   ^
cpu.c:2265:20: note: in expansion of macro 'arm_psr'
                    arm_psr(reg, store, cpsr);                                          
                    ^
cpu.c:164:7: warning: unused variable 'rd' [-Wunused-variable]
   u32 rd = (opcode >> 12) & 0x0F;                                             \
       ^
cpu.c:751:3: note: in expansion of macro 'arm_decode_data_proc_reg'
   arm_decode_data_proc_reg(opcode);                                           \
   ^
cpu.c:822:3: note: in expansion of macro 'arm_data_proc_flags_reg'
   arm_data_proc_flags_##type();                                               \
   ^
cpu.c:2294:17: note: in expansion of macro 'arm_data_proc_test_logic'
                 arm_data_proc_test_logic(reg[rn] ^ reg_sh, reg);                      
                 ^
cpu.c:181:7: warning: unused variable 'rm' [-Wunused-variable]
   u32 rm = opcode & 0x0F;                                                     \
       ^
cpu.c:924:3: note: in expansion of macro 'arm_decode_psr_reg'
   arm_decode_psr_##op_type(opcode);                                           \
   ^
cpu.c:2315:17: note: in expansion of macro 'arm_psr'
                 arm_psr(reg, read, spsr[reg[CPU_MODE]]);                              
                 ^
cpu.c:179:7: warning: unused variable 'psr_field' [-Wunused-variable]
   u32 psr_field = (opcode >> 16) & 0x0F;                                      \
       ^
cpu.c:924:3: note: in expansion of macro 'arm_decode_psr_reg'
   arm_decode_psr_##op_type(opcode);                                           \
   ^
cpu.c:2315:17: note: in expansion of macro 'arm_psr'
                 arm_psr(reg, read, spsr[reg[CPU_MODE]]);                              
                 ^
cpu.c:164:7: warning: unused variable 'rd' [-Wunused-variable]
   u32 rd = (opcode >> 12) & 0x0F;                                             \
       ^
cpu.c:755:3: note: in expansion of macro 'arm_decode_data_proc_reg'
   arm_decode_data_proc_reg(opcode);                                           \
   ^
cpu.c:841:3: note: in expansion of macro 'arm_data_proc_reg'
   arm_data_proc_##type();                                                     \
   ^
cpu.c:2343:17: note: in expansion of macro 'arm_data_proc_test_sub'
                 arm_data_proc_test_sub(reg[rn], reg_sh, reg);                         
                 ^
cpu.c:180:7: warning: unused variable 'rd' [-Wunused-variable]
   u32 rd = (opcode >> 12) & 0x0F;                                             \
       ^
cpu.c:924:3: note: in expansion of macro 'arm_decode_psr_reg'
   arm_decode_psr_##op_type(opcode);                                           \
   ^
cpu.c:2356:17: note: in expansion of macro 'arm_psr'
                 arm_psr(reg, store, spsr);                                            
                 ^
cpu.c:164:7: warning: unused variable 'rd' [-Wunused-variable]
   u32 rd = (opcode >> 12) & 0x0F;                                             \
       ^
cpu.c:755:3: note: in expansion of macro 'arm_decode_data_proc_reg'
   arm_decode_data_proc_reg(opcode);                                           \
   ^
cpu.c:831:3: note: in expansion of macro 'arm_data_proc_reg'
   arm_data_proc_##type();                                                     \
   ^
cpu.c:2384:17: note: in expansion of macro 'arm_data_proc_test_add'
                 arm_data_proc_test_add(reg[rn], reg_sh, reg);                         
                 ^
cpu.c:163:7: warning: unused variable 'rn' [-Wunused-variable]
   u32 rn = (opcode >> 16) & 0x0F;                                             \
       ^
cpu.c:755:3: note: in expansion of macro 'arm_decode_data_proc_reg'
   arm_decode_data_proc_reg(opcode);                                           \
   ^
cpu.c:768:3: note: in expansion of macro 'arm_data_proc_reg'
   arm_data_proc_##type();                                                     \
   ^
cpu.c:2438:17: note: in expansion of macro 'arm_data_proc'
                 arm_data_proc(reg_sh, reg);                                           
                 ^
cpu.c:163:7: warning: unused variable 'rn' [-Wunused-variable]
   u32 rn = (opcode >> 16) & 0x0F;                                             \
       ^
cpu.c:751:3: note: in expansion of macro 'arm_decode_data_proc_reg'
   arm_decode_data_proc_reg(opcode);                                           \
   ^
cpu.c:787:3: note: in expansion of macro 'arm_data_proc_flags_reg'
   arm_data_proc_flags_##type();                                               \
   ^
cpu.c:2466:17: note: in expansion of macro 'arm_data_proc_logic_flags'
                 arm_data_proc_logic_flags(reg_sh, reg);                               
                 ^
cpu.c:163:7: warning: unused variable 'rn' [-Wunused-variable]
   u32 rn = (opcode >> 16) & 0x0F;                                             \
       ^
cpu.c:755:3: note: in expansion of macro 'arm_decode_data_proc_reg'
   arm_decode_data_proc_reg(opcode);                                           \
   ^
cpu.c:768:3: note: in expansion of macro 'arm_data_proc_reg'
   arm_data_proc_##type();                                                     \
   ^
cpu.c:2520:17: note: in expansion of macro 'arm_data_proc'
                 arm_data_proc(~reg_sh, reg);                                          
                 ^
cpu.c:163:7: warning: unused variable 'rn' [-Wunused-variable]
   u32 rn = (opcode >> 16) & 0x0F;                                             \
       ^
cpu.c:751:3: note: in expansion of macro 'arm_decode_data_proc_reg'
   arm_decode_data_proc_reg(opcode);                                           \
   ^
cpu.c:787:3: note: in expansion of macro 'arm_data_proc_flags_reg'
   arm_data_proc_flags_##type();                                               \
   ^
cpu.c:2548:17: note: in expansion of macro 'arm_data_proc_logic_flags'
                 arm_data_proc_logic_flags(~reg_sh, reg);                              
                 ^
cpu.c:172:7: warning: unused variable 'rd' [-Wunused-variable]
   u32 rd = (opcode >> 12) & 0x0F;                                             \
       ^
cpu.c:759:3: note: in expansion of macro 'arm_decode_data_proc_imm'
   arm_decode_data_proc_imm(opcode)                                            \
   ^
cpu.c:822:3: note: in expansion of macro 'arm_data_proc_flags_imm'
   arm_data_proc_flags_##type();                                               \
   ^
cpu.c:2635:14: note: in expansion of macro 'arm_data_proc_test_logic'
              arm_data_proc_test_logic(reg[rn] & imm, imm);                           
              ^
cpu.c:187:7: warning: unused variable 'rd' [-Wunused-variable]
   u32 rd = (opcode >> 12) & 0x0F;                                             \
       ^
cpu.c:924:3: note: in expansion of macro 'arm_decode_psr_imm'
   arm_decode_psr_##op_type(opcode);                                           \
   ^
cpu.c:2640:14: note: in expansion of macro 'arm_psr'
              arm_psr(imm, store, cpsr);                                              
              ^
cpu.c:172:7: warning: unused variable 'rd' [-Wunused-variable]
   u32 rd = (opcode >> 12) & 0x0F;                                             \
       ^
cpu.c:759:3: note: in expansion of macro 'arm_decode_data_proc_imm'
   arm_decode_data_proc_imm(opcode)                                            \
   ^
cpu.c:822:3: note: in expansion of macro 'arm_data_proc_flags_imm'
   arm_data_proc_flags_##type();                                               \
   ^
cpu.c:2645:14: note: in expansion of macro 'arm_data_proc_test_logic'
              arm_data_proc_test_logic(reg[rn] ^ imm, imm);                           
              ^
cpu.c:172:7: warning: unused variable 'rd' [-Wunused-variable]
   u32 rd = (opcode >> 12) & 0x0F;                                             \
       ^
cpu.c:762:3: note: in expansion of macro 'arm_decode_data_proc_imm'
   arm_decode_data_proc_imm(opcode)                                            \
   ^
cpu.c:841:3: note: in expansion of macro 'arm_data_proc_imm'
   arm_data_proc_##type();                                                     \
   ^
cpu.c:2651:14: note: in expansion of macro 'arm_data_proc_test_sub'
              arm_data_proc_test_sub(reg[rn], imm, imm);                              
              ^
cpu.c:187:7: warning: unused variable 'rd' [-Wunused-variable]
   u32 rd = (opcode >> 12) & 0x0F;                                             \
       ^
cpu.c:924:3: note: in expansion of macro 'arm_decode_psr_imm'
   arm_decode_psr_##op_type(opcode);                                           \
   ^
cpu.c:2656:14: note: in expansion of macro 'arm_psr'
              arm_psr(imm, store, spsr);                                              
              ^
cpu.c:172:7: warning: unused variable 'rd' [-Wunused-variable]
   u32 rd = (opcode >> 12) & 0x0F;                                             \
       ^
cpu.c:762:3: note: in expansion of macro 'arm_decode_data_proc_imm'
   arm_decode_data_proc_imm(opcode)                                            \
   ^
cpu.c:831:3: note: in expansion of macro 'arm_data_proc_imm'
   arm_data_proc_##type();                                                     \
   ^
cpu.c:2661:14: note: in expansion of macro 'arm_data_proc_test_add'
              arm_data_proc_test_add(reg[rn], imm, imm);                              
              ^
cpu.c:171:7: warning: unused variable 'rn' [-Wunused-variable]
   u32 rn = (opcode >> 16) & 0x0F;                                             \
       ^
cpu.c:762:3: note: in expansion of macro 'arm_decode_data_proc_imm'
   arm_decode_data_proc_imm(opcode)                                            \
   ^
cpu.c:768:3: note: in expansion of macro 'arm_data_proc_imm'
   arm_data_proc_##type();                                                     \
   ^
cpu.c:2676:14: note: in expansion of macro 'arm_data_proc'
              arm_data_proc(imm, imm);                                                
              ^
cpu.c:171:7: warning: unused variable 'rn' [-Wunused-variable]
   u32 rn = (opcode >> 16) & 0x0F;                                             \
       ^
cpu.c:759:3: note: in expansion of macro 'arm_decode_data_proc_imm'
   arm_decode_data_proc_imm(opcode)                                            \
   ^
cpu.c:787:3: note: in expansion of macro 'arm_data_proc_flags_imm'
   arm_data_proc_flags_##type();                                               \
   ^
cpu.c:2681:14: note: in expansion of macro 'arm_data_proc_logic_flags'
              arm_data_proc_logic_flags(imm, imm);                                    
              ^
cpu.c:171:7: warning: unused variable 'rn' [-Wunused-variable]
   u32 rn = (opcode >> 16) & 0x0F;                                             \
       ^
cpu.c:762:3: note: in expansion of macro 'arm_decode_data_proc_imm'
   arm_decode_data_proc_imm(opcode)                                            \
   ^
cpu.c:768:3: note: in expansion of macro 'arm_data_proc_imm'
   arm_data_proc_##type();                                                     \
   ^
cpu.c:2696:14: note: in expansion of macro 'arm_data_proc'
              arm_data_proc(~imm, imm);                                               
              ^
cpu.c:171:7: warning: unused variable 'rn' [-Wunused-variable]
   u32 rn = (opcode >> 16) & 0x0F;                                             \
       ^
cpu.c:759:3: note: in expansion of macro 'arm_decode_data_proc_imm'
   arm_decode_data_proc_imm(opcode)                                            \
   ^
cpu.c:787:3: note: in expansion of macro 'arm_data_proc_flags_imm'
   arm_data_proc_flags_##type();                                               \
   ^
cpu.c:2701:14: note: in expansion of macro 'arm_data_proc_logic_flags'
              arm_data_proc_logic_flags(~imm, imm);                                   
              ^
cpu.c:297:7: warning: unused variable 'rd' [-Wunused-variable]
   u32 rd = ((opcode >> 4) & 0x08) | (opcode & 0x07);                          \
       ^
cpu.c:3649:17: note: in expansion of macro 'thumb_decode_hireg_op'
                 thumb_decode_hireg_op();                                              
                 ^
cpu.c:1658:7: warning: variable 'old_pc' set but not used [-Wunused-but-set-variable]
   u32 old_pc;
       ^
gcc -I. -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -marm -mfloat-abi=hard -DARM -DARM_ARCH -DARM_MEMORY_DYNAREC -DHAVE_STRINGS_H -DHAVE_STDINT_H -DHAVE_INTTYPES_H -D__LIBRETRO__ -DINLINE=inline -Wall -Werror=implicit-function-declaration -DHAVE_DYNAREC -DARM_ARCH   -DNDEBUG=1 -fPIC -DFRONTEND_SUPPORTS_RGB565 -O3 -DNDEBUG -c  -o gba_memory.o gba_memory.c
gba_memory.c: In function 'write_eeprom':
gba_memory.c:503:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
         address16(eeprom_buffer, 0) = 0;
         ^
gba_memory.c:517:12: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
            (address16(eeprom_buffer, 0) >> 2) * 8;
            ^
gba_memory.c:525:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
         address16(eeprom_buffer, 0) = 0;
         ^
In file included from gba_memory.c:20:0:
gba_memory.c: In function 'load_backup':
common.h:124:10: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
     fread(buffer, 1, size, filename_tag)                                      \
          ^
gba_memory.c:2095:5: note: in expansion of macro 'file_read'
     file_read(backup_file, gamepak_backup, backup_size);
     ^
gba_memory.c: In function 'load_gamepak_raw':
common.h:124:10: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
     fread(buffer, 1, size, filename_tag)                                      \
          ^
gba_memory.c:2417:7: note: in expansion of macro 'file_read'
       file_read(gamepak_file, gamepak_rom, file_size);
       ^
common.h:124:10: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
     fread(buffer, 1, size, filename_tag)                                      \
          ^
gba_memory.c:2430:7: note: in expansion of macro 'file_read'
       file_read(gamepak_file, gamepak_rom, 0x100);
       ^
gba_memory.c: In function 'load_bios':
common.h:124:10: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
     fread(buffer, 1, size, filename_tag)                                      \
          ^
gba_memory.c:2499:3: note: in expansion of macro 'file_read'
   file_read(bios_file, bios_rom, 0x4000);
   ^
gba_memory.c: In function 'load_gamepak_page':
common.h:124:10: warning: ignoring return value of 'fread', declared with attribute warn_unused_result [-Wunused-result]
     fread(buffer, 1, size, filename_tag)                                      \
          ^
gba_memory.c:3232:3: note: in expansion of macro 'file_read'
   file_read(gamepak_file_large, swap_location, (32 * 1024));
   ^
gcc -I. -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -marm -mfloat-abi=hard -DARM -DARM_ARCH -DARM_MEMORY_DYNAREC -DHAVE_STRINGS_H -DHAVE_STDINT_H -DHAVE_INTTYPES_H -D__LIBRETRO__ -DINLINE=inline -Wall -Werror=implicit-function-declaration -DHAVE_DYNAREC -DARM_ARCH   -DNDEBUG=1 -fPIC -DFRONTEND_SUPPORTS_RGB565 -O3 -DNDEBUG -c  -o video.o video.c
gcc -I. -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -marm -mfloat-abi=hard -DARM -DARM_ARCH -DARM_MEMORY_DYNAREC -DHAVE_STRINGS_H -DHAVE_STDINT_H -DHAVE_INTTYPES_H -D__LIBRETRO__ -DINLINE=inline -Wall -Werror=implicit-function-declaration -DHAVE_DYNAREC -DARM_ARCH   -DNDEBUG=1 -fPIC -DFRONTEND_SUPPORTS_RGB565 -O3 -DNDEBUG -c  -o input.o input.c
gcc -I. -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -marm -mfloat-abi=hard -DARM -DARM_ARCH -DARM_MEMORY_DYNAREC -DHAVE_STRINGS_H -DHAVE_STDINT_H -DHAVE_INTTYPES_H -D__LIBRETRO__ -DINLINE=inline -Wall -Werror=implicit-function-declaration -DHAVE_DYNAREC -DARM_ARCH   -DNDEBUG=1 -fPIC -DFRONTEND_SUPPORTS_RGB565 -O3 -DNDEBUG -c  -o sound.o sound.c
gcc -I. -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -marm -mfloat-abi=hard -DARM -DARM_ARCH -DARM_MEMORY_DYNAREC -DHAVE_STRINGS_H -DHAVE_STDINT_H -DHAVE_INTTYPES_H -D__LIBRETRO__ -DINLINE=inline -Wall -Werror=implicit-function-declaration -DHAVE_DYNAREC -DARM_ARCH   -DNDEBUG=1 -fPIC -DFRONTEND_SUPPORTS_RGB565 -O3 -DNDEBUG -c  -o cheats.o cheats.c
gcc -I. -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -marm -mfloat-abi=hard -DARM -DARM_ARCH -DARM_MEMORY_DYNAREC -DHAVE_STRINGS_H -DHAVE_STDINT_H -DHAVE_INTTYPES_H -D__LIBRETRO__ -DINLINE=inline -Wall -Werror=implicit-function-declaration -DHAVE_DYNAREC -DARM_ARCH   -DNDEBUG=1 -fPIC -DFRONTEND_SUPPORTS_RGB565 -O3 -DNDEBUG -c  -o libretro.o libretro.c
In file included from libretro.c:6:0:
common.h:36:0: warning: "_BSD_SOURCE" redefined [enabled by default]
 #define _BSD_SOURCE // sync
 ^
In file included from /usr/include/stdio.h:27:0,
                 from libretro.c:3:
/usr/include/features.h:188:0: note: this is the location of the previous definition
 # define _BSD_SOURCE 1
 ^
gcc -I. -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -marm -mfloat-abi=hard -DARM -DARM_ARCH -DARM_MEMORY_DYNAREC -DHAVE_STRINGS_H -DHAVE_STDINT_H -DHAVE_INTTYPES_H -D__LIBRETRO__ -DINLINE=inline -Wall -Werror=implicit-function-declaration -DHAVE_DYNAREC -DARM_ARCH   -DNDEBUG=1 -fPIC -DFRONTEND_SUPPORTS_RGB565 -O3 -DNDEBUG -c  -o libco/libco.o libco/libco.c
In file included from libco/libco.c:14:0:
libco/armeabi.c:39:13: warning: 'crash' defined but not used [-Wunused-function]
 static void crash(void)
             ^
gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -marm -mfloat-abi=hard -DARM -DARM_ARCH -DARM_MEMORY_DYNAREC -DHAVE_STRINGS_H -DHAVE_STDINT_H -DHAVE_INTTYPES_H -D__LIBRETRO__ -DINLINE=inline -Wall -Werror=implicit-function-declaration -DHAVE_DYNAREC -DARM_ARCH   -DNDEBUG=1 -fPIC -DFRONTEND_SUPPORTS_RGB565 -Wno-unused-variable -Wno-unused-label -O2 -DNDEBUG  -c -o cpu_threaded.o cpu_threaded.c
cpu_threaded.c: In function 'translate_block_arm':
cpu_threaded.c:3261:7: warning: variable 'flag_status' set but not used [-Wunused-but-set-variable]
   u32 flag_status;                                                            
       ^
cpu_threaded.c: In function 'translate_block_thumb':
cpu_threaded.c:3462:7: warning: variable 'last_condition' set but not used [-Wunused-but-set-variable]
   u32 last_condition;                                                         
       ^
/tmp/cc8HwzJJ.s: Assembler messages:
/tmp/cc8HwzJJ.s:49244: Warning: ignoring changed section attributes for .jit
/tmp/cc8HwzJJ.s:102235: Error: can't resolve `.jit' {.jit section} - `.Ltext0' {.text section}
/tmp/cc8HwzJJ.s:102236: Error: can't resolve `.jit' {.jit section} - `.Ltext0' {.text section}
/tmp/cc8HwzJJ.s:102239: Error: can't resolve `.jit' {.jit section} - `.Ltext0' {.text section}
/tmp/cc8HwzJJ.s:102240: Error: can't resolve `.jit' {.jit section} - `.Ltext0' {.text section}
/tmp/cc8HwzJJ.s:102243: Error: can't resolve `.jit' {.jit section} - `.Ltext0' {.text section}
/tmp/cc8HwzJJ.s:102244: Error: can't resolve `.jit' {.jit section} - `.Ltext0' {.text section}
/tmp/cc8HwzJJ.s:102250: Error: can't resolve `.jit' {.jit section} - `.Ltext0' {.text section}
[...] (zillions errors...)
/tmp/cc8HwzJJ.s:150734: Error: can't resolve `.jit' {.jit section} - `.Ltext0' {.text section}
/tmp/cc8HwzJJ.s:150735: Error: can't resolve `.jit' {.jit section} - `.Ltext0' {.text section}
/tmp/cc8HwzJJ.s:150736: Error: can't resolve `.jit' {.jit section} - `.Ltext0' {.text section}
make[2]: *** [cpu_threaded.o] Error 1
sergiobenrocha2 commented 9 years ago

It seems to be lack of RAM memory, I can't compile with dynarec support in Odroid C1 (1 GB ram).

aliaspider commented 9 years ago

well you either need mmap or support for the .jit section for your platform in order to use the dynarec. this is needed to get a memory buffer with write+execute rights.

try with make platform="armv hardfloat no-dynarec"

sergiobenrocha2 commented 9 years ago

I tried with no dynarec too, lacks of memory too.

andres-asm commented 6 years ago

I fixed this in my gameshell by adding 100MB swap and building again.

davidgfnet commented 3 years ago

This was recently changed, so that the RWX (jit) section is better handled by newer gcc. You should not use HAVE_MMAP=1 for ARM, the reason it's that it's just not valid. The real reason why we have a jit section is so that it lives near the text section, to allow for branches to cross over. If you mmap it, there's the risk the sections are "too far". MIPS does the same, and x86 doesn't care since it has full 32 bit jumps, so not an issue in that instruction set.