On Tuesday 1. of March 2011 16:07:47 Tom Lane wrote: > Rumko <rum...@gmail.com> writes: > > On Sunday 27. of February 2011 23:50:17 Peter Eisentraut wrote: > >> It seems to me that it would be easier to just map dragonfly to the > >> freebsd template. > > > > I didn't see a precedence for that kind of introduction of a new platform > > (all others seem to have their own templates), so thought it would've had > > less chance of being accepted. > > When I looked at that patch, I actually couldn't see anything different > at all from freebsd. We aren't interested in maintaining 99% duplicate > code --- it seems much easier from a maintenance standpoint to introduce > an ifdef or two into the freebsd code, rather than deal with a large cut > and paste job. Please try it that way and see what you come up with. > (It's possible that it'll be so ugly that we agree your original patch > is better, but we need to see the results of the experiment.) > > regards, tom lane
Well, wouldn't consider it ugly, but the patch (attached and available at http://www.rumko.net/0001-DragonFly-BSD-support-linked.patch ) is a lot shorter. Uses freebsd's template and defines the linker in Makefile.shlib. -- Regards, Rumko
From cf98b549799fac991ee627f16f6131c092913101 Mon Sep 17 00:00:00 2001 From: Rumko <ru...@rumko.net> Date: Sun, 27 Feb 2011 20:56:11 +0100 Subject: [PATCH] DragonFly BSD support. Based on FreeBSD port with minimal changes. --- configure | 1 + configure.in | 1 + src/Makefile.shlib | 11 +++++++++++ 3 files changed, 13 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 0bddb5f..b4da314 100755 --- a/configure +++ b/configure @@ -2196,6 +2196,7 @@ case $host_os in darwin*) template=darwin ;; dgux*) template=dgux ;; freebsd*) template=freebsd ;; +dragonfly*) template=freebsd ;; hpux*) template=hpux ;; irix*) template=irix ;; linux*|gnu*|k*bsd*-gnu) diff --git a/configure.in b/configure.in index 6aae504..5178570 100644 --- a/configure.in +++ b/configure.in @@ -60,6 +60,7 @@ case $host_os in darwin*) template=darwin ;; dgux*) template=dgux ;; freebsd*) template=freebsd ;; +dragonfly*) template=freebsd ;; hpux*) template=hpux ;; irix*) template=irix ;; linux*|gnu*|k*bsd*-gnu) diff --git a/src/Makefile.shlib b/src/Makefile.shlib index a5cf6c6..a78c98c 100644 --- a/src/Makefile.shlib +++ b/src/Makefile.shlib @@ -198,6 +198,17 @@ ifeq ($(PORTNAME), netbsd) endif endif +ifeq ($(PORTNAME), dragonfly) + ifdef ELF_SYSTEM + LINK.shared = $(COMPILER) -shared + ifdef soname + LINK.shared += -Wl,-x,-soname,$(soname) + endif + else + LINK.shared = $(LD) -x -Bshareable -Bforcearchive + endif +endif + ifeq ($(PORTNAME), hpux) ifdef SO_MAJOR_VERSION shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) -- 1.7.3.5
signature.asc
Description: This is a digitally signed message part.