Put '-fPIC' in openbsd ifdefs.

This commit is contained in:
ajacoutot 2010-03-27 14:32:23 +00:00
parent 0cabc2739b
commit f2f970a91c
2 changed files with 7 additions and 10 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.2 2010/03/26 14:24:42 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.3 2010/03/27 14:32:23 ajacoutot Exp $
SHARED_ONLY= Yes
COMMENT= portable tools library
DISTNAME= ptlib-2.6.5
PKGNAME= ${DISTNAME}p0
PKGNAME= ${DISTNAME}p1
SHARED_LIBS= pt 3.0 # 2.4.2

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-make_lib_mak,v 1.2 2010/03/26 14:24:42 ajacoutot Exp $
$OpenBSD: patch-make_lib_mak,v 1.3 2010/03/27 14:32:23 ajacoutot Exp $
--- make/lib.mak.orig Mon Sep 21 02:25:30 2009
+++ make/lib.mak Fri Mar 26 15:18:29 2010
+++ make/lib.mak Sat Mar 27 15:21:24 2010
@@ -29,10 +29,14 @@
#
@ -19,19 +19,16 @@ $OpenBSD: patch-make_lib_mak,v 1.2 2010/03/26 14:24:42 ajacoutot Exp $
endif
else
ifeq ($(BUILD_TYPE),.)
@@ -98,10 +102,14 @@ ifeq ($(P_SHAREDLIB),1)
@@ -98,7 +102,11 @@ ifeq ($(P_SHAREDLIB),1)
LDSOOPTS += -Wl,--kill-at
else
ifneq ($(OSTYPE),Darwin)
- LDSOOPTS += -Wl,-soname,$(LIB_SONAME)
+ ifneq ($(OSTYPE),OpenBSD)
+ LDSOOPTS += -Wl,-soname,$(LIB_SONAME)
+ else
+ LDSOOPTS += -fPIC
+ endif
endif
endif
endif
+
+ LDSOOPTS += -fPIC
$(LIBDIR)/$(LIB_FILENAME): $(LIBDIR)/$(LIBNAME_PAT)
@cd $(LIBDIR) ; rm -f $(LIB_FILENAME) ; ln -sf $(LIBNAME_PAT) $(LIB_FILENAME)