diff --git a/Dockerfile b/Dockerfile index dd567ca..a5a907e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -69,8 +69,9 @@ ENV CHANNEL=release # Build project # See https://github.com/rust-lang/rustc_codegen_gcc/blob/master/doc/tips.md#how-to-build-a-cross-compiling-libgccjit RUN cd rustc_codegen_gcc && ./y.sh prepare --cross -RUN CG_RUSTFLAGS="-Cpanic=abort -Copt-level=3" cd rustc_codegen_gcc && ./y.sh build --sysroot --features compiler_builtins/no-f16-f128 --target-triple m68k-unknown-linux-gnu --target /build/rustc_codegen_gcc/target_specs/m68k-unknown-linux-gnu.json --release - +#RUN CG_RUSTFLAGS="-Cpanic=abort -Copt-level=3" cd rustc_codegen_gcc && ./y.sh build --sysroot --features compiler_builtins/no-f16-f128 --target-triple m68k-unknown-linux-gnu --target /build/rustc_codegen_gcc/target_specs/m68k-unknown-linux-gnu.json --release +ENV CG_RUSTFLAGS="-Cpanic=abort -Crelocation-model=static -Copt-level=3" +RUN cd rustc_codegen_gcc && ./y.sh build --sysroot --features compiler_builtins/no-f16-f128 --target-triple m68k-unknown-linux-gnu --target /build/rustc_codegen_gcc/target_specs/m68k-unknown-linux-gnu.json --release ENV CG_RUSTFLAGS="-Cpanic=abort -Crelocation-model=static -Copt-level=s" # Build "megapong" PoC @@ -81,13 +82,14 @@ RUN cd rust-mega-drive && patch -p1 < /tmp/rust-mega-drive.patch && rm /tmp/rust # Compile rust code RUN cd rustc_codegen_gcc && ./y.sh cargo build --target /build/rustc_codegen_gcc/target_specs/m68k-unknown-linux-gnu.json --manifest-path /build/rust-mega-drive/examples/megapong/Cargo.toml --release +#RUN cd rust-mega-drive/examples/megapong && find && cat ../../Cargo.toml && false # Compile entrypoint + stdlib stub (should not be strictly necessary to reproduce) RUN cd rust-mega-drive/examples/megapong && m68k-elf-gcc -fno-exceptions -mcpu=68000 -T /build/rust-mega-drive/share/ldscripts/megadrive.x entry.S hack.c /build/rust-mega-drive/target/m68k-unknown-linux-gnu/release/libmegapong.a -o out.elf -O2 -nostartfiles -nostdlib -static -nolibc -s -flto -Wl,-gc-sections -ffunction-sections -fdata-sections -#RUN cd rust-mega-drive/examples/megapong && /usr/local/bin/m68k-elf-gcc -c entry.S -o entry.o -fno-exceptions -mcpu=68000 -#RUN cd rust-mega-drive/examples/megapong && /usr/local/bin/m68k-elf-gcc -c hack.c -o entry.o -fno-exceptions -mcpu=68000 +##RUN cd rust-mega-drive/examples/megapong && /usr/local/bin/m68k-elf-gcc -c entry.S -o entry.o -fno-exceptions -mcpu=68000 +##RUN cd rust-mega-drive/examples/megapong && /usr/local/bin/m68k-elf-gcc -c hack.c -o entry.o -fno-exceptions -mcpu=68000 -RUN false +#RUN false # Link everything