mirror of
https://github.com/levogevo/ffmpeg-builder.git
synced 2026-01-15 19:06:17 +00:00
-march updates
This commit is contained in:
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@@ -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}"
|
||||
|
||||
12
lib/build.sh
12
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[@]}")
|
||||
|
||||
Reference in New Issue
Block a user