From 0fe6f2423f01bc5bdbc14c5c322c83de8ad3196f Mon Sep 17 00:00:00 2001 From: Levon Gevorgyan Date: Wed, 3 Sep 2025 20:50:33 -0500 Subject: [PATCH] -march updates --- Jenkinsfile | 10 +++++----- lib/build.sh | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0a3d9c4..65bfb4d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,7 +18,7 @@ pipeline { stage('build docker image') { matrix { axes { - axis { name 'DISTRO'; values 'ubuntu-24.04', 'fedora-42', 'fedora-41', 'debian-13', 'archlinux-latest' } + axis { name 'DISTRO'; values 'ubuntu-24.04', 'fedora-42', 'debian-13', 'archlinux-latest' } } stages { stage('build multiarch image') { @@ -51,14 +51,14 @@ pipeline { stage('build ffmpeg on linux') { matrix { axes { - axis { name 'LABEL_ARCH'; values 'arm64', 'amd64' } - axis { name 'DISTRO'; values 'ubuntu-24.04', 'fedora-42', 'fedora-41', 'debian-13', 'archlinux-latest' } - axis { name 'OPT_LTO'; values 'OPT=0 LTO=false', 'OPT=2 LTO=false', 'OPT=3 LTO=true' } + axis { name 'ARCH'; values 'armv8-a', 'x86-64-v3' } + axis { name 'DISTRO'; values 'ubuntu-24.04', 'fedora-42', 'debian-13', 'archlinux-latest' } + axis { name 'OPT_LTO'; values 'OPT=0 LTO=false', 'OPT=3 LTO=true' } axis { name 'STATIC'; values 'true', 'false' } } stages { stage('build ffmpeg on linux using docker') { - agent { label "linux && ${LABEL_ARCH}" } + agent { label "linux && ${ARCH}" } steps { withDockerCreds { sh "STATIC=${STATIC} ${OPT_LTO} ./scripts/docker_run_image.sh ${DISTRO}" diff --git a/lib/build.sh b/lib/build.sh index fa4ccab..fdd313e 100644 --- a/lib/build.sh +++ b/lib/build.sh @@ -120,17 +120,17 @@ set_compile_opts() { fi # architecture/cpu compile flags - # arm prefers -mcpu over -march + # arm prefers -mcpu over -march for native builds # https://community.arm.com/arm-community-blogs/b/tools-software-ides-blog/posts/compiler-flags-across-architectures-march-mtune-and-mcpu - # and can fail static builds with -fpic - # warning: too many GOT entries for -fpic, please recompile with -fPIC local arch_flags=() - if [[ ${HOSTTYPE} == "x86_64" ]]; then - arch_flags+=("-march=${CPU}") - elif [[ ${HOSTTYPE} == "aarch64" ]]; then + if [[ ${HOSTTYPE} == "aarch64" && "${CPU}" == 'native' ]]; then arch_flags+=("-mcpu=${CPU}") + else + arch_flags+=("-march=${CPU}") fi + # can fail static builds with -fpic + # warning: too many GOT entries for -fpic, please recompile with -fPIC C_FLAGS+=("${arch_flags[@]}" "-fPIC") CXX_FLAGS=("${C_FLAGS[@]}") CPP_FLAGS=("${C_FLAGS[@]}")