Apply upstream patch to fix build with GCC 10

This commit is contained in:
Sebastian Ramacher 2020-07-27 12:49:17 +02:00
parent f7356af78c
commit 878644dc10
10 changed files with 83 additions and 60 deletions

View file

@ -9,10 +9,10 @@ Subject: Hide internal symbols
3 files changed, 18 insertions(+), 1 deletion(-) 3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/deps/obs-scripting/CMakeLists.txt b/deps/obs-scripting/CMakeLists.txt diff --git a/deps/obs-scripting/CMakeLists.txt b/deps/obs-scripting/CMakeLists.txt
index 0421ec9..165b2d9 100644 index 7dd316f..6a88b12 100644
--- a/deps/obs-scripting/CMakeLists.txt --- a/deps/obs-scripting/CMakeLists.txt
+++ b/deps/obs-scripting/CMakeLists.txt +++ b/deps/obs-scripting/CMakeLists.txt
@@ -193,6 +193,18 @@ add_library(obs-scripting SHARED @@ -200,6 +200,18 @@ add_library(obs-scripting SHARED
${SWIG_LUA_RUNTIME} ${SWIG_LUA_RUNTIME}
) )
@ -32,10 +32,10 @@ index 0421ec9..165b2d9 100644
libobs libobs
${LUAJIT_LIBRARIES} ${LUAJIT_LIBRARIES}
diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt
index 84889e6..5ebd1eb 100644 index 0b592d7..b59ba58 100644
--- a/libobs/CMakeLists.txt --- a/libobs/CMakeLists.txt
+++ b/libobs/CMakeLists.txt +++ b/libobs/CMakeLists.txt
@@ -481,6 +481,11 @@ target_compile_options(libobs @@ -491,6 +491,11 @@ target_compile_options(libobs
PUBLIC PUBLIC
${ARCH_SIMD_FLAGS}) ${ARCH_SIMD_FLAGS})

View file

@ -7,10 +7,10 @@ Subject: Link with libm and libdl to fix underlinking
1 file changed, 5 insertions(+) 1 file changed, 5 insertions(+)
diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt
index 5ebd1eb..21f3522 100644 index b59ba58..a562a88 100644
--- a/libobs/CMakeLists.txt --- a/libobs/CMakeLists.txt
+++ b/libobs/CMakeLists.txt +++ b/libobs/CMakeLists.txt
@@ -234,6 +234,11 @@ elseif(UNIX) @@ -244,6 +244,11 @@ elseif(UNIX)
${PULSEAUDIO_LIBRARY}) ${PULSEAUDIO_LIBRARY})
endif() endif()

View file

@ -7,7 +7,7 @@ Subject: Link with xcb and X libraries to fix underlinking
1 file changed, 9 insertions(+), 4 deletions(-) 1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt
index 21f3522..bfb74f3 100644 index a562a88..8f12482 100644
--- a/libobs/CMakeLists.txt --- a/libobs/CMakeLists.txt
+++ b/libobs/CMakeLists.txt +++ b/libobs/CMakeLists.txt
@@ -13,8 +13,8 @@ endif() @@ -13,8 +13,8 @@ endif()
@ -21,7 +21,7 @@ index 21f3522..bfb74f3 100644
if (XCB_XINPUT_FOUND) if (XCB_XINPUT_FOUND)
set(USE_XINPUT "1") set(USE_XINPUT "1")
else() else()
@@ -211,12 +211,17 @@ elseif(UNIX) @@ -221,12 +221,17 @@ elseif(UNIX)
endif() endif()
include_directories( include_directories(

View file

@ -7,10 +7,10 @@ Subject: Add SONAME
1 file changed, 5 insertions(+) 1 file changed, 5 insertions(+)
diff --git a/deps/obs-scripting/CMakeLists.txt b/deps/obs-scripting/CMakeLists.txt diff --git a/deps/obs-scripting/CMakeLists.txt b/deps/obs-scripting/CMakeLists.txt
index 165b2d9..506abf2 100644 index 6a88b12..a86262e 100644
--- a/deps/obs-scripting/CMakeLists.txt --- a/deps/obs-scripting/CMakeLists.txt
+++ b/deps/obs-scripting/CMakeLists.txt +++ b/deps/obs-scripting/CMakeLists.txt
@@ -205,6 +205,11 @@ if(UNIX) @@ -212,6 +212,11 @@ if(UNIX)
PROPERTIES COMPILE_FLAGS "-fvisibility=hidden") PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
endif() endif()

View file

@ -7,10 +7,10 @@ Subject: Do not build with SSE2 enabled on i386
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5ea2c5f..95b49b4 100644 index b56c2bb..1dabd39 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -113,7 +113,7 @@ else () @@ -118,7 +118,7 @@ else ()
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_SYSTEM_PROCESSOR) string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_SYSTEM_PROCESSOR)
endif () endif ()

View file

@ -1,17 +0,0 @@
From: Sebastian Ramacher <sramacher@debian.org>
Date: Wed, 25 Mar 2020 21:58:13 +0100
Subject: rmtp-services: Remove executable bits from json files
---
plugins/rtmp-services/data/package.json | 0
plugins/rtmp-services/data/services.json | 0
2 files changed, 0 insertions(+), 0 deletions(-)
mode change 100755 => 100644 plugins/rtmp-services/data/package.json
mode change 100755 => 100644 plugins/rtmp-services/data/services.json
diff --git a/plugins/rtmp-services/data/package.json b/plugins/rtmp-services/data/package.json
old mode 100755
new mode 100644
diff --git a/plugins/rtmp-services/data/services.json b/plugins/rtmp-services/data/services.json
old mode 100755
new mode 100644

View file

@ -0,0 +1,40 @@
From: "Michael R. Crusoe" <michael.crusoe@gmail.com>
Date: Mon, 27 Jul 2020 12:46:48 +0200
Subject: Use the simd everywhere headers from libsimde-dev
---
libobs/CMakeLists.txt | 7 -------
libobs/util/sse-intrin.h | 2 +-
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt
index 8f12482..d42702f 100644
--- a/libobs/CMakeLists.txt
+++ b/libobs/CMakeLists.txt
@@ -186,13 +186,6 @@ elseif(UNIX)
if(NEEDS_SIMDE)
set(libobs_PLATFORM_HEADERS
- util/simde/check.h
- util/simde/hedley.h
- util/simde/mmx.h
- util/simde/simde-arch.h
- util/simde/simde-common.h
- util/simde/sse.h
- util/simde/sse2.h
util/threading-posix.h)
else()
set(libobs_PLATFORM_HEADERS
diff --git a/libobs/util/sse-intrin.h b/libobs/util/sse-intrin.h
index 8136c92..bde2029 100644
--- a/libobs/util/sse-intrin.h
+++ b/libobs/util/sse-intrin.h
@@ -19,7 +19,7 @@
#if NEEDS_SIMDE
-#include "simde/sse2.h"
+#include <simde/x86/sse2.h>
#define __m128 simde__m128
#define _mm_setzero_ps simde_mm_setzero_ps

View file

@ -0,0 +1,29 @@
From: Jimi Huotari <chiitoo@gentoo.org>
Date: Sun, 9 Feb 2020 05:23:55 +0200
Subject: deps/glad: Fix build with GCC-10
GCC-10 defaults to '-fno-common' [1], which triggers issues with
defining global variables multiple times. To fix the build, use
'extern' to turn the first definition of 'gladGetProcAddressPtr'
into a declaration.
1. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678
Closes https://github.com/obsproject/obs-studio/issues/2828
---
deps/glad/src/glad_glx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/deps/glad/src/glad_glx.c b/deps/glad/src/glad_glx.c
index 7c55b9f..58086f1 100644
--- a/deps/glad/src/glad_glx.c
+++ b/deps/glad/src/glad_glx.c
@@ -35,7 +35,7 @@ static void* libGL;
#ifndef __APPLE__
typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*);
-PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
+extern PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
#endif
static

View file

@ -1,29 +0,0 @@
Author: Michael R. Crusoe <michael.crusoe@gmail.com>
Subject: Use the simd everywhere headers from libsimde-dev
--- obs-studio.orig/libobs/util/sse-intrin.h
+++ obs-studio/libobs/util/sse-intrin.h
@@ -19,7 +19,7 @@
#if NEEDS_SIMDE
-#include "simde/sse2.h"
+#include <simde/x86/sse2.h>
#define __m128 simde__m128
#define _mm_setzero_ps simde_mm_setzero_ps
--- obs-studio.orig/libobs/CMakeLists.txt
+++ obs-studio/libobs/CMakeLists.txt
@@ -186,13 +186,6 @@
if(NEEDS_SIMDE)
set(libobs_PLATFORM_HEADERS
- util/simde/check.h
- util/simde/hedley.h
- util/simde/mmx.h
- util/simde/simde-arch.h
- util/simde/simde-common.h
- util/simde/sse.h
- util/simde/sse2.h
util/threading-posix.h)
else()
set(libobs_PLATFORM_HEADERS

View file

@ -5,5 +5,5 @@
0005-Link-with-xcb-and-X-libraries-to-fix-underlinking.patch 0005-Link-with-xcb-and-X-libraries-to-fix-underlinking.patch
0006-Add-SONAME.patch 0006-Add-SONAME.patch
0007-Do-not-build-with-SSE2-enabled-on-i386.patch 0007-Do-not-build-with-SSE2-enabled-on-i386.patch
0008-rmtp-services-Remove-executable-bits-from-json-files.patch 0008-use-libsimde-dev.patch
0009-use-libsimde-dev.patch 0009-deps-glad-Fix-build-with-GCC-10.patch