- use "cc -shared" to create shared libraries

- lop off the micro version number from libecpg
--
Tested by me on -current sparc and Daniel Hartmeier <daniel@benzedrine.cx>
on -current powerpc.
This commit is contained in:
brad 2001-03-13 22:05:47 +00:00
parent e31ec85085
commit e67e52c31b
5 changed files with 27 additions and 28 deletions

View File

@ -1,20 +1,19 @@
--- Makefile.shlib.orig Wed May 17 00:48:48 2000
+++ Makefile.shlib Fri Nov 24 17:08:53 2000
@@ -127,6 +127,20 @@
--- Makefile.shlib.orig Tue May 16 16:48:48 2000
+++ Makefile.shlib Mon Mar 5 16:17:33 2001
@@ -127,6 +127,19 @@
endif
endif
+ifeq ($(PORTNAME), openbsd)
+ ifdef BSD_SHLIB
+ install-shlib-dep := install-shlib
+ soname := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ ifdef ELF_SYSTEM
+ LDFLAGS_SL := -x -shared --whole-archive -soname $(soname)
+ else
+ LDFLAGS_SL := -x -Bshareable -Bforcearchive
+ LD := $(CC)
+ LDFLAGS_SL := -shared -fpic
+ ifneq ($(SHLIB_LINK),)
+ LDFLAGS_SL += -Wl,-rpath,$(LIBDIR)
+ endif
+ CFLAGS += $(CFLAGS_SL)
+ CFLAGS += $(CFLAGS_SL)
+ endif
+endif
+

View File

@ -0,0 +1,11 @@
--- interfaces/ecpg/lib/Makefile.in.orig Sat Mar 3 01:29:21 2001
+++ interfaces/ecpg/lib/Makefile.in Sat Mar 3 01:29:35 2001
@@ -12,7 +12,7 @@
NAME= ecpg
SO_MAJOR_VERSION= 3
-SO_MINOR_VERSION= 1.1
+SO_MINOR_VERSION= 1
SRCDIR= @top_srcdir@
include $(SRCDIR)/Makefile.global

View File

@ -1,19 +1,8 @@
--- makefiles/Makefile.openbsd.orig Fri Nov 24 17:14:21 2000
+++ makefiles/Makefile.openbsd Fri Nov 24 17:14:08 2000
@@ -0,0 +1,16 @@
--- makefiles/Makefile.openbsd.orig Sat Mar 10 11:51:25 2001
+++ makefiles/Makefile.openbsd Sat Mar 10 11:52:28 2001
@@ -0,0 +1,5 @@
+ifdef ELF_SYSTEM
+LDFLAGS += -Wl,-E
+endif
+%.so: %.o
+ifdef ELF_SYSTEM
+ $(LD) -x -Bshareable -o $@ $<
+else
+ $(LD) $(LDREL) $(LDOUT) $<.obj -x $<
+ @echo building shared object $@
+ @rm -f $@.pic
+ @${AR} cq $@.pic `lorder $<.obj | tsort`
+ ${RANLIB} $@.pic
+ @rm -f $@
+ $(LD) -x -Bshareable -Bforcearchive \
+ -o $@ $@.pic
+endif
+ $(LD) -shared -fpic -o $@ $<

View File

@ -1,5 +1,5 @@
@comment $OpenBSD: PFRAG.shared,v 1.5 2001/02/22 19:28:14 danh Exp $
lib/pgsql/libecpg.so.3.1.1
@comment $OpenBSD: PFRAG.shared,v 1.6 2001/03/13 22:05:47 brad Exp $
lib/pgsql/libecpg.so.3.1
lib/pgsql/libpgeasy.so.2.1
lib/pgsql/libpq++.so.3.1
lib/pgsql/libpq.so.2.1

View File

@ -1,5 +1,5 @@
@comment $OpenBSD: PFRAG.shared-clients,v 1.1 2001/02/22 19:30:57 danh Exp $
lib/pgsql/libecpg.so.3.1.1
@comment $OpenBSD: PFRAG.shared-clients,v 1.2 2001/03/13 22:05:47 brad Exp $
lib/pgsql/libecpg.so.3.1
lib/pgsql/libpgeasy.so.2.1
lib/pgsql/libpq++.so.3.1
lib/pgsql/libpq.so.2.1