From: Marc G. Fournier Date: Sat, 31 Oct 1998 03:58:55 +0000 (+0000) Subject: Minor FreeBSD fixes put in place X-Git-Tag: REL6_4_2~77 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=15d61bb43968123a78b7f2ae2b4ce689fbdaa83e;p=postgresql Minor FreeBSD fixes put in place From: SHIOZAKI Takehiko I tried snapshot(Oct30) and made some patches. # I think that it is confused to manage both Makefile.shlib and # makefiles/Makefile.*, don't you? * configure Now FreeBSD 2.X is not supported..., so I added its entry. If ELF_SYSTEM is set, gmake treat it defined even though it is "false". So nothing should be set to use "ifdef". BSD_SHLIB etc. may have same problems. * Makefile.shlib As you said, FreeBSD entry is much like BSD's. I only added ELF_SYSTEM code. * makefiles/Makefile.freebsd Ifdef/else/endif can not be indented with TABs. --- diff --git a/src/Makefile.shlib b/src/Makefile.shlib index 838f880469..60ead6597c 100644 --- a/src/Makefile.shlib +++ b/src/Makefile.shlib @@ -6,7 +6,7 @@ # Copyright (c) 1998, Regents of the University of California # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.2 1998/10/28 06:49:04 thomas Exp $ +# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.3 1998/10/31 03:58:51 scrappy Exp $ # #------------------------------------------------------------------------- @@ -56,12 +56,25 @@ install-shlib-dep := # Makefile.global (or really Makefile.port) to supply DLSUFFIX and other # symbols. +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 + else + LDFLAGS_SL := -x -Bshareable -Bforcearchive + endif + CFLAGS += $(CFLAGS_SL) + endif +endif + ifeq ($(PORTNAME), bsd) ifdef BSD_SHLIB install-shlib-dep := install-shlib - shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) - LDFLAGS_SL := -x -Bshareable -Bforcearchive - CFLAGS += $(CFLAGS_SL) + shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) + LDFLAGS_SL := -x -Bshareable -Bforcearchive + CFLAGS += $(CFLAGS_SL) endif endif diff --git a/src/configure b/src/configure index 1bfe87c27d..277b4783a2 100755 --- a/src/configure +++ b/src/configure @@ -618,7 +618,7 @@ case "$host_os" in linux*) os=linux need_tas=no ;; bsdi*) os=bsdi need_tas=no ;; freebsd3*) os=freebsd need_tas=no elf=yes ;; - freebsd1*) os=freebsd need_tas=no ;; + freebsd12*) os=freebsd need_tas=no ;; netbsd*|openbsd*) os=bsd need_tas=no ;; dgux*) os=dgux need_tas=no ;; aix*) os=aix need_tas=no ;; diff --git a/src/configure.in b/src/configure.in index 8e18203961..6293c599a9 100644 --- a/src/configure.in +++ b/src/configure.in @@ -17,7 +17,7 @@ case "$host_os" in linux*) os=linux need_tas=no ;; bsdi*) os=bsdi need_tas=no ;; freebsd3*) os=freebsd need_tas=no elf=yes ;; - freebsd1*) os=freebsd need_tas=no ;; + freebsd[12]*) os=freebsd need_tas=no ;; netbsd*|openbsd*) os=bsd need_tas=no ;; dgux*) os=dgux need_tas=no ;; aix*) os=aix need_tas=no ;; diff --git a/src/makefiles/Makefile.freebsd b/src/makefiles/Makefile.freebsd index 4a852a4b04..46f5a7f961 100644 --- a/src/makefiles/Makefile.freebsd +++ b/src/makefiles/Makefile.freebsd @@ -5,9 +5,9 @@ @${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 +ifdef ELF_SYSTEM + $(LD) -x -Bshareable -o $@ $@.pic +else + $(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic +endif