diff --git a/tests/Dockerfile b/tests/Dockerfile index 14258f4..c74ffef 100644 --- a/tests/Dockerfile +++ b/tests/Dockerfile @@ -1,5 +1,5 @@ # Start with a base image containing build tools and libraries -FROM ubuntu:latest as builder +FROM debian:stable # Set the working directory WORKDIR /src @@ -7,7 +7,7 @@ WORKDIR /src # Install necessary build tools RUN apt-get update && apt-get install -y \ build-essential \ - gcc \ + gcc # g++ \ # make \ # wget \ @@ -21,27 +21,23 @@ RUN apt-get update && apt-get install -y \ # Install cross-compilers for x86, ARM, MIPS, and RISC-V RUN apt-get install -y \ - gcc-multilib \ - gcc-arm-linux-gnueabihf \ - gcc-mips-linux-gnu \ - gcc-riscv64-linux-gnu \ - gcc-aarch64-linux-gnu + gcc-12-arm-linux-gnueabihf \ + gcc-12-mips-linux-gnu \ + gcc-12-riscv64-linux-gnu \ + gcc-12-aarch64-linux-gnu # Copy the C file into the container COPY test.c /src/ # Compile the C file for x86 -RUN gcc -c -O0 -o obj/test-x86-o0.o test.c \ - gcc -c -03 -o obj/test-x86-o3.o test.c \ +CMD gcc -c -O0 test.c -o ../obj/test-x86-o0.o && \ + gcc -c -O3 test.c -o ../obj/test-x86-o3.o && \ # Compile the C file for ARM - arm-linux-gnueabihf-gcc -c -O0 -o obj/test-arm-o0.o test.c \ - arm-linux-gnueabihf-gcc -c -O3 -o obj/test-arm-o3.o test.c \ + arm-linux-gnueabihf-gcc-12 -c -O0 test.c -o ../obj/test-arm-o0.o && \ + arm-linux-gnueabihf-gcc-12 -c -O3 test.c -o ../obj/test-arm-o3.o && \ # Compile the C file for MIPS - mips-linux-gnu-gcc -c -O0 -o obj/test-mips-o0.o test.c \ - mips-linux-gnu-gcc -c -O3 -o obj/test-mips-o3.o test.c \ + mips-linux-gnu-gcc-12 -c -O0 test.c -o ../obj/test-mips-o0.o && \ + mips-linux-gnu-gcc-12 -c -O3 test.c -o ../obj/test-mips-o3.o && \ # Compile the C file for RISC-V - riscv64-linux-gnu-gcc -c -O0 -o obj/test-riscv-o0.o test.c \ - riscv64-linux-gnu-gcc -c -03 -o obj/test-riscv-o3.o test.c - -# Set the default command (just listing the files as an example) -CMD ["ls", "-l"] \ No newline at end of file + riscv64-linux-gnu-gcc-12 -c -O0 test.c -o ../obj/test-riscv-o0.o && \ + riscv64-linux-gnu-gcc-12 -c -O3 test.c -o ../obj/test-riscv-o3.o diff --git a/tests/obj/test-arm-o0.o b/tests/obj/test-arm-o0.o new file mode 100644 index 0000000..954db07 Binary files /dev/null and b/tests/obj/test-arm-o0.o differ diff --git a/tests/obj/test-arm-o3.o b/tests/obj/test-arm-o3.o new file mode 100644 index 0000000..c223951 Binary files /dev/null and b/tests/obj/test-arm-o3.o differ diff --git a/tests/obj/test-mips-o0.o b/tests/obj/test-mips-o0.o new file mode 100644 index 0000000..8b112f3 Binary files /dev/null and b/tests/obj/test-mips-o0.o differ diff --git a/tests/obj/test-mips-o3.o b/tests/obj/test-mips-o3.o new file mode 100644 index 0000000..aec0448 Binary files /dev/null and b/tests/obj/test-mips-o3.o differ diff --git a/tests/obj/test-riscv-o0.o b/tests/obj/test-riscv-o0.o new file mode 100644 index 0000000..6b12242 Binary files /dev/null and b/tests/obj/test-riscv-o0.o differ diff --git a/tests/obj/test-riscv-o3.o b/tests/obj/test-riscv-o3.o new file mode 100644 index 0000000..fe81e13 Binary files /dev/null and b/tests/obj/test-riscv-o3.o differ diff --git a/tests/obj/test-x86-o0.o b/tests/obj/test-x86-o0.o new file mode 100644 index 0000000..910cf24 Binary files /dev/null and b/tests/obj/test-x86-o0.o differ diff --git a/tests/obj/test-x86-o3.o b/tests/obj/test-x86-o3.o new file mode 100644 index 0000000..5d95ee7 Binary files /dev/null and b/tests/obj/test-x86-o3.o differ diff --git a/tests/obj/test3_o0.o b/tests/obj/test3_o0.o deleted file mode 100644 index 4eff88e..0000000 Binary files a/tests/obj/test3_o0.o and /dev/null differ diff --git a/tests/obj/test3_o3.o b/tests/obj/test3_o3.o deleted file mode 100644 index aa005a8..0000000 Binary files a/tests/obj/test3_o3.o and /dev/null differ