]> granicus.if.org Git - postgresql/commitdiff
Apply freebsd specific patches dealign with ELF system from FreeBSD's
authorMarc G. Fournier <scrappy@hub.org>
Mon, 17 May 1999 04:13:29 +0000 (04:13 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Mon, 17 May 1999 04:13:29 +0000 (04:13 +0000)
ports collection ...

src/Makefile.shlib
src/backend/port/dynloader/freebsd.c
src/configure
src/configure.in
src/makefiles/Makefile.freebsd

index 889f24b832598e022238c8a2845d69b41db19d09..a569b73cc3237c087de1d47b804d02f332c87982 100644 (file)
@@ -6,7 +6,7 @@
 # Copyright (c) 1998, Regents of the University of California
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.8 1999/04/30 02:04:49 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.9 1999/05/17 04:13:24 scrappy Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -59,10 +59,11 @@ install-shlib-dep :=
 ifeq ($(PORTNAME), freebsd)
   ifdef BSD_SHLIB
     install-shlib-dep  := install-shlib
-    shlib              := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
     ifdef ELF_SYSTEM
-      LDFLAGS_SL       := -x -Bshareable
+      shlib            := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
+      LDFLAGS_SL       := -x -shared -soname $(shlib)
     else
+      shlib            := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
       LDFLAGS_SL       := -x -Bshareable -Bforcearchive
     endif
     CFLAGS             += $(CFLAGS_SL)
index 51ad3d99a66623f55fbc2dfb9df21bfd3b04777a..14d21fb61f217856dd0bb1e795e328a991be8fe3 100644 (file)
@@ -83,11 +83,13 @@ BSD44_derived_dlsym(void *handle, const char *name)
        void       *vp;
        char            buf[BUFSIZ];
 
+#ifndef __ELF__
        if (*name != '_')
        {
                sprintf(buf, "_%s", name);
                name = buf;
        }
+#endif
        if ((vp = dlsym(handle, (char *) name)) == (void *) NULL)
                sprintf(error_message, "dlsym (%s) failed", name);
        return vp;
index ad220cc1b08dec41b38b91ec96628adb7d74fb2a..8fe5f429f3a454711f895f96dc4d269b93f51166 100755 (executable)
@@ -625,8 +625,8 @@ case "$host_os" in
      aux*) os=aux need_tas=no ;;
    linux*) os=linux need_tas=no ;;
     bsdi*) os=bsdi need_tas=no ;;
- freebsd3*|freebsd4*) os=freebsd need_tas=no elf=yes ;;
  freebsd1*|freebsd2*) os=freebsd need_tas=no ;;
+ freebsd*) os=freebsd need_tas=no elf=yes ;;
   netbsd*)
        os=bsd need_tas=no
        case "$host_cpu" in
index 792af606dfcdb0b5c07905c6b3ccfbd7f32cf2b3..e4762d2baeba0aed3b1dfdbc08feef98543b67ea 100644 (file)
@@ -20,8 +20,8 @@ case "$host_os" in
      aux*) os=aux need_tas=no ;;
    linux*) os=linux need_tas=no ;;
     bsdi*) os=bsdi need_tas=no ;;
- freebsd3*|freebsd4*) os=freebsd need_tas=no elf=yes ;;
  freebsd1*|freebsd2*) os=freebsd need_tas=no ;;
+ freebsd*) os=freebsd need_tas=no elf=yes ;;
   netbsd*)
        os=bsd need_tas=no
        case "$host_cpu" in
index fcbcd84de40e142a26992be13529d60919cb0879..7bf4258816819ae175c8817856bd0cff9fddc6fe 100644 (file)
@@ -1,13 +1,17 @@
+ifdef ELF_SYSTEM
+LDFLAGS+=      -export-dynamic
+endif
+
 %.so: %.o
+ifdef ELF_SYSTEM
+       $(LD) -x -shared -o $@ $<
+else
        $(LD) -x -r -o $<.obj $<
        @echo building shared object $@
        @rm -f $@.pic
        @${AR} cq $@.pic `lorder $<.obj | tsort`
        ${RANLIB} $@.pic
        @rm -f $@
-ifdef ELF_SYSTEM
-       $(LD) -x -Bshareable -o $@ $@.pic
-else
        $(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
 endif