ps2toolchain: Problem with (iop|ee)-as preprocessing on OS X
I’ve run into a problem while compiling the SDK on macOS 10.12.3. It seems that iop-as and ee-as (and probably dvp-as though I haven’t run into it) will not do any preprocessing when given a *.S file. When I get to building ps2sdk, I get this:
make[2]: Entering directory '/usr/local/ps2dev/build/ps2sdk/iop/debug'
make -C iopdebug
make[3]: Entering directory '/usr/local/ps2dev/build/ps2sdk/iop/debug/iopdebug'
mkdir -p obj/
mkdir -p irx/
iop-gcc -D_IOP -fno-builtin -O2 -G0 -Wall -I/usr/local/ps2dev/build/ps2sdk/iop/kernel/include -I/usr/local/ps2dev/build/ps2sdk/common/include -Iinclude/ -c src/main.c -o obj/main.o
iop-gcc -D_IOP -fno-builtin -O2 -G0 -Wall -I/usr/local/ps2dev/build/ps2sdk/iop/kernel/include -I/usr/local/ps2dev/build/ps2sdk/common/include -Iinclude/ -c src/iop_debug.c -o obj/iop_debug.o
iop-as -march=r3000 -EL -G0 src/iop_exceptions.S -o obj/iop_exceptions.o
src/iop_exceptions.S: Assembler messages:
src/iop_exceptions.S:48: Warning: rest of line ignored; first ignored character is `/'
src/iop_exceptions.S:60: Warning: rest of line ignored; first ignored character is `/'
src/iop_exceptions.S:64: Warning: rest of line ignored; first ignored character is `/'
src/iop_exceptions.S:66: Warning: rest of line ignored; first ignored character is `/'
src/iop_exceptions.S:68: Error: illegal operands `mfhi'
src/iop_exceptions.S:69: Error: illegal operands `mflo'
src/iop_exceptions.S:70: Error: unrecognized opcode `nop// necessary??'
src/iop_exceptions.S:73: Error: unrecognized opcode `nop// necessary??'
src/iop_exceptions.S:75: Error: illegal operands `mfc0 $t0,$3//IOP_COP0_BPC'
src/iop_exceptions.S:76: Error: illegal operands `mfc0 $t1,$5//IOP_COP0_BDA'
src/iop_exceptions.S:77: Error: illegal operands `mfc0 $t2,$8//IOP_COP0_BADVADDR'
src/iop_exceptions.S:78: Error: illegal operands `mfc0 $t3,$9//IOP_COP0_BDAM'
src/iop_exceptions.S:79: Error: illegal operands `mfc0 $t4,$11//IOP_COP0_BPCM'
src/iop_exceptions.S:80: Error: illegal operands `mfc0 $t5,$12//SR'
src/iop_exceptions.S:81: Error: illegal operands `mfc0 $t6,$13//Cause'
src/iop_exceptions.S:82: Error: illegal operands `mfc0 $t7,$14//EPC'
src/iop_exceptions.S:86: Warning: rest of line ignored; first ignored character is `/'
src/iop_exceptions.S:101: Warning: rest of line ignored; first ignored character is `/'
src/iop_exceptions.S:113: Warning: rest of line ignored; first ignored character is `/'
src/iop_exceptions.S:125: Warning: rest of line ignored; first ignored character is `/'
src/iop_exceptions.S:129: Warning: rest of line ignored; first ignored character is `/'
src/iop_exceptions.S:131: Warning: rest of line ignored; first ignored character is `/'
src/iop_exceptions.S:135: Error: illegal operands `mthi'
src/iop_exceptions.S:136: Error: illegal operands `mtlo'
src/iop_exceptions.S:142: Error: illegal operands `mtc0 $t0,$3//IOP_COP0_BPC'
src/iop_exceptions.S:143: Error: illegal operands `mtc0 $t1,$5//IOP_COP0_BDA'
src/iop_exceptions.S:145: Warning: rest of line ignored; first ignored character is `/'
src/iop_exceptions.S:148: Error: illegal operands `mtc0 $t2,$8//IOP_COP0_BADVADDR'
src/iop_exceptions.S:149: Error: illegal operands `mtc0 $t3,$9//IOP_COP0_BDAM'
src/iop_exceptions.S:153: Error: illegal operands `mtc0 $t4,$11//IOP_COP0_BPCM'
src/iop_exceptions.S:154: Error: illegal operands `mtc0 $t5,$12//SR'
src/iop_exceptions.S:158: Error: illegal operands `mtc0 $t6,$13//Cause'
src/iop_exceptions.S:159: Error: illegal operands `mtc0 $t7,$14//EPC'
src/iop_exceptions.S:205: Error: illegal operands `sw'
src/iop_exceptions.S:206: Error: illegal operands `sw'
src/iop_exceptions.S:207: Error: illegal operands `mfc0 $s0,IOP_COP0_DCIC'
src/iop_exceptions.S:208: Error: illegal operands `sw'
src/iop_exceptions.S:209: Error: illegal operands `lw'
src/iop_exceptions.S:210: Error: illegal operands `sw'
src/iop_exceptions.S:211: Error: illegal operands `sw'
src/iop_exceptions.S:212: Error: illegal operands `lw'
src/iop_exceptions.S:213: Error: expression too complex
src/iop_exceptions.S:218: Error: illegal operands `lw'
src/iop_exceptions.S:219: Error: illegal operands `lw'
src/iop_exceptions.S:220: Error: illegal operands `lw'
src/iop_exceptions.S:222: Error: illegal operands `lw'
src/iop_exceptions.S:224: Error: illegal operands `mtc0 $k1,IOP_COP0_DCIC'
src/iop_exceptions.S:229: Error: illegal operands `mtc0 $k1,$14//EPC'
src/iop_exceptions.S:230: Error: illegal operands `lw'
src/iop_exceptions.S:255: Error: illegal operands `sw'
src/iop_exceptions.S:256: Error: illegal operands `sw'
src/iop_exceptions.S:257: Error: illegal operands `sw'
src/iop_exceptions.S:258: Error: illegal operands `lw'
src/iop_exceptions.S:259: Error: illegal operands `lw'
src/iop_exceptions.S:260: Error: illegal operands `sw'
src/iop_exceptions.S:261: Error: illegal operands `sw'
src/iop_exceptions.S:262: Error: expression too complex
src/iop_exceptions.S:267: Error: illegal operands `lw'
src/iop_exceptions.S:268: Error: illegal operands `lw'
src/iop_exceptions.S:269: Error: illegal operands `lw'
src/iop_exceptions.S:271: Error: illegal operands `lw'
src/iop_exceptions.S:273: Error: illegal operands `mtc0 $k1,IOP_COP0_DCIC'
src/iop_exceptions.S:278: Error: illegal operands `mtc0 $k1,$14//EPC'
src/iop_exceptions.S:279: Error: illegal operands `lw'
make[3]: *** [/usr/local/ps2dev/build/ps2sdk/iop/Rules.make:53: obj/iop_exceptions.o] Error 1
make[3]: Leaving directory '/usr/local/ps2dev/build/ps2sdk/iop/debug/iopdebug'
make[2]: *** [/usr/local/ps2dev/build/ps2sdk/Rules.make:21: all-iopdebug] Error 2
make[2]: Leaving directory '/usr/local/ps2dev/build/ps2sdk/iop/debug'
make[1]: *** [/usr/local/ps2dev/build/ps2sdk/Rules.make:21: all-debug] Error 2
make[1]: Leaving directory '/usr/local/ps2dev/build/ps2sdk/iop'
make: *** [makefile:31: all-iop] Error 2
I can work around this by manually running the preprocessor to output a *.s file (in this case, running mv src/iop_exceptions.S src/iop_exceptions.S.S; iop-gcc -E -o src/iop_exceptions.S src/iop_exceptions.S.S). This is a pain, since I have to build until it errors out, then manually run the preprocessor with the correct include flags and then re-run make … and wait for the next error. Note that the build does complete successfully after doing this (and works), but I’d rather not have to do this.
I’m not sure what the problem is. Binutils builds without any errors, though it has about a billion warnings. Here’s the output from doing ./toolchain.sh 001 (compressed because the log is 2.7 MB) (I also edited the build script to use only 1 processor - no other changes made)
binutils-2.14.log.gz (oops, the extension should be .tar.gz - my fault. Not re-upping just to correct the file extension)
Let me know if there’s anything else that I can provide to help resolve this issue.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (9 by maintainers)
Well, seems I wasted everyone’s time. My apologies. It’s all building fine now. I have absolutely no idea why I was getting errors before. Possibly because I just updated over my old ps2dev stuff and something wasn’t cleared out correctly. Though that doesn’t entirely explain why it worked when I did the same from a case sensitive filesystem.
Thanks, @sp193 & @uyjulian for helping out with this, and again apologies for it not actually being a problem.