strnge error when compiling with custom flags [message #5857] |
Mon, 06 May 2019 21:08 |
|
i try to compile mednafen with gcc 4.7 due does not are memory hungry when i try to hard optimize using flags.. and got that error (las error lines and the cflags added also are here), but quite xtrange in other computer was compiled perfectly.. now i cannot compiled anymore.. some help please:
-fno-PIE -fwrapv -fjump-tables -fexceptions -fomit-frame-pointer -O3 -march=i586 -mtune=pentium -mmmx -c -o md/debug.o md/debug.cpp
[ 304s] md/debug.cpp: In function 'void MDFN_IEN_MD::DBG_BusRMW(uint32, uint8 (__attribute__((fastcall)) *)(M68K*, uint8))':
[ 304s] md/debug.cpp:331:1: error: unable to find a register to spill in class 'CLOBBERED_REGS'
[ 304s] md/debug.cpp:331:1: error: this is the insn:
[ 304s] (call_insn/j 34 33 35 7 (set (reg:QI 0 ax)
[ 304s] (call (mem:QI (reg/v/f:SI 4 si [orig:70 cb ] [70]) [0 *cb_5(D) S1 A8])
[ 304s] (const_int 0 [0]))) md/debug.cpp:330 634 {*sibcall_value}
[ 304s] (expr_list:REG_DEAD (reg/v/f:SI 4 si [orig:70 cb ] [70])
[ 304s] (expr_list:REG_DEAD (reg:SI 2 cx)
[ 304s] (expr_list:REG_DEAD (reg:SI 1 dx)
[ 304s] (expr_list:REG_UNUSED (reg:QI 0 ax)
[ 304s] (nil)))))
[ 304s] (expr_list:REG_BR_PRED (use (reg:SI 2 cx))
[ 304s] (expr_list:REG_BR_PRED (use (reg:SI 1 dx))
[ 304s] (nil))))
[ 304s] md/debug.cpp:331: confused by earlier errors, bailing out
[Updated on: Mon, 06 May 2019 21:10]
|
|
Re: strnge error when compiling with custom flags [message #5858 is a reply to message #5857 ] |
Tue, 07 May 2019 00:29 |
|
Which GCC version? Maybe you have been hit by a GCC bug fixed in 4.7.2.
|
|
Re: strnge error when compiling with custom flags [message #5860 is a reply to message #5858 ] |
Wed, 08 May 2019 23:02 |
|
ilogic.. i compile mednafen pre 0.9.1X with gcc 3.4 perfectly ..
i using gcc 4.7.2 in fact!
|
|
Re: strnge error when compiling with custom flags [message #5878 is a reply to message #5857 ] |
Fri, 07 June 2019 07:31 |
|
as the gcc bug said.. i removed the "mtune=pentium" and only left "march=686" also removed any extra optimizations..
but now have this prblem:
[ 1239s] g++ -std=gnu++11 -fsigned-char -DHAVE_CONFIG_H -I../include -I../include -I../intl -fno-fast-math -fno-unsafe-math-optimizations -fomit-frame-pointer -fstrict-aliasing -Wall -Wshadow -Wempty-body -Wignored-qualifiers -Wvla -Wvariadic-macros -Wdisabled-optimization -fno-pic -fno-pie -fno-PIC -fno-PIE -fwrapv -fjump-tables -mcmodel=small -fexceptions -fomit-frame-pointer -O2 -msse -c -o snes_faust/cpu.o snes_faust/cpu.cpp
[ 1279s] snes_faust/cpu.cpp: In function 'void MDFN_IEN_SNES_FAUST::CPU_Run()':
[ 1279s] snes_faust/cpu.cpp:1019:13: error: inlining failed in call to always_inline 'void MDFN_IEN_SNES_FAUST::Core65816::Instr_LD(EAT (MDFN_IEN_SNES_FAUST::Core65816::*)(), void (MDFN_IEN_SNES_FAUST::Core65816::*)(T)) [with T = short unsigned int; EAT = unsigned int]': mismatched arguments
|
|
Re: strnge error when compiling with custom flags [message #5879 is a reply to message #5857 ] |
Fri, 07 June 2019 07:58 |
|
seems mednafen hav a bad coding standar..due i must removing -msse due some inlining behaviour..
i cannot set any see without set sse4.1 so then i must compile only with mmx so able to build..
not so great that development behaviour so deorganizated and no possibility to follow the coding changes...
|
|
Re: strnge error when compiling with custom flags [message #5888 is a reply to message #5857 ] |
Sun, 09 June 2019 15:37 |
|
i forgont to post the right correction:
due i was compiled a 0.9.48, to this version can compiled with gcc 4.6 , 4.7 and 4.8 need remove any optimization level.. (no -OX added to parameter and CXXFLAGS) later applied the patch in https://forum.fobby.net/index.php?t=tree&&th=1801&goto=5885
the code that compiles ok without problem are track to 0.9.36.5 since that seems 0.9.42 still compiles with gcc 4.7, 4.8 and 4.6... that bug was introduced with c++11 specific codgin
seems was solven in some point of 1.X release.. if i found what veriso i'll post back here.. a git repo will be usefully as the libretro bettle repo does (and as can see them, most of patch works for bug resolving here in original mednafen)
[Updated on: Sun, 09 June 2019 15:39]
|
|