Commit fdc1cf24 authored by Bryan Henderson's avatar Bryan Henderson

Make shared library builds work for BSD44_derived.

parent b2697939
...@@ -7,17 +7,18 @@ ...@@ -7,17 +7,18 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.63 1996/11/12 11:41:27 bryanh Exp $ # $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.64 1996/11/13 08:36:31 bryanh Exp $
# #
# NOTES # NOTES
# This is seen by any Makefiles that include mk/postgres.mk. To # Essentially all Postgres make files include this file and use the
# variables it sets. To
# override the default setting, create a Makefile.custom in this # override the default setting, create a Makefile.custom in this
# directory and put your defines there. (Makefile.custom is included # directory and put your defines there. (Makefile.custom is included
# near the end of this file.) # near the end of this file.)
# #
# If you change any of these defines you probably have to # If you change any of these defines you probably have to
# gmake clean; gmake # make clean; make
# since no dependecies are created for these. (of course you can # since no dependencies are created for these. (of course you can
# be crafty and check what files really depend on them and just remake # be crafty and check what files really depend on them and just remake
# those). # those).
# #
...@@ -321,8 +322,15 @@ else ...@@ -321,8 +322,15 @@ else
AROPT = crs AROPT = crs
endif endif
##############################################################################
#
# Shared libraries.
# This is overridden for many PORTNAMEs below.
SLSUFF= .so
#---------------------------------------------------------------------- #----------------------------------------------------------------------
ifeq ($PORTNAME, BSD44_derived) ifeq ($(PORTNAME), BSD44_derived)
MK_PORT= BSD44_derived MK_PORT= BSD44_derived
# cc is gcc, but never mind about that... # cc is gcc, but never mind about that...
...@@ -335,15 +343,8 @@ RANLIB= /usr/bin/ranlib ...@@ -335,15 +343,8 @@ RANLIB= /usr/bin/ranlib
LEX= flex LEX= flex
LDADD+= -L/usr/local/lib -lfl LDADD+= -L/usr/local/lib -lfl
#
# for postgres.user.mk
#
CFLAGS_SL= -fpic -DPIC CFLAGS_SL= -fpic -DPIC
ifneq ($(HOSTTYPE), mips)
SLSUFF= .so
endif
%.so: %.o %.so: %.o
$(LD) -x -r -o $<.obj $< $(LD) -x -r -o $<.obj $<
@echo building shared object $@ @echo building shared object $@
...@@ -363,10 +364,6 @@ MK_PORT= aix ...@@ -363,10 +364,6 @@ MK_PORT= aix
# might want to try installbsd instead # might want to try installbsd instead
INSTALL= /usr/ucb/install INSTALL= /usr/ucb/install
#
# for postgres.mk
#
# the -lm is because "pow" is defined in libbsd.a and we want pow(3m) # the -lm is because "pow" is defined in libbsd.a and we want pow(3m)
LDADD_BE= -lm -lbsd LDADD_BE= -lm -lbsd
...@@ -385,11 +382,7 @@ MAKE_EXPORTS= true ...@@ -385,11 +382,7 @@ MAKE_EXPORTS= true
CFLAGS_BE+= -qchars=signed -qmaxmem=4000 -DHAVE_ANSI_CPP CFLAGS_BE+= -qchars=signed -qmaxmem=4000 -DHAVE_ANSI_CPP
#
# for postgres.user.mk
#
EXPSUFF= .exp EXPSUFF= .exp
SLSUFF= .so
MKLDEXPORT=$(SRCDIR)/backend/port/aix/mkldexport.sh MKLDEXPORT=$(SRCDIR)/backend/port/aix/mkldexport.sh
...@@ -407,9 +400,6 @@ endif ...@@ -407,9 +400,6 @@ endif
ifeq ($(PORTNAME), alpha) ifeq ($(PORTNAME), alpha)
MK_PORT= alpha MK_PORT= alpha
#
# for postgres.mk
#
CFLAGS_BE+= -DUSE_POSIX_SIGNALS CFLAGS_BE+= -DUSE_POSIX_SIGNALS
# NOFIXADE disallows unaligned access. # NOFIXADE disallows unaligned access.
...@@ -427,11 +417,6 @@ endif ...@@ -427,11 +417,6 @@ endif
# use the regex library # use the regex library
USE_REGEX= 1 USE_REGEX= 1
#
# for postgres.user.mk
#
SLSUFF= .so
%.so: %.o %.so: %.o
$(LD) -shared -expect_unresolved '*' -o $@ $< $(LD) -shared -expect_unresolved '*' -o $@ $<
...@@ -472,11 +457,6 @@ else ...@@ -472,11 +457,6 @@ else
LDADD_BE= -ldld -lcompat LDADD_BE= -ldld -lcompat
endif endif
#
# for postgres.user.mk
#
SLSUFF= .o
endif endif
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
...@@ -484,17 +464,10 @@ endif ...@@ -484,17 +464,10 @@ endif
ifeq ($(PORTNAME), dgux) ifeq ($(PORTNAME), dgux)
MK_PORT= linux MK_PORT= linux
SLSUFF= .so
#LDFLAGS+= -rdynamic
CFLAGS_SL= -fpic CFLAGS_SL= -fpic
%.so: %.o %.so: %.o
$(CC) -shared -o $@ $< $(CC) -shared -o $@ $<
#
# for postgres.mk
#
CC= gcc CC= gcc
CFLAGS_BE= -D__USE_POSIX_SIGNALS -DUSE_POSIX_SIGNALS CFLAGS_BE= -D__USE_POSIX_SIGNALS -DUSE_POSIX_SIGNALS
...@@ -512,9 +485,6 @@ endif ...@@ -512,9 +485,6 @@ endif
ifeq ($(PORTNAME), hpux) ifeq ($(PORTNAME), hpux)
MK_PORT= hpux MK_PORT= hpux
#
# for postgres.mk
#
LDADD_BE= -lBSD LDADD_BE= -lBSD
ifdef ENFORCE_ALIGNMENT ifdef ENFORCE_ALIGNMENT
...@@ -547,9 +517,6 @@ INSTALL= bsdinst ...@@ -547,9 +517,6 @@ INSTALL= bsdinst
# RANLIB is not used on HP-UX # RANLIB is not used on HP-UX
RANLIB= touch RANLIB= touch
#
# for postgres.user.mk
#
CFLAGS_SL= +z CFLAGS_SL= +z
SLSUFF= .sl SLSUFF= .sl
...@@ -569,9 +536,6 @@ MK_PORT= i386_solaris ...@@ -569,9 +536,6 @@ MK_PORT= i386_solaris
# cc won't work! # cc won't work!
CC= gcc CC= gcc
#
# for postgres.mk
#
CFLAGS_BE+= -DUSE_POSIX_SIGNALS CFLAGS_BE+= -DUSE_POSIX_SIGNALS
# RANLIB is not used on solaris # RANLIB is not used on solaris
...@@ -589,17 +553,12 @@ LDADD_BE+= -lsocket -lnsl ...@@ -589,17 +553,12 @@ LDADD_BE+= -lsocket -lnsl
LD_ADD+= $(LDADD_BE) LD_ADD+= $(LDADD_BE)
#
# for postgres.user.mk
#
ifeq ($(CC), cc) ifeq ($(CC), cc)
CFLAGS_SL= -K PIC CFLAGS_SL= -K PIC
else else
CFLAGS_SL= -fPIC CFLAGS_SL= -fPIC
endif endif
SLSUFF= .so
%.so: %.o %.so: %.o
$(LD) -G -Bdynamic -o $@ $< $(LD) -G -Bdynamic -o $@ $<
...@@ -615,9 +574,6 @@ MK_PORT= irix5 ...@@ -615,9 +574,6 @@ MK_PORT= irix5
CC= cc CC= cc
#
# for postgres.mk
#
CFLAGS_BE+= -DUSE_POSIX_SIGNALS CFLAGS_BE+= -DUSE_POSIX_SIGNALS
# RANLIB is not used on IRIX 5 # RANLIB is not used on IRIX 5
...@@ -637,8 +593,6 @@ CFLAGS_BE+= -DSYSV_DIRENT ...@@ -637,8 +593,6 @@ CFLAGS_BE+= -DSYSV_DIRENT
LD_ADD+= $(LDADD_BE) LD_ADD+= $(LDADD_BE)
SLSUFF= .so
%.so: %.o %.so: %.o
$(LD) -G -Bdynamic -o $@ $< $(LD) -G -Bdynamic -o $@ $<
...@@ -663,17 +617,10 @@ MK_NO_LORDER= true ...@@ -663,17 +617,10 @@ MK_NO_LORDER= true
# use the regex library # use the regex library
USE_REGEX= 1 USE_REGEX= 1
#
# for postgres.user.mk
#
CFLAGS_SL= -fpic CFLAGS_SL= -fpic
%.so: %.o %.so: %.o
$(CC) -shared -o $@ $< $(CC) -shared -o $@ $<
#
# for postgres.mk
#
# The Linux gnulib #defines the problem away for you and calls # The Linux gnulib #defines the problem away for you and calls
# the BSD routines if you give it the right flags. # the BSD routines if you give it the right flags.
CFLAGS_BE= -D__USE_BSD -D__USE_BSD_SIGNAL CFLAGS_BE= -D__USE_BSD -D__USE_BSD_SIGNAL
...@@ -694,17 +641,12 @@ CC= gcc ...@@ -694,17 +641,12 @@ CC= gcc
INSTALL= /usr/bin/install INSTALL= /usr/bin/install
RANLIB= /usr/bin/ranlib RANLIB= /usr/bin/ranlib
#
# for postgres.user.mk
#
ifeq ($(CC), cc) ifeq ($(CC), cc)
CFLAGS_SL= -PIC CFLAGS_SL= -PIC
else else
CFLAGS_SL= -fPIC CFLAGS_SL= -fPIC
endif endif
SLSUFF= .so
%.so: %.o %.so: %.o
$(LD) -dc -dp -Bdynamic -o $@ $< $(LD) -dc -dp -Bdynamic -o $@ $<
endif endif
...@@ -717,9 +659,6 @@ MK_PORT= sparc_solaris ...@@ -717,9 +659,6 @@ MK_PORT= sparc_solaris
# cc won't work! # cc won't work!
CC= gcc CC= gcc
#
# for postgres.mk
#
CFLAGS_BE+= -DUSE_POSIX_SIGNALS CFLAGS_BE+= -DUSE_POSIX_SIGNALS
# RANLIB is not used on solaris # RANLIB is not used on solaris
...@@ -737,17 +676,12 @@ LDADD_BE+= -lsocket -lnsl ...@@ -737,17 +676,12 @@ LDADD_BE+= -lsocket -lnsl
LD_ADD+= $(LDADD_BE) LD_ADD+= $(LDADD_BE)
#
# for postgres.user.mk
#
ifeq ($(CC), cc) ifeq ($(CC), cc)
CFLAGS_SL= -K PIC CFLAGS_SL= -K PIC
else else
CFLAGS_SL= -fPIC CFLAGS_SL= -fPIC
endif endif
SLSUFF= .so
%.so: %.o %.so: %.o
$(LD) -G -Bdynamic -o $@ $< $(LD) -G -Bdynamic -o $@ $<
...@@ -764,9 +698,6 @@ MK_PORT= svr4 ...@@ -764,9 +698,6 @@ MK_PORT= svr4
CFLAGS+= -W0 CFLAGS+= -W0
YACC= bison -y YACC= bison -y
#
# for postgres.mk
#
CFLAGS_BE+= -DUSE_POSIX_SIGNALS CFLAGS_BE+= -DUSE_POSIX_SIGNALS
# MAKE_EXPORTS is required for svr4 loaders that want a file of # MAKE_EXPORTS is required for svr4 loaders that want a file of
...@@ -789,17 +720,12 @@ LDADD_BE+= -lsocket -lnsl -lc /usr/ucblib/libucb.a ...@@ -789,17 +720,12 @@ LDADD_BE+= -lsocket -lnsl -lc /usr/ucblib/libucb.a
LD_ADD+= $(LDADD_BE) LD_ADD+= $(LDADD_BE)
#
# for postgres.user.mk
#
ifeq ($(CC), cc) ifeq ($(CC), cc)
#CFLAGS_SL= -K PIC #CFLAGS_SL= -K PIC
else else
#CFLAGS_SL= -fPIC #CFLAGS_SL= -fPIC
endif endif
SLSUFF= .so
%.so: %.o %.so: %.o
$(LD) -G -Bdynamic -o $@ $< $(LD) -G -Bdynamic -o $@ $<
...@@ -812,9 +738,6 @@ endif ...@@ -812,9 +738,6 @@ endif
ifeq ($(PORTNAME), ultrix4) ifeq ($(PORTNAME), ultrix4)
MK_PORT= ultrix4 MK_PORT= ultrix4
#
# for postgres.mk
#
ifdef ENFORCE_ALIGNMENT ifdef ENFORCE_ALIGNMENT
CFLAGS_BE= -DNOFIXADE CFLAGS_BE= -DNOFIXADE
endif endif
...@@ -825,9 +748,6 @@ NO_BEFOREINSTL= true ...@@ -825,9 +748,6 @@ NO_BEFOREINSTL= true
INSTALL= /usr/bin/install INSTALL= /usr/bin/install
RANLIB= /usr/bin/ranlib RANLIB= /usr/bin/ranlib
#
# for postgres.user.mk
#
CFLAGS_SL= -G 0 CFLAGS_SL= -G 0
SLSUFF= .o SLSUFF= .o
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment