From 9d2d4b107308a969c93e59844e9859ebe00ac541 Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Thu, 18 Apr 2024 22:23:31 +0100 Subject: [PATCH] fix rubberband x86-64 builds on xcode 15.x --- scripts/function-ios.sh | 8 ++++---- scripts/function-macos.sh | 23 ++++++++++------------- scripts/function-tvos.sh | 18 +++++++++--------- 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/scripts/function-ios.sh b/scripts/function-ios.sh index 8dcf328..42865d7 100755 --- a/scripts/function-ios.sh +++ b/scripts/function-ios.sh @@ -223,6 +223,9 @@ get_app_specific_cflags() { libwebp | xvidcore) APP_FLAGS="-fno-common -DPIC" ;; + openh264 | openssl | x265) + APP_FLAGS="-Wno-unused-function" + ;; sdl) APP_FLAGS="-DPIC -Wno-declaration-after-statement -Wno-unused-function -D__IPHONEOS__" ;; @@ -232,9 +235,6 @@ get_app_specific_cflags() { soxr | snappy) APP_FLAGS="-std=gnu99 -Wno-unused-function -DPIC" ;; - openh264 | openssl | x265) - APP_FLAGS="-Wno-unused-function" - ;; *) APP_FLAGS="-std=c99 -Wno-unused-function" ;; @@ -310,7 +310,7 @@ get_cxxflags() { echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; rubberband) - echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" + echo "-fno-rtti -Wno-c++11-narrowing ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; srt | tesseract | zimg) echo "-std=c++11 ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" diff --git a/scripts/function-macos.sh b/scripts/function-macos.sh index acc752d..635b371 100755 --- a/scripts/function-macos.sh +++ b/scripts/function-macos.sh @@ -102,7 +102,6 @@ get_arch_specific_cflags() { } get_size_optimization_cflags() { - local ARCH_OPTIMIZATION="" case ${ARCH} in arm64) @@ -117,7 +116,6 @@ get_size_optimization_cflags() { } get_size_optimization_asm_cflags() { - local ARCH_OPTIMIZATION="" case $1 in jpeg | ffmpeg) @@ -139,18 +137,17 @@ get_size_optimization_asm_cflags() { } get_app_specific_cflags() { - local APP_FLAGS="" case $1 in - fontconfig) - APP_FLAGS="-std=c99 -Wno-unused-function" - ;; ffmpeg) APP_FLAGS="-Wno-unused-function -Wno-deprecated-declarations" ;; ffmpeg-kit) APP_FLAGS="-std=c99 -Wno-unused-function -Wall -Wno-deprecated-declarations -Wno-pointer-sign -Wno-switch -Wno-unused-result -Wno-unused-variable -DPIC -fobjc-arc" ;; + fontconfig) + APP_FLAGS="-std=c99 -Wno-unused-function" + ;; gnutls) APP_FLAGS="-std=c99 -Wno-unused-function -D_GL_USE_STDLIB_ALLOC=1" ;; @@ -166,6 +163,9 @@ get_app_specific_cflags() { libwebp | xvidcore) APP_FLAGS="-fno-common -DPIC" ;; + openh264 | x265) + APP_FLAGS="-Wno-unused-function" + ;; sdl) APP_FLAGS="-DPIC -Wno-unused-function -D__MACOSX__" ;; @@ -175,9 +175,6 @@ get_app_specific_cflags() { soxr | snappy) APP_FLAGS="-std=gnu99 -Wno-unused-function -DPIC" ;; - openh264 | x265) - APP_FLAGS="-Wno-unused-function" - ;; *) APP_FLAGS="-std=c99 -Wno-unused-function" ;; @@ -227,9 +224,6 @@ get_cxxflags() { local BITCODE_FLAGS="" case $1 in - x265) - echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS}" - ;; gnutls) echo "-std=c++11 -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; @@ -246,11 +240,14 @@ get_cxxflags() { echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; rubberband) - echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" + echo "-fno-rtti -Wno-c++11-narrowing ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; srt | tesseract | zimg) echo "-std=c++11 ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; + x265) + echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS}" + ;; *) echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; diff --git a/scripts/function-tvos.sh b/scripts/function-tvos.sh index b1a608e..92e5f30 100755 --- a/scripts/function-tvos.sh +++ b/scripts/function-tvos.sh @@ -181,6 +181,9 @@ get_app_specific_cflags() { ffmpeg) APP_FLAGS="-Wno-unused-function -Wno-deprecated-declarations" ;; + ffmpeg-kit) + APP_FLAGS="-std=c99 -Wno-unused-function -Wall -Wno-deprecated-declarations -Wno-pointer-sign -Wno-switch -Wno-unused-result -Wno-unused-variable -DPIC -fobjc-arc" + ;; gnutls) APP_FLAGS="-std=c99 -Wno-unused-function -D_GL_USE_STDLIB_ALLOC=1" ;; @@ -196,8 +199,8 @@ get_app_specific_cflags() { libwebp | xvidcore) APP_FLAGS="-fno-common -DPIC" ;; - ffmpeg-kit) - APP_FLAGS="-std=c99 -Wno-unused-function -Wall -Wno-deprecated-declarations -Wno-pointer-sign -Wno-switch -Wno-unused-result -Wno-unused-variable -DPIC -fobjc-arc" + openh264 | x265) + APP_FLAGS="-Wno-unused-function" ;; sdl) APP_FLAGS="-DPIC -Wno-unused-function -D__TVOS__" @@ -208,9 +211,6 @@ get_app_specific_cflags() { soxr | snappy) APP_FLAGS="-std=gnu99 -Wno-unused-function -DPIC" ;; - openh264 | x265) - APP_FLAGS="-Wno-unused-function" - ;; *) APP_FLAGS="-std=c99 -Wno-unused-function" ;; @@ -267,9 +267,6 @@ get_cxxflags() { esac case $1 in - x265) - echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS}" - ;; gnutls) echo "-std=c++11 -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; @@ -286,11 +283,14 @@ get_cxxflags() { echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; rubberband) - echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" + echo "-fno-rtti -Wno-c++11-narrowing ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; srt | tesseract | zimg) echo "-std=c++11 ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;; + x265) + echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS}" + ;; *) echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_FLAGS}" ;;