I am trying a tweak to the toolchain (to fix the problem mentioned above) and got the C++ to compile up to this point. C should work fine if you find it an acceptable substitute.Moon-Watcher wrote:I used noname22's script it and got this error building the MD TicTacToe on C++
Code: Select all
t800@cabronazo:~/Escritorio/TicTacToe/C++/MD$ make -f Makefile m68k-elf-g++ -T /opt/toolchains/gen/ldscripts/md.ld -Wl,-Map=output.map -nostdlib -ffreestanding -fno-rtti crt0.o crtstuff.o main.o hw_md.o font.o -L/opt/toolchains/gen/m68k-elf/lib -L/opt/toolchains/gen/m68k-elf/m68k-elf/lib -lstdc++ -lc -lgcc -lnosys -o TicTacToe.elf /opt/toolchains/gen/m68k-elf/m68k-elf/lib/libc.a(lib_a-closer.o): En la función `_close_r': /home/t800/megadrive-gcc-master/build/build-newlib-m68k-elf-2.0.0/m68k-elf/newlib/libc/reent/../../../../../newlib-2.0.0/newlib/libc/reent/closer.c:53: aviso: _close is not implemented and will always fail /opt/toolchains/gen/m68k-elf/m68k-elf/lib/libc.a(lib_a-fstatr.o): En la función `_fstat_r': /home/t800/megadrive-gcc-master/build/build-newlib-m68k-elf-2.0.0/m68k-elf/newlib/libc/reent/../../../../../newlib-2.0.0/newlib/libc/reent/fstatr.c:62: aviso: _fstat is not implemented and will always fail /opt/toolchains/gen/m68k-elf/m68k-elf/lib/libc.a(lib_a-signalr.o): En la función `_getpid_r': /home/t800/megadrive-gcc-master/build/build-newlib-m68k-elf-2.0.0/m68k-elf/newlib/libc/reent/../../../../../newlib-2.0.0/newlib/libc/reent/signalr.c:96: aviso: _getpid is not implemented and will always fail /opt/toolchains/gen/m68k-elf/m68k-elf/lib/libc.a(lib_a-isattyr.o): En la función `_isatty_r': /home/t800/megadrive-gcc-master/build/build-newlib-m68k-elf-2.0.0/m68k-elf/newlib/libc/reent/../../../../../newlib-2.0.0/newlib/libc/reent/isattyr.c:58: aviso: _isatty is not implemented and will always fail /opt/toolchains/gen/m68k-elf/m68k-elf/lib/libc.a(lib_a-signalr.o): En la función `_kill_r': /home/t800/megadrive-gcc-master/build/build-newlib-m68k-elf-2.0.0/m68k-elf/newlib/libc/reent/../../../../../newlib-2.0.0/newlib/libc/reent/signalr.c:61: aviso: _kill is not implemented and will always fail /opt/toolchains/gen/m68k-elf/m68k-elf/lib/libstdc++.a(basic_file.o): En la función `std::__basic_file<char>::seekoff(long long, std::_Ios_Seekdir)': /home/t800/megadrive-gcc-master/build/build-gcc-m68k-elf-4.9.1/m68k-elf/libstdc++-v3/src/c++98/basic_file.cc:327: aviso: _lseek is not implemented and will always fail /opt/toolchains/gen/m68k-elf/m68k-elf/lib/libc.a(lib_a-openr.o): En la función `_open_r': /home/t800/megadrive-gcc-master/build/build-newlib-m68k-elf-2.0.0/m68k-elf/newlib/libc/reent/../../../../../newlib-2.0.0/newlib/libc/reent/openr.c:59: aviso: _open is not implemented and will always fail /opt/toolchains/gen/m68k-elf/m68k-elf/lib/libstdc++.a(basic_file.o): En la función `std::__basic_file<char>::xsgetn(char*, long)': /home/t800/megadrive-gcc-master/build/build-gcc-m68k-elf-4.9.1/m68k-elf/libstdc++-v3/src/c++98/basic_file.cc:289: aviso: _read is not implemented and will always fail /opt/toolchains/gen/m68k-elf/m68k-elf/lib/libstdc++.a(pure.o): En la función `__cxa_pure_virtual': /home/t800/megadrive-gcc-master/build/build-gcc-m68k-elf-4.9.1/m68k-elf/libstdc++-v3/libsupc++/../../../../gcc-4.9.1/libstdc++-v3/libsupc++/pure.cc:49: aviso: _write is not implemented and will always fail /opt/toolchains/gen/m68k-elf/lib/gcc/m68k-elf/4.9.1/../../../../m68k-elf/bin/ld: la sección .gcc_except_table._ZNSt8ios_base4InitC2Ev.part.10 cargada en [0000000000000000,000000000000005b] sobreescribe la sección .text cargada en [0000000000000000,0000000000073e31] collect2: error: ld devolvió el estado de salida 1 make: *** [TicTacToe.elf] Error 1
Does anyone knows how to solve this?
Ops, forgot to mention it's a Mind Debian EditionCode: Select all
collect2: error: ld devolvió el estado de salida 1
Code: Select all
$ uname -a Linux cabronazo 3.11-2-amd64 #1 SMP Debian 3.11.8-1 (2013-11-13) x86_64 GNU/Linux
This problem is the link script (md.ld perhaps). Something internal to GCC is larger than the space allotted to it in the link script, so it's steamrolling over space allotted to whatever "text" is. Unfortunately I don't know how to fix it, as I'm not well versed in GCC's link script feature.