diff options
author | tytan652 | 2023-05-04 11:32:45 +0200 |
---|---|---|
committer | tytan652 | 2023-05-04 11:32:45 +0200 |
commit | 46999855771b7d3d9dd80d833ec869273ec6c791 (patch) | |
tree | cd9dc160123c4af6d1c288cbb598eaa16d2e2da3 | |
parent | 7cff869aa07c8ee12f4553107adb1b27fd1d0e6f (diff) | |
download | aur-46999855771b7d3d9dd80d833ec869273ec6c791.tar.gz |
build: Replace GCC 13 patch
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | 0001-Enforce_-Wmaybe-uninitialized_never_turn_into_error.patch | 53 | ||||
-rw-r--r-- | 0001-Fix_build_with_GCC_13.patch | 36 | ||||
-rw-r--r-- | PKGBUILD | 8 |
4 files changed, 60 insertions, 43 deletions
@@ -1,7 +1,7 @@ pkgbase = obs-studio-tytan652 pkgdesc = Free and open source software for video recording and live streaming. With everything except service integrations. Plus V4L2 devices by paths, my bind interface PR, and sometimes backported fixes pkgver = 29.1.0 - pkgrel = 2 + pkgrel = 3 url = https://github.com/obsproject/obs-studio arch = x86_64 arch = aarch64 @@ -64,13 +64,13 @@ pkgbase = obs-studio-tytan652 source = qr::git+https://github.com/nayuki/QR-Code-generator.git source = bind_iface.patch source = v4l2_by-path.patch - source = 0001-Fix_build_with_GCC_13.patch + source = 0001-Enforce_-Wmaybe-uninitialized_never_turn_into_error.patch sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP sha256sums = 65116d10f03d390505fdb0bbf6fe649e8649500441dde91e029f2eb79bfdc80f sha256sums = ee54b9c6f7e17fcc62c6afc094e65f18b2e97963c2fe92289b2b91972ac206e5 - sha256sums = 450cbf6df2b14ec8f9c43c1c7d44b06ab1b10c38eae6d1048eebffb4ca16e569 + sha256sums = 9227a5f3439d19c2c75e369bc6701dc83c4ac54cc371b7f74e55c9e275512f6c pkgname = obs-studio-tytan652 diff --git a/0001-Enforce_-Wmaybe-uninitialized_never_turn_into_error.patch b/0001-Enforce_-Wmaybe-uninitialized_never_turn_into_error.patch new file mode 100644 index 000000000000..dbb9d4c9f0e2 --- /dev/null +++ b/0001-Enforce_-Wmaybe-uninitialized_never_turn_into_error.patch @@ -0,0 +1,53 @@ +From 6acef4edf8ec353313f84103162c3064ecd2efb6 Mon Sep 17 00:00:00 2001 +From: tytan652 <tytan652@tytanium.xyz> +Date: Thu, 4 May 2023 11:07:52 +0200 +Subject: [PATCH] cmake: Enforce -Wmaybe-uninitialized to never turn into an + error + +--- + cmake/Modules/CompilerConfig.cmake | 23 ++++++++++++----------- + 1 file changed, 12 insertions(+), 11 deletions(-) + +diff --git a/cmake/Modules/CompilerConfig.cmake b/cmake/Modules/CompilerConfig.cmake +index 41c56da8b4cee..849d19de75ccf 100644 +--- a/cmake/Modules/CompilerConfig.cmake ++++ b/cmake/Modules/CompilerConfig.cmake +@@ -100,6 +100,13 @@ else() + endif() + + option(CALM_DEPRECATION "Keep deprecated-declarations as warnings" OFF) ++ #[[ ++ Note about -Wmaybe-uninitialized on GCC, this warning seems to be subject of various regressions and false positives. This ++ warning is set to not turn into an error. ++ ++ - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105562 for 12.1.0 ++ - https://github.com/obsproject/obs-studio/issues/8850 for 13.1.1 ++ ]] + add_compile_options( + -Werror + -Wextra +@@ -117,19 +124,13 @@ else() + "$<$<CONFIG:DEBUG>:-DDEBUG=1;-D_DEBUG=1>" + "$<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang>:-Wnull-conversion;-fcolor-diagnostics;-Wno-error=shorten-64-to-32>" + "$<$<COMPILE_LANG_AND_ID:C,AppleClang,Clang>:-Wnull-conversion;-fcolor-diagnostics;-Wno-error=shorten-64-to-32>" +- "$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wconversion-null>" ++ "$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wconversion-null;-Wno-error=maybe-uninitialized>" ++ "$<$<COMPILE_LANG_AND_ID:C,GNU>:-Wno-error=maybe-uninitialized>" + "$<$<BOOL:${CALM_DEPRECATION}>:-Wno-error=deprecated-declarations>") + +- if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") +- # GCC on aarch64 emits type-limits warnings that do not appear on x86_64 +- if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") +- add_compile_options(-Wno-error=type-limits) +- endif() +- +- # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105562 +- if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "12.1.0") +- add_compile_options(-Wno-error=maybe-uninitialized) +- endif() ++ # GCC on aarch64 emits type-limits warnings that do not appear on x86_64 ++ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") ++ add_compile_options(-Wno-error=type-limits) + endif() + + if(OBS_CODESIGN_LINKER) diff --git a/0001-Fix_build_with_GCC_13.patch b/0001-Fix_build_with_GCC_13.patch deleted file mode 100644 index f1b60602b0e6..000000000000 --- a/0001-Fix_build_with_GCC_13.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 16aa55071f29c9e90d7b08ddd2e61fb6d5561f15 Mon Sep 17 00:00:00 2001 -From: tytan652 <tytan652@tytanium.xyz> -Date: Thu, 4 May 2023 09:57:19 +0200 -Subject: [PATCH] obs-ffmpeg,obs-outputs: Fix maybe-unintialized warnings on - GCC 13 - ---- - plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c | 2 +- - plugins/obs-outputs/librtmp/rtmp.c | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c b/plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c -index a3c4f925c607d..c454410a76295 100644 ---- a/plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c -+++ b/plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c -@@ -727,7 +727,7 @@ static void *ffmpeg_mux_io_thread(void *data) - // ffmpeg, then we flush the chunk. next_seek_position is the actual - // offset we should seek to when we write the chunk. - uint64_t current_seek_position = 0; -- uint64_t next_seek_position; -+ uint64_t next_seek_position = 0; - - for (;;) { - // Wait for ffmpeg to write data to the buffer -diff --git a/plugins/obs-outputs/librtmp/rtmp.c b/plugins/obs-outputs/librtmp/rtmp.c -index 28239cb0351c8..7d0e6db7e0594 100644 ---- a/plugins/obs-outputs/librtmp/rtmp.c -+++ b/plugins/obs-outputs/librtmp/rtmp.c -@@ -4556,6 +4556,7 @@ DecodeTEA(AVal *key, AVal *text) - /* prep text: hex2bin, multiples of 4 */ - n = (text->av_len + 7) / 8; - out = malloc(n * 8); -+ memset(out, 0, n * 8); - ptr = (unsigned char *)text->av_val; - v = (uint32_t *) out; - for (i = 0; i < n; i++) @@ -2,7 +2,7 @@ pkgname=obs-studio-tytan652 pkgver=29.1.0 -pkgrel=2 +pkgrel=3 pkgdesc="Free and open source software for video recording and live streaming. With everything except service integrations. Plus V4L2 devices by paths, my bind interface PR, and sometimes backported fixes" arch=("x86_64" "aarch64") url="https://github.com/obsproject/obs-studio" @@ -79,7 +79,7 @@ source=( "qr::git+https://github.com/nayuki/QR-Code-generator.git" "bind_iface.patch" # Based on https://patch-diff.githubusercontent.com/raw/obsproject/obs-studio/pull/4219.patch "v4l2_by-path.patch" # https://patch-diff.githubusercontent.com/raw/obsproject/obs-studio/pull/3437.patch - "0001-Fix_build_with_GCC_13.patch" + "0001-Enforce_-Wmaybe-uninitialized_never_turn_into_error.patch" ) sha256sums=( "SKIP" @@ -88,7 +88,7 @@ sha256sums=( "SKIP" "65116d10f03d390505fdb0bbf6fe649e8649500441dde91e029f2eb79bfdc80f" "ee54b9c6f7e17fcc62c6afc094e65f18b2e97963c2fe92289b2b91972ac206e5" - "450cbf6df2b14ec8f9c43c1c7d44b06ab1b10c38eae6d1048eebffb4ca16e569" + "9227a5f3439d19c2c75e369bc6701dc83c4ac54cc371b7f74e55c9e275512f6c" ) if [[ $CARCH == 'x86_64' ]]; then @@ -106,7 +106,7 @@ prepare() { git -c protocol.file.allow=always submodule update deps/qr cd "$srcdir/obs-studio" - patch -Np1 < "$srcdir/0001-Fix_build_with_GCC_13.patch" + patch -Np1 < "$srcdir/0001-Enforce_-Wmaybe-uninitialized_never_turn_into_error.patch" ## Add network interface binding for RTMP on Linux (https://github.com/obsproject/obs-studio/pull/4219) patch -Np1 < "$srcdir/bind_iface.patch" |