mirror of https://git.wownero.com/dsc/mxe.git
vidstab: fix libgomp linking with pthreads
This commit is contained in:
parent
a9e909ff7c
commit
ac31f5d599
|
@ -0,0 +1,28 @@
|
||||||
|
This file is part of MXE. See LICENSE.md for licensing information.
|
||||||
|
|
||||||
|
Contains ad hoc patches for cross building.
|
||||||
|
|
||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tony Theodore <tonyt@logyst.com>
|
||||||
|
Date: Sat, 17 Mar 2018 12:34:39 +1100
|
||||||
|
Subject: [PATCH 1/1] CMake pc file - libgomp requires pthreads for static
|
||||||
|
linking
|
||||||
|
|
||||||
|
See:
|
||||||
|
https://github.com/georgmartius/vid.stab/pull/56
|
||||||
|
|
||||||
|
Libgomp uses pthreads internally and it's usually sufficient to to specify `-fopenmp` in CFLAGS to pick up the required libs. Some configure scripts (e.g. ffmpeg) don't pass these through from pkg-config and only use `--libs`, so setting it here is necessary for static builds.
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 1111111..2222222 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -74,7 +74,7 @@ set(PKG_EXTRA_LIBS "${PKG_EXTRA_LIBS} ${ORC_LIBRARIES}")
|
||||||
|
endif()
|
||||||
|
if(USE_OMP)
|
||||||
|
target_link_libraries(vidstab gomp)
|
||||||
|
-set(PKG_EXTRA_LIBS "${PKG_EXTRA_LIBS} -lgomp")
|
||||||
|
+set(PKG_EXTRA_LIBS "${PKG_EXTRA_LIBS} -lgomp -lpthread")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ $(PKG)_IGNORE :=
|
||||||
$(PKG)_VERSION := 1.1.0
|
$(PKG)_VERSION := 1.1.0
|
||||||
$(PKG)_CHECKSUM := 14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb
|
$(PKG)_CHECKSUM := 14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb
|
||||||
$(PKG)_GH_CONF := georgmartius/vid.stab/tags,v
|
$(PKG)_GH_CONF := georgmartius/vid.stab/tags,v
|
||||||
$(PKG)_DEPS := cc pthreads
|
$(PKG)_DEPS := cc
|
||||||
|
|
||||||
define $(PKG)_BUILD
|
define $(PKG)_BUILD
|
||||||
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)'
|
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)'
|
||||||
|
@ -17,5 +17,5 @@ define $(PKG)_BUILD
|
||||||
'$(TARGET)-gcc' \
|
'$(TARGET)-gcc' \
|
||||||
-W -Wall -Werror -pedantic \
|
-W -Wall -Werror -pedantic \
|
||||||
'$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-vidstab.exe' \
|
'$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-vidstab.exe' \
|
||||||
`'$(TARGET)-pkg-config' --static --cflags --libs vidstab pthreads`
|
`'$(TARGET)-pkg-config' --static --cflags --libs vidstab`
|
||||||
endef
|
endef
|
||||||
|
|
Loading…
Reference in New Issue