diff options
| author | Yuri Victorovich <yuri@FreeBSD.org> | 2025-10-12 07:33:20 +0000 |
|---|---|---|
| committer | Yuri Victorovich <yuri@FreeBSD.org> | 2025-10-12 09:51:27 +0000 |
| commit | 7cbdbdbb7383c98aa67fc5359fb908b93ade705b (patch) | |
| tree | 9cfbae44a25f66b0f677f0eb327600f4042916a0 | |
| parent | 67b06428e7beaee048fed6b945ae8bf92a1b3d5e (diff) | |
multimedia/obs-studio: Fix IPO failure by adding -fPIC
... instead of disabling IPO.
| -rw-r--r-- | multimedia/obs-studio/Makefile | 5 | ||||
| -rw-r--r-- | multimedia/obs-studio/files/patch-cmake_common_compiler__common.cmake | 17 |
2 files changed, 3 insertions, 19 deletions
diff --git a/multimedia/obs-studio/Makefile b/multimedia/obs-studio/Makefile index 77daa095df05..9c1885ce3a96 100644 --- a/multimedia/obs-studio/Makefile +++ b/multimedia/obs-studio/Makefile @@ -1,5 +1,6 @@ PORTNAME= obs-studio DISTVERSION= 32.0.1 +PORTREVISION= 1 CATEGORIES= multimedia MASTER_SITES= https://github.com/obsproject/obs-studio/releases/download/${DISTVERSION}/ DISTFILES= OBS-Studio-${DISTVERSION}-Sources${EXTRACT_SUFX} @@ -64,12 +65,12 @@ USE_LDCONFIG= yes CMAKE_ARGS= -DOBS_VERSION_OVERRIDE:STRING="${PORTVERSION}" \ -DQT_VERSION=6 \ -DPython_EXECUTABLE="${PYTHON_CMD}" -CMAKE_ARGS+= -DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=OFF # prevent errors like: ld: error: relocation R_X86_64_PC32 cannot be used against symbol '__stack_chk_guard'; recompile with -fPIC -# see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290157 CFLAGS+= -Wno-error=attribute-warning CFLAGS_powerpc64= -Wno-error=deprecated-altivec-src-compat -Wno-error=pass-failed CFLAGS_powerpc64le= -Wno-error=deprecated-altivec-src-compat +CFLAGS+= -fPIC # otherwise we get: relocation R_X86_64_PC32 cannot be used against symbol '__stack_chk_guard'; recompile with -fPIC +CXXFLAGS+= -fPIC # otherwise we get: relocation R_X86_64_PC32 cannot be used against symbol '__stack_chk_guard'; recompile with -fPIC LDFLAGS+= -fPIC # pending https://github.com/obsproject/obs-studio/issues/3436 WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-sources diff --git a/multimedia/obs-studio/files/patch-cmake_common_compiler__common.cmake b/multimedia/obs-studio/files/patch-cmake_common_compiler__common.cmake deleted file mode 100644 index 0e8fd4425f84..000000000000 --- a/multimedia/obs-studio/files/patch-cmake_common_compiler__common.cmake +++ /dev/null @@ -1,17 +0,0 @@ -# disable IPO due to breakage: -# ld: error: relocation R_X86_64_PC32 cannot be used against symbol '__stack_chk_guard'; recompile with -fPIC - ---- cmake/common/compiler_common.cmake.orig 2025-01-06 17:00:00 UTC -+++ cmake/common/compiler_common.cmake -@@ -28,8 +28,8 @@ if(HAS_INTERPROCEDURAL_OPTIMIZATION) - message(STATUS "Checking for interprocedural optimization support - enabled [Release, MinSizeRel]") - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF) - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO OFF) -- set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON) -- set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_MINSIZEREL ON) -+ set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE OFF) -+ set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_MINSIZEREL OFF) - else() - message(STATUS "Checking for interprocedural optimization support - disabled") - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF) - |
