decompals / ido-static-recomp

IDO static recomp
43 stars 10 forks source link

-MDupdate doesn't work on 5.3 #55

Open AloXado320 opened 1 year ago

AloXado320 commented 1 year ago

On my sm64 libultra_cleanup branch, i tried to add back dependency files like how IDO does it but i get Assertion 0 && "fcntl not implemented" failed. On qemu-irix it works fine however.

Recomp:

aloxado320@DESKTOP-J54GG9G:~/sm64_alo$ make -j4 VERSION=jp
Building general tools...
Building sm64tools...
Building ROM...
Compiling: lib/ultra/io/conteepread.c -> build/jp/lib/ultra/io/conteepread.o
tools/ido-static-recomp/build/out/cc -c -non_shared -Wab,-r4300_mul -Xcpluscomm -Xfullwarn -G 0 -signed -32 -nostdinc -D_LANGUAGE_C -Iinclude -Ibuild/jp -Ibuild/jp/include -Isrc -I. -Iinclude/gcc -DVERSION_JP=1 -DF3D_OLD=1 -D_FINALROM=1 -DTARGET_N64=1 -DLIBULTRA_VERSION=1 -DLIBULTRA_REVISION=0  -mips2 -o build/jp/lib/ultra/io/conteepread.o lib/ultra/io/conteepread.c -MDupdate build/jp/lib/ultra/io/conteepread.d
cfe: libc_impl.c:2430: wrapper_fcntl: Assertion `0 && "fcntl not implemented"' failed.
Fatal error in: /usr/lib/cfe  child died due to signal 6.
Fatal error in: /usr/lib/cfe  Signal 6
make: *** [libultra.mk:213: build/jp/lib/ultra/io/conteepread.o] Error 6

qemu-irix (Native):

aloxado320@DESKTOP-J54GG9G:~/sm64_alo$ make -j4 VERSION=jp USE_QEMU_IRIX=1
Building general tools...
Building sm64tools...
Building ROM...
Compiling: lib/ultra/io/conteepread.c -> build/jp/lib/ultra/io/conteepread.o
/usr/bin/qemu-irix -silent -L tools/ido5.3_compiler tools/ido5.3_compiler/usr/bin/cc -c -non_shared -Wab,-r4300_mul -Xcpluscomm -Xfullwarn -G 0 -signed -32 -nostdinc -D_LANGUAGE_C -Iinclude -Ibuild/jp -Ibuild/jp/include -Isrc -I. -Iinclude/gcc -DVERSION_JP=1 -DF3D_OLD=1 -D_FINALROM=1 -DTARGET_N64=1 -DLIBULTRA_VERSION=1 -DLIBULTRA_REVISION=0  -mips2 -o build/jp/lib/ultra/io/conteepread.o lib/ultra/io/conteepread.c -MDupdate build/jp/lib/ultra/io/conteepread.d
Linking libultra:  build/jp/libultra.a
Linking ELF file:  build/jp/sm64.jp.elf
Building ROM: build/jp/sm64.jp.elf -> build/jp/sm64.jp.z64
Checking if ROM matches..
sm64.jp: OK
simonlindholm commented 1 year ago

If you want to help debug it you could create a stub fcntl that just prints its arguments, and check whether it works as a no-op, or else what arguments it gets passed.