Include the PIC flag when linking, as well as building, the shared

library, from Brad.
This commit is contained in:
sthen 2012-05-19 08:24:50 +00:00
parent 0ecf410488
commit b5f7fc550b
2 changed files with 8 additions and 8 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.6 2012/05/18 18:26:23 sthen Exp $
# $OpenBSD: Makefile,v 1.7 2012/05/19 08:24:50 sthen Exp $
COMMENT= read, modify, create ELF files on any arch
DISTNAME= libelf-0.8.13
REVISION= 0
REVISION= 1
SHARED_LIBS= elf 1.1

View File

@ -1,18 +1,18 @@
$OpenBSD: patch-aclocal_m4,v 1.3 2012/05/18 18:26:23 sthen Exp $
--- aclocal.m4.orig Fri May 23 10:17:56 2008
+++ aclocal.m4 Mon Oct 12 12:20:22 2009
$OpenBSD: patch-aclocal_m4,v 1.4 2012/05/19 08:24:50 sthen Exp $
--- aclocal.m4.orig Fri May 23 04:17:56 2008
+++ aclocal.m4 Fri May 18 22:53:37 2012
@@ -288,6 +288,14 @@ AC_DEFUN(mr_ENABLE_SHARED, [
mr_enable_shared=no
fi
;;
+ *-openbsd*)
+ PICFLAGS='-fPIC -DPIC'
+ PICFLAGS='-fPIC -DPIC'
+ SHLIB_SFX='.so.$(MAJOR).0'
+ SHLINK_SFX='$(SHLIB_SFX)'
+ SONAME_SFX='$(SHLIB_SFX)'
+ LINK_SHLIB='$(CC) -shared'
+ LINK_SHLIB='$(CC) -shared -fPIC'
+ INSTALL_SHLIB='$(INSTALL_DATA)'
+ ;;
+ ;;
sparc-sun-solaris2*)
if test "$GCC" = yes; then
PICFLAGS='-fPIC -DPIC'