Crosscompile Dockerfile fixed, new test obj files generated

This commit is contained in:
nicolas 2025-02-27 17:21:46 +01:00
parent 82335b686b
commit 11a06928cc
10 changed files with 7 additions and 6 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -35,8 +35,8 @@ CMD bash make_objs.sh gcc -O0 && \
bash make_objs.sh gcc -O3 && \ bash make_objs.sh gcc -O3 && \
bash make_objs.sh arm-linux-gnueabihf-gcc-12 -O0 && \ bash make_objs.sh arm-linux-gnueabihf-gcc-12 -O0 && \
bash make_objs.sh arm-linux-gnueabihf-gcc-12 -O3 && \ bash make_objs.sh arm-linux-gnueabihf-gcc-12 -O3 && \
bash make_objs.sh aarch64-linux-gnueabihf-gcc-12 -O0 && \ bash make_objs.sh aarch64-linux-gnu-gcc-12 -O0 && \
bash make_objs.sh aarch64-linux-gnueabihf-gcc-12 -O3 && \ bash make_objs.sh aarch64-linux-gnu-gcc-12 -O3 && \
bash make_objs.sh mips-linux-gnu-gcc-12 -O0 && \ bash make_objs.sh mips-linux-gnu-gcc-12 -O0 && \
bash make_objs.sh mips-linux-gnu-gcc-12 -O3 && \ bash make_objs.sh mips-linux-gnu-gcc-12 -O3 && \
bash make_objs.sh riscv64-linux-gnu-gcc-12 -O0 && \ bash make_objs.sh riscv64-linux-gnu-gcc-12 -O0 && \

View File

@ -7,14 +7,15 @@ if [ $# -lt 2 ]; then
fi fi
COMPILER=$1 COMPILER=$1
OPTIMIZATION_FLAG=$2 FLAGS=$2
# Check if there are any .c files in the directory # Check if there are any .c files in the directory
if ls *.c &> /dev/null; then if ls *.c &> /dev/null; then
for file in *.c; do for file in *.c; do
obj_file="${file%}_${COMPILER}_${OPTIMIZATION_FLAG}.o" obj_file="${file%}_${COMPILER}_${FLAGS}"
obj_file=$(echo "$obj_file" | sed 's/[^a-zA-Z0-9]/_/g' | sed 's/_\+/-/g')
echo "Compiling $file -> $obj_file with $COMPILER and $OPTIMIZATION_FLAG" echo "Compiling $file -> $obj_file with $COMPILER and $OPTIMIZATION_FLAG"
$COMPILER -c "$file" $OPTIMIZATION_FLAG -o "$obj_file" $COMPILER -c "$file" $FLAGS -o "../obj/$obj_file.o"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Compilation failed for $file" echo "Compilation failed for $file"
exit 1 exit 1