stencil build script updated

This commit is contained in:
Nicolas 2026-02-28 22:09:12 +01:00
parent 436a09c1ea
commit afc442ada6
1 changed files with 40 additions and 7 deletions

View File

@ -1,13 +1,13 @@
#!/bin/bash
set -eux
set -eu
ARCH=${1:-x86_64}
case "$ARCH" in
(x86_64|arm-v6|arm-v7|arm-v7-thumb|all)
(x86_64|arm-v6|arm-v7|arm-v7-thumb|arm-v7m-thumb|all)
;;
(*)
echo "Usage: $0 [x86_64|arm-v6|arm-v7|arm-v6-thumb|all]"
echo "Usage: $0 [x86_64|arm-v6|arm-v7|arm-v6-thumb|arm-v7m-thumb|all]"
exit 1
;;
esac
@ -109,20 +109,20 @@ if [[ "$ARCH" == "arm-v7" || "$ARCH" == "all" ]]; then
fi
#######################################
# ARM v7 thumb
# ARM v7 thumb Cortex-A
#######################################
if [[ "$ARCH" == "arm-v7-thumb" || "$ARCH" == "all" ]]; then
echo "--------------arm-v7-thumb 32 bit----------------"
echo "--------------arm-v7a-thumb 32 bit----------------"
LIBGCC=$(arm-none-eabi-gcc -print-libgcc-file-name)
arm-none-eabi-gcc -fno-pic -ffunction-sections \
-march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb \
-march=armv7-a -mfpu=neon-vfpv3 -mfloat-abi=hard -mthumb \
-c $SRC -O3 -o build/stencils/stencils.o
arm-none-eabi-ld -r \
build/stencils/stencils.o \
build/musl/musl_objects_armv7thumb.o \
build/musl/musl_objects_armv7.o \
$LIBGCC \
-o $DEST/stencils_armv7thumb_O3.o
@ -130,6 +130,39 @@ if [[ "$ARCH" == "arm-v7-thumb" || "$ARCH" == "all" ]]; then
$DEST/stencils_armv7thumb_O3.o \
> build/stencils/stencils_armv7thumb_O3.asm
arm-linux-gnueabihf-gcc \
-march=armv7-a -mfpu=neon-vfpv3 -mfloat-abi=hard -mthumb -static \
-Wall -Wextra -Wconversion -Wsign-conversion \
-Wshadow -Wstrict-overflow -O3 \
-DENABLE_LOGGING \
src/coparun/runmem.c \
src/coparun/coparun.c \
src/coparun/mem_man.c \
-o build/runner/coparun-armv7thumb
fi
#######################################
# ARM v7 thumb Cortex-M
#######################################
if [[ "$ARCH" == "arm-v7m-thumb" || "$ARCH" == "all" ]]; then
echo "--------------arm-v7m-thumb 32 bit----------------"
LIBGCC=$(arm-none-eabi-gcc -print-libgcc-file-name)
arm-none-eabi-gcc -fno-pic -ffunction-sections \
-march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb \
-c $SRC -O3 -o build/stencils/stencils.o
arm-none-eabi-ld -r \
build/stencils/stencils.o \
build/musl/musl_objects_armv7mthumb.o \
$LIBGCC \
-o $DEST/stencils_armv7mthumb_O3.o
arm-none-eabi-objdump -d -x \
$DEST/stencils_armv7mthumb_O3.o \
> build/stencils/stencils_armv7mthumb_O3.asm
arm-linux-gnueabihf-gcc \
-march=armv7-a -mfpu=neon-vfpv3 -mfloat-abi=hard -mthumb -static \
-Wall -Wextra -Wconversion -Wsign-conversion \