Move DLSUFFIX, AROPT, and CFLAGS_SL settings from template to

Makefile.port, since they are of no use to configure and much of the
library magic happens in Makefile.port anyway.

Use __alpha, not __alpha__, since the former is universally available.
Remove -DNOFIXADE from the compile command line and put it in the port
include file.
This commit is contained in:
Peter Eisentraut 2000-10-21 22:36:14 +00:00
parent 0968601b1b
commit f8ff1ee5aa
46 changed files with 502 additions and 502 deletions

732
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -115,16 +115,15 @@ AC_LINK_FILES([src/makefiles/Makefile.${template}], [src/Makefile.port])
# Pick right test-and-set (TAS) code. Most platforms have inline
# assembler code in src/include/storage/s_lock.h, so we just use
# a dummy file here.
tas_file=dummy.s
need_tas=no
case $host in
*-*-hpux*) need_tas=yes; tas_file=hpux.s ;;
sparc-*-solaris*) need_tas=yes; tas_file=solaris_sparc.s ;;
i?86-*-solaris) need_tas=yes; tas_file=solaris_i386.s ;;
*) need_tas=no; tas_file=dummy.s ;;
esac
AC_LINK_FILES([src/backend/port/tas/${tas_file}], [src/backend/port/tas.s])
if test "$need_tas" = yes ; then
AC_LINK_FILES([src/backend/port/tas/${tas_file}], [src/backend/port/tas.s])
TAS=tas.o
fi
AC_SUBST(TAS)
@ -249,12 +248,7 @@ AC_PROG_CC_WORKS
AC_EXEEXT
AC_PROG_CPP
AC_PROG_GCC_TRADITIONAL
AC_SUBST(GCC)
AC_SUBST(AROPT)
AC_SUBST(SHARED_LIB)
AC_SUBST(DLSUFFIX)
AC_SUBST(DL_LIB)
# Create compiler version string
if test x"$GCC" = x"yes" ; then

View File

@ -1,5 +1,5 @@
# -*-makefile-*-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.102 2000/10/20 23:57:33 petere Exp $
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.103 2000/10/21 22:36:11 petere Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
@ -137,7 +137,6 @@ override CPPFLAGS += $(sort -I$(top_srcdir)/src/include -I$(top_builddir)/src/in
CC = @CC@
GCC = @GCC@
CFLAGS = @CFLAGS@
CFLAGS_SL = @SHARED_LIB@
ifeq ($(GCC), yes)
CFLAGS += -Wall -Wmissing-prototypes -Wmissing-declarations
endif
@ -158,7 +157,6 @@ FLEXFLAGS = @FLEXFLAGS@ $(LFLAGS)
# Linking
AROPT = @AROPT@
LIBS = @LIBS@
LD = @LD@
with_gnu_ld = @with_gnu_ld@
@ -166,7 +164,6 @@ LDFLAGS = @LDFLAGS@ $(LIBS)
KRB_LIBS = @KRB_LIBS@
LDREL = -r
LDOUT = -o
DLSUFFIX = @DLSUFFIX@
RANLIB = @RANLIB@
LORDER = @LORDER@
X = @EXEEXT@

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.32 2000/10/07 14:39:07 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.33 2000/10/21 22:36:11 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -17,7 +17,7 @@
#include <pwd.h>
#include <unistd.h>
#if defined(__alpha__) && !defined(linux)
#if defined(__alpha) && !defined(linux)
#include <sys/sysinfo.h>
#include "machine/hal_sysinfo.h"
#define ASSEMBLER
@ -43,7 +43,7 @@ main(int argc, char *argv[])
{
int len;
#if defined(__alpha__)
#if defined(__alpha)
#ifdef NOFIXADE
int buffer[] = {SSIN_UACPROC, UAC_SIGBUS};
@ -71,7 +71,7 @@ main(int argc, char *argv[])
syscall(SYS_sysmips, MIPS_FIXADE, 0, NULL, NULL, NULL);
#endif
#if defined(__alpha__)
#if defined(__alpha)
if (setsysinfo(SSI_NVPAIRS, buffer, 1, (caddr_t) NULL,
(unsigned long) NULL) < 0)
elog(NOTICE, "setsysinfo failed: %d\n", errno);

View File

@ -1,3 +1,4 @@
#define NOFIXADE
#define USE_POSIX_TIME
#define DISABLE_XOPEN_NLS
#define HAS_TEST_AND_SET
@ -5,8 +6,3 @@
/*typedef msemaphore slock_t;*/
#include <alpha/builtins.h>
typedef volatile long slock_t;
/* some platforms define __alpha, but not __alpha__ */
#if defined(__alpha) && !defined(__alpha__)
#define __alpha__
#endif

View File

@ -1,3 +1,4 @@
#define NOFIXADE
#define USE_POSIX_TIME
#define NEED_STRDUP

View File

@ -4,6 +4,19 @@ MAKE_EXPORTS= true
RANLIB= touch
MK_NO_LORDER= true
AROPT = crs
DLSUFFIX = .so
ifneq ($(GCC), yes)
ifeq ($(host_os), aix3.2.5)
CFLAGS_SL = -e _nostart
endif
ifeq ($(host_os), aix4.1)
CFLAGS_SL = -bnoentry
endif
endif
CFLAGS_SL += -lc
EXPSUFF= .exp
IMPSUFF= .imp

View File

@ -1,7 +1,13 @@
MK_NO_LORDER=true
AROPT = crs
ifdef ELF_SYSTEM
export_dynamic = -Wl,-E
endif
DLSUFFIX = .so
CFLAGS_SL = -fpic -DPIC
%.so: %.o
ln -fs $(top_srcdir)/src/backend/postgres _APP_
$(CC) -nostart -Xlinker -soname=$@ -o $@ _APP_ $<

View File

@ -1,8 +1,22 @@
# for bsdi 4.0 ELF
# if we defined .so in template/bsdi_4.0
AROPT = cq
# bsdi 4.0 and later is ELF
DLSUFFIX = .so
ifeq ($(host_os), bsdi2.0)
DLSUFFIX = .o
endif
ifeq ($(host_os), bsdi2.1)
DLSUFFIX = .o
endif
ifeq ($(findstring bsdi3, $(host_os)), bsdi3)
DLSUFFIX = .o
endif
ifeq ($(DLSUFFIX), .so)
CFLAGS_SL = -fpic
export_dynamic = -export-dynamic
else
CFLAGS_SL =
endif
%.so: %.o

View File

@ -1,2 +1,6 @@
AROPT = crs
DLSUFFIX = .so
CFLAGS_SL = -fpic
%.so: %.o
$(CC) -shared -o $@ $<

View File

@ -1,7 +1,12 @@
AROPT = cq
ifdef ELF_SYSTEM
export_dynamic = -export-dynamic
endif
DLSUFFIX = .so
CFLAGS_SL = -fpic -DPIC
%.so: %.o
ifdef ELF_SYSTEM
$(LD) -x -shared -o $@ $<
@ -14,4 +19,3 @@ else
@rm -f $@
$(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
endif

View File

@ -26,6 +26,15 @@ endif
LDFLAGS+= -Wl,+b -Wl,$(libdir) -Wl,-z
export_dynamic = -Wl,-E
AROPT = crs
DLSUFFIX = .sl
ifeq ($(GCC), yes)
CFLAGS_SL = -fPIC
else
CFLAGS_SL = +z
endif
# Rule for building shared libs (currently used only for regression test
# shlib ... should go away, since this is not really enough knowledge)
%.sl: %.o

View File

@ -1,7 +1,10 @@
# RANLIB is not used on IRIX 5
RANLIB= touch
MK_NO_LORDER= true
AROPT = crs
DLSUFFIX = .so
CFLAGS_SL =
%.so: %.o
$(LD) -G -Bdynamic -shared -o $@ $<

View File

@ -1,5 +1,7 @@
AROPT = crs
export_dynamic = -export-dynamic
MK_NO_LORDER= true
DLSUFFIX = .so
CFLAGS_SL = -fpic
%.so: %.o
$(CC) -shared -o $@ $<

View File

@ -1,6 +1,12 @@
AROPT = cq
ifdef ELF_SYSTEM
export_dynamic = -Wl,-E
endif
DLSUFFIX = .so
CFLAGS_SL = -fpic -DPIC
%.so: %.o
ifdef ELF_SYSTEM
$(LD) -x -Bshareable -o $@ $<

View File

@ -1,6 +1,12 @@
AROPT = cq
ifdef ELF_SYSTEM
export_dynamic = -Wl,-E
endif
DLSUFFIX = .so
CFLAGS_SL = -fpic -DPIC
%.so: %.o
ifdef ELF_SYSTEM
$(LD) -x -Bshareable -o $@ $<

View File

@ -1,2 +1,8 @@
%.so: %.o
AROPT = crs
DLSUFFIX = .so
CFLAGS_SL =
%.so: %.o
$(LD) -shared -expect_unresolved '*' -o $@ $<
LDFLAGS += -rpath $(libdir)

View File

@ -1,11 +1,15 @@
MK_NO_LORDER= true
CXXFLAGS+= -I/usr/local/lib/gcc-lib/i386-pc-qnx4/egcs-2.91.60/include/g++
AR= ar
AROPT = cr
LD= $(AR)
LDREL= $(AROPT)
LDOUT=
LIBS= -lunix
LDFLAGS= $(LIBS)
DLSUFFIX = .so
CFLAGS_SL =
%$(DLSUFFIX): %.o
@echo Cannot make shared library $@ from $*.o
@echo 'cannot make shared object $@ from $<'

View File

@ -1,5 +1,9 @@
override CFLAGS += -dy
export_dynamic = -W l,-Bexport
AROPT = cq
DLSUFFIX = .so
CFLAGS_SL = -K PIC
%.so: %.o
$(LD) -G -Bdynamic -o $@ $<

View File

@ -1,8 +1,17 @@
# $Header: /cvsroot/pgsql/src/makefiles/Makefile.solaris,v 1.2 2000/10/20 23:57:34 petere Exp $
# $Header: /cvsroot/pgsql/src/makefiles/Makefile.solaris,v 1.3 2000/10/21 22:36:13 petere Exp $
AROPT = crs
ifeq ($(with_gnu_ld), yes)
export_dynamic = -Wl,-E
endif
DLSUFFIX = .so
ifeq ($(GCC), yes)
CFLAGS_SL = -fPIC
else
CFLAGS_SL = -KPIC
endif
%.so: %.o
$(LD) -G -Bdynamic -o $@ $<

View File

@ -1,2 +1,11 @@
AROPT = cr
DLSUFFIX = .so
ifeq ($(GCC), yes)
CFLAGS_SL = -fPIC
else
CFLAGS_SL = -PIC
endif
%.so: %.o
$(LD) -dc -dp -Bdynamic -o $@ $<

View File

@ -4,6 +4,8 @@
LDFLAGS+= -lc /usr/ucblib/libucb.a -LD-Blargedynsym
DLSUFFIX = .so
CFLAGS_SL =
%.so: %.o
$(LD) -G -Bdynamic -o $@ $<

View File

@ -1,7 +1,9 @@
SHELL=/bin/sh5
AROPT = crs
#
DLSUFFIX = .so
# "-G 0" works for both DEC cc and GNU cc.
#
CFLAGS_SL = -G 0
%.so: %.c
$(CC) -c -G 0 $(CPPFLAGS) $(CFLAGS) -o $@ $<

View File

@ -1,8 +1,9 @@
LDFLAGS+= -lc89
AROPT = crs
export_dynamic = -Wl,-Bexport
DLSUFFIX = .so
CFLAGS_SL = -K PIC
%.so: %.o
$(LD) -G -Bdynamic -o $@ $<
INSTALL= /usr/ucb/install

View File

@ -1,7 +1,9 @@
AROPT = crs
export_dynamic = -Wl,-Bexport
DLSUFFIX = .so
CFLAGS_SL = -K PIC
%.so: %.o
$(LD) -G -Bdynamic -o $@ $<
INSTALL= /usr/ucb/install

View File

@ -1,4 +1,4 @@
# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.6 2000/10/20 21:04:13 petere Exp $
# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.7 2000/10/21 22:36:13 petere Exp $
LDFLAGS+= -g
DLLTOOL= dlltool
DLLWRAP= dllwrap
@ -11,12 +11,15 @@ SHLIB_LINK=$(DLLLIBS)
# (see http://sources.redhat.com/cygwin/faq/faq.html#SEC110)
LIBS:=$(filter-out -lm -lc, $(LIBS))
AROPT = crs
DLSUFFIX = .dll
CFLAGS_SL =
%.dll: %.o
$(DLLTOOL) --export-all --output-def $*.def $<
$(DLLWRAP) -o $@ --def $*.def $< $(top_builddir)/src/utils/dllinit.o $(DLLLIBS)
rm -f $*.def
curdir:=$(shell pwd)
ifeq ($(findstring backend,$(curdir)), backend)
ifeq ($(findstring backend,$(subdir)), backend)
override CPPFLAGS+= -DBUILDING_DLL=1
endif

View File

@ -1,23 +1,16 @@
AROPT=crs
DLSUFFIX=.so
if test "$GCC" = yes ; then
CFLAGS=-pipe
CXXFLAGS=-pipe
SHARED_LIB=-lc
else # not GCC
case $host_os in
aix3.2.5)
CFLAGS='-qchars=signed -qmaxmem=8192 -qhalt=w -qsrcmsg'
SHARED_LIB='-e _nostart -lc'
;;
aix4.1)
CFLAGS='-qchars=signed -qmaxmem=8192 -qhalt=w -qsrcmsg -qcheck=divzero'
SHARED_LIB='-bnoentry -lc'
;;
aix4.2 | aix4.3)
CFLAGS='-qmaxmem=16384 -qhalt=w -qsrcmsg -qlanglvl=extended -qlonglong'
SHARED_LIB='-lc'
;;
esac
fi # not GCC

View File

@ -1,4 +1 @@
AROPT=crs
SHARED_LIB='-fpic -DPIC'
CFLAGS='-O2'
DLSUFFIX=.so

View File

@ -1,4 +1,3 @@
AROPT=cq
CFLAGS='-O2 -pipe'
case $host_cpu in
@ -11,12 +10,6 @@ esac
case $host_os in
bsdi2.0 | bsdi2.1 | bsdi3*)
SHARED_LIB=
DLSUFFIX=.o
CC=gcc2
;;
*)
SHARED_LIB=-fpic
DLSUFFIX=.so
;;
esac

View File

@ -1,4 +1 @@
AROPT=crs
CFLAGS=
SHARED_LIB=-fpic
DLSUFFIX=.so

View File

@ -1,4 +1 @@
AROPT=cq
SHARED_LIB='-fpic -DPIC'
CFLAGS='-O2 -m486 -pipe'
DLSUFFIX=.so

View File

@ -1,14 +1,8 @@
AROPT=crs
DLSUFFIX=.sl
if test "$GCC" = yes ; then
CFLAGS=-O2
SHARED_LIB=-fPIC
DL_LIB=/usr/lib/libdld.sl
CCC=g++
else
CFLAGS=-Ae
SHARED_LIB=+z
CPP='cc -E -Ae'
CCC=aCC
fi

View File

@ -1,4 +1 @@
AROPT=crs
CFLAGS=
SHARED_LIB=
DLSUFFIX=.so

View File

@ -1,7 +1,4 @@
AROPT=crs
CFLAGS=-O2
SHARED_LIB=-fpic
DLSUFFIX=.so
case $host_cpu in
mips*) CFLAGS="$CFLAGS -mips2";;

View File

@ -1,4 +1 @@
AROPT=cq
SHARED_LIB='-fpic -DPIC'
CFLAGS='-O2 -pipe'
DLSUFFIX=.so

View File

@ -1,4 +1 @@
AROPT=cq
SHARED_LIB='-fpic -DPIC'
CFLAGS='-O2 -pipe'
DLSUFFIX=.so

View File

@ -1,21 +1,9 @@
AROPT=crs
# NOFIXADE disallows unaligned access.
# on Ultrix and OSF/1 it invokes an explicit syscall.
# on HP-UX it turns off certain compiler options.
# This is defined here because a bunch of clients include tmp/c.h,
# which is where the work is done on HP-UX. It only affects the
# backend on Ultrix and OSF/1.
if test "$GCC" = yes ; then
CFLAGS='-D__alpha__ -DNOFIXADE'
CFLAGS=
CCC=g++
else
CFLAGS='-D__alpha__ -DNOFIXADE -std -O4 -Olimit 2000'
LDFLAGS='-rpath $(libdir)'
CC="$CC -std"
CFLAGS='-O4 -Olimit 2000'
CCC=cxx
CXXFLAGS='-D__alpha__ -DNOFIXADE -O4 -Olimit 2000'
CXXFLAGS='-O4 -Olimit 2000'
fi
DLSUFFIX=.so
SHARED_LIB=

View File

@ -1,6 +1,3 @@
AROPT=cr
CFLAGS=
LIBS=-lunix
SHARED_LIB=
DLSUFFIX=.so
CXXFLAGS=-I/usr/local/lib/gcc-lib/i386-pc-qnx4/egcs-2.91.60/include/g++

View File

@ -1,5 +1,2 @@
AROPT=cq
CFLAGS=
SHARED_LIB='-K PIC'
DLSUFFIX=.so
CC="$CC -b elf"

View File

@ -1,11 +1,6 @@
AROPT=crs
DLSUFFIX=.so
if test "$GCC" = yes ; then
CFLAGS=
SHARED_LIB=-fPIC
else
CC="$CC -Xa" # relaxed ISO C mode
CFLAGS=-v # -v is like gcc -Wall
SHARED_LIB=-KPIC
fi

View File

@ -1,10 +1 @@
AROPT=cr
DLSUFFIX=.so
if test "$GCC" = yes ; then
CFLAGS=
SHARED_LIB=-fPIC
else
CFLAGS=
SHARED_LIB=-PIC
fi
CFLAGS=

View File

@ -1,4 +1 @@
AROPT=crs
CFLAGS=
SHARED_LIB=
DLSUFFIX=.so

View File

@ -1,4 +1 @@
AROPT=crs
CFLAGS=-DNOFIXADE
SHARED_LIB='-G 0'
DLSUFFIX=.so
CFLAGS=

View File

@ -1,5 +1,2 @@
AROPT=crs
CFLAGS='-v -O -K i486,host,inline,loop_unroll -Dsvr4'
SHARED_LIB='-K PIC'
DLSUFFIX=.so
LIBS=-lc89

View File

@ -1,6 +1,3 @@
AROPT=crs
CFLAGS='-O -K host,inline,loop_unroll,alloca -Dsvr4'
SHARED_LIB='-K PIC'
SRCH_INC='/opt/include'
SRCH_LIB='/opt/lib'
DLSUFFIX=.so

View File

@ -1,6 +1,4 @@
AROPT=crs
CFLAGS=-O2
SRCH_INC=/usr/local/include
SRCH_LIB=/usr/local/lib
DLSUFFIX=.dll
LIBS=-lcygipc