No need to link against libpthread any more

The pthread_mutex_* functions are now in libc, so revert the workaround.
Bulk build and ok ajacoutot@, ok jasper@ (maintainer)
This commit is contained in:
jca 2018-01-31 17:58:38 +00:00
parent 4dcda1e85d
commit 2343f34251
3 changed files with 11 additions and 20 deletions

View File

@ -1,20 +1,19 @@
# $OpenBSD: Makefile,v 1.36 2018/01/22 06:28:00 bcallah Exp $
# $OpenBSD: Makefile,v 1.37 2018/01/31 17:58:38 jca Exp $
COMMENT= Foreign Function Interface
DISTNAME= libffi-3.2.1
REVISION= 3
REVISION= 4
SHARED_LIBS += ffi 1.2 # .6.4
CATEGORIES= devel
MAINTAINER= Jasper Lievisse Adriaanse <jasper@openbsd.org>
HOMEPAGE= http://sourceware.org/libffi/
HOMEPAGE= https://sourceware.org/libffi/
# BSD
PERMIT_PACKAGE_CDROM= Yes
WANTLIB += pthread
# needed for unwind symbols
.if ${MACHINE_ARCH} == "arm"
WANTLIB += c++abi

View File

@ -1,21 +1,17 @@
$OpenBSD: patch-configure,v 1.8 2018/01/22 06:28:00 bcallah Exp $
$OpenBSD: patch-configure,v 1.9 2018/01/31 17:58:38 jca Exp $
- Always link with -pthread for libffi (XXX not needed any more?)
- Link with libc++abi on arm (to access unwind symbols)
Index: configure
--- configure.orig
+++ configure
@@ -18522,6 +18522,15 @@ $as_echo "#define SYMBOL_UNDERSCORE 1" >>confdefs.h
@@ -18522,6 +18522,12 @@ $as_echo "#define SYMBOL_UNDERSCORE 1" >>confdefs.h
fi
+case "$target" in
+ arm-*-openbsd*)
+ LDFLAGS="-lpthread -lc++abi $LDFLAGS"
+ ;;
+ *-*-openbsd*)
+ LDFLAGS="-lpthread $LDFLAGS"
+ LDFLAGS="-lc++abi $LDFLAGS"
+ ;;
+esac
+

View File

@ -1,11 +1,11 @@
$OpenBSD: patch-libffi_pc_in,v 1.3 2016/01/28 08:40:47 jasper Exp $
$OpenBSD: patch-libffi_pc_in,v 1.4 2018/01/31 17:58:38 jca Exp $
- Install headers into a standard directory.
- Always link link -pthread
--- libffi.pc.in.orig Sat Nov 8 13:47:24 2014
+++ libffi.pc.in Tue Jan 26 18:55:09 2016
@@ -2,10 +2,10 @@ prefix=@prefix@
Index: libffi.pc.in
--- libffi.pc.in.orig
+++ libffi.pc.in
@@ -2,7 +2,7 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
toolexeclibdir=@toolexeclibdir@
@ -14,7 +14,3 @@ $OpenBSD: patch-libffi_pc_in,v 1.3 2016/01/28 08:40:47 jasper Exp $
Name: @PACKAGE_NAME@
Description: Library supporting Foreign Function Interfaces
Version: @PACKAGE_VERSION@
-Libs: -L${toolexeclibdir} -lffi
+Libs: -L${toolexeclibdir} -lffi -pthread
Cflags: -I${includedir}