mirror of https://github.com/Nonannet/pelfy.git
Crosscompile Dockerfile fixed, new test obj files generated
This commit is contained in:
parent
82335b686b
commit
11a06928cc
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.
|
@ -35,11 +35,11 @@ CMD bash make_objs.sh gcc -O0 && \
|
|||
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 -O3 && \
|
||||
bash make_objs.sh aarch64-linux-gnueabihf-gcc-12 -O0 && \
|
||||
bash make_objs.sh aarch64-linux-gnueabihf-gcc-12 -O3 && \
|
||||
bash make_objs.sh aarch64-linux-gnu-gcc-12 -O0 && \
|
||||
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 -O3 && \
|
||||
bash make_objs.sh riscv64-linux-gnu-gcc-12 -O0 && \
|
||||
bash make_objs.sh riscv64-linux-gnu-gcc-12 -O3 && \
|
||||
bash make_objs.sh riscv64-linux-gnu-gcc-12 "-O0 -march=rv32imac -mabi=ilp32" && \
|
||||
bash make_objs.sh riscv64-linux-gnu-gcc-12 "-O3 -march=rv32imac -mabi=ilp32"
|
||||
bash make_objs.sh riscv64-linux-gnu-gcc-12 "-O3 -march=rv32imac -mabi=ilp32"
|
||||
|
|
|
@ -7,14 +7,15 @@ if [ $# -lt 2 ]; then
|
|||
fi
|
||||
|
||||
COMPILER=$1
|
||||
OPTIMIZATION_FLAG=$2
|
||||
FLAGS=$2
|
||||
|
||||
# Check if there are any .c files in the directory
|
||||
if ls *.c &> /dev/null; then
|
||||
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"
|
||||
$COMPILER -c "$file" $OPTIMIZATION_FLAG -o "$obj_file"
|
||||
$COMPILER -c "$file" $FLAGS -o "../obj/$obj_file.o"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Compilation failed for $file"
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue