Compile as PIC code and link using -shared, not -Wl,-shared

Fixes build with binutils-2.17@amd64

"looks correct" naddy@
This commit is contained in:
jca 2015-05-28 12:01:15 +00:00
parent 302d84c7e8
commit 240f5f31a8
3 changed files with 11 additions and 9 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.7 2015/05/28 10:17:24 pascal Exp $
# $OpenBSD: Makefile,v 1.8 2015/05/28 12:01:15 jca Exp $
SHARED_ONLY = Yes
COMMENT-main = multimedia transformations framework
@ -7,8 +7,8 @@ VERSION = 0.9.2
DISTNAME = mlt-${VERSION}
PKGNAME-main = ${DISTNAME}
PKGNAME-gpl2 = mlt-gpl2-${VERSION}
REVISION-main = 2
REVISION-gpl2 = 2
REVISION-main = 3
REVISION-gpl2 = 3
# XXX versions should be kept in sync together
SHARED_LIBS = mlt 0.0

View File

@ -1,11 +1,13 @@
$OpenBSD: patch-configure,v 1.1.1.1 2014/07/14 09:15:12 zhuk Exp $
$OpenBSD: patch-configure,v 1.2 2015/05/28 12:01:15 jca Exp $
--- configure.orig Sun Jun 29 22:23:17 2014
+++ configure Wed Jul 9 09:43:49 2014
@@ -122,6 +122,11 @@ build_config()
+++ configure Tue May 26 19:19:08 2015
@@ -122,6 +122,13 @@ build_config()
echo "RDYNAMIC=-rdynamic"
echo "LDFLAGS+=-Wl,--no-undefined -Wl,--as-needed"
;;
+ OpenBSD)
+ echo "CFLAGS+=-fPIC"
+ echo "CXXFLAGS+=-fPIC"
+ echo "SHFLAGS=-shared"
+ echo "RDYNAMIC=-rdynamic"
+ echo "LDFLAGS+=-Wl,--as-needed"

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_mlt++_Makefile,v 1.1.1.1 2014/07/14 09:15:12 zhuk Exp $
$OpenBSD: patch-src_mlt++_Makefile,v 1.2 2015/05/28 12:01:15 jca Exp $
--- src/mlt++/Makefile.orig Sun Jun 29 22:23:17 2014
+++ src/mlt++/Makefile Wed Jul 9 09:43:49 2014
+++ src/mlt++/Makefile Tue May 26 19:33:42 2015
@@ -12,6 +12,10 @@ NAME = libmlt++$(LIBSUF)
TARGET = libmlt++-$(soversion)$(LIBSUF)
CXXFLAGS += -DMLTPP_EXPORTS
@ -8,7 +8,7 @@ $OpenBSD: patch-src_mlt++_Makefile,v 1.1.1.1 2014/07/14 09:15:12 zhuk Exp $
+else ifeq ($(targetos), OpenBSD)
+LIBmlt++_VERSION ?= $(soversion)
+TARGET = libmlt++$(LIBSUF).$(LIBmlt++_VERSION)
+LIBFLAGS += -Wl,-shared
+LIBFLAGS += -shared
else
NAME = libmlt++$(LIBSUF)
TARGET = $(NAME).$(version)