aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2000-10-21 22:36:14 +0000
committerPeter Eisentraut <peter_e@gmx.net>2000-10-21 22:36:14 +0000
commitf8ff1ee5aab125fc1e5e130e6055a0e6586ce440 (patch)
treeb8ccedfa296d6a8acbb7277e7c0347dbdfac6b66 /src
parent0968601b1baaceb8e9d6b437e8e740b4c9ff34c5 (diff)
downloadpostgresql-f8ff1ee5aab125fc1e5e130e6055a0e6586ce440.tar.gz
postgresql-f8ff1ee5aab125fc1e5e130e6055a0e6586ce440.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.global.in5
-rw-r--r--src/backend/main/main.c8
-rw-r--r--src/include/port/osf.h6
-rw-r--r--src/include/port/ultrix4.h1
-rw-r--r--src/makefiles/Makefile.aix13
-rw-r--r--src/makefiles/Makefile.beos6
-rw-r--r--src/makefiles/Makefile.bsdi18
-rw-r--r--src/makefiles/Makefile.dgux4
-rw-r--r--src/makefiles/Makefile.freebsd6
-rw-r--r--src/makefiles/Makefile.hpux9
-rw-r--r--src/makefiles/Makefile.irix55
-rw-r--r--src/makefiles/Makefile.linux4
-rw-r--r--src/makefiles/Makefile.netbsd6
-rw-r--r--src/makefiles/Makefile.openbsd6
-rw-r--r--src/makefiles/Makefile.osf8
-rw-r--r--src/makefiles/Makefile.qnx46
-rw-r--r--src/makefiles/Makefile.sco4
-rw-r--r--src/makefiles/Makefile.solaris11
-rw-r--r--src/makefiles/Makefile.sunos49
-rw-r--r--src/makefiles/Makefile.svr44
-rw-r--r--src/makefiles/Makefile.ultrix46
-rw-r--r--src/makefiles/Makefile.univel5
-rw-r--r--src/makefiles/Makefile.unixware4
-rw-r--r--src/makefiles/Makefile.win9
-rw-r--r--src/template/aix7
-rw-r--r--src/template/beos3
-rw-r--r--src/template/bsdi7
-rw-r--r--src/template/dgux3
-rw-r--r--src/template/freebsd3
-rw-r--r--src/template/hpux6
-rw-r--r--src/template/irix53
-rw-r--r--src/template/linux3
-rw-r--r--src/template/netbsd3
-rw-r--r--src/template/openbsd3
-rw-r--r--src/template/osf20
-rw-r--r--src/template/qnx43
-rw-r--r--src/template/sco3
-rw-r--r--src/template/solaris5
-rw-r--r--src/template/sunos411
-rw-r--r--src/template/svr43
-rw-r--r--src/template/ultrix45
-rw-r--r--src/template/univel3
-rw-r--r--src/template/unixware3
-rw-r--r--src/template/win2
44 files changed, 139 insertions, 123 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index da9cd4e990e..344888965fd 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -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@
diff --git a/src/backend/main/main.c b/src/backend/main/main.c
index 1ead86f4c33..9e2543b3b14 100644
--- a/src/backend/main/main.c
+++ b/src/backend/main/main.c
@@ -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);
diff --git a/src/include/port/osf.h b/src/include/port/osf.h
index 5f138a31791..6c0d7b2afdb 100644
--- a/src/include/port/osf.h
+++ b/src/include/port/osf.h
@@ -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
diff --git a/src/include/port/ultrix4.h b/src/include/port/ultrix4.h
index 3ac95a27591..b88b7015030 100644
--- a/src/include/port/ultrix4.h
+++ b/src/include/port/ultrix4.h
@@ -1,3 +1,4 @@
+#define NOFIXADE
#define USE_POSIX_TIME
#define NEED_STRDUP
diff --git a/src/makefiles/Makefile.aix b/src/makefiles/Makefile.aix
index 46bf9dfdabe..bb9c8f255c5 100644
--- a/src/makefiles/Makefile.aix
+++ b/src/makefiles/Makefile.aix
@@ -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
diff --git a/src/makefiles/Makefile.beos b/src/makefiles/Makefile.beos
index dd171c53555..fa26c993542 100644
--- a/src/makefiles/Makefile.beos
+++ b/src/makefiles/Makefile.beos
@@ -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_ $<
diff --git a/src/makefiles/Makefile.bsdi b/src/makefiles/Makefile.bsdi
index a990758f6d7..b83db6f67a8 100644
--- a/src/makefiles/Makefile.bsdi
+++ b/src/makefiles/Makefile.bsdi
@@ -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
diff --git a/src/makefiles/Makefile.dgux b/src/makefiles/Makefile.dgux
index 21a43c0f15a..c88ee14e0ea 100644
--- a/src/makefiles/Makefile.dgux
+++ b/src/makefiles/Makefile.dgux
@@ -1,2 +1,6 @@
+AROPT = crs
+DLSUFFIX = .so
+CFLAGS_SL = -fpic
+
%.so: %.o
$(CC) -shared -o $@ $<
diff --git a/src/makefiles/Makefile.freebsd b/src/makefiles/Makefile.freebsd
index cb73676c6ca..56bb93e8099 100644
--- a/src/makefiles/Makefile.freebsd
+++ b/src/makefiles/Makefile.freebsd
@@ -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
-
diff --git a/src/makefiles/Makefile.hpux b/src/makefiles/Makefile.hpux
index d93501e5d5f..17b3a98c0d9 100644
--- a/src/makefiles/Makefile.hpux
+++ b/src/makefiles/Makefile.hpux
@@ -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
diff --git a/src/makefiles/Makefile.irix5 b/src/makefiles/Makefile.irix5
index fcc72602e7d..cc018523bf6 100644
--- a/src/makefiles/Makefile.irix5
+++ b/src/makefiles/Makefile.irix5
@@ -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 $@ $<
diff --git a/src/makefiles/Makefile.linux b/src/makefiles/Makefile.linux
index d7f20ea86b0..268beb05aa2 100644
--- a/src/makefiles/Makefile.linux
+++ b/src/makefiles/Makefile.linux
@@ -1,5 +1,7 @@
+AROPT = crs
export_dynamic = -export-dynamic
-MK_NO_LORDER= true
+DLSUFFIX = .so
+CFLAGS_SL = -fpic
%.so: %.o
$(CC) -shared -o $@ $<
diff --git a/src/makefiles/Makefile.netbsd b/src/makefiles/Makefile.netbsd
index ef9fbbee641..79684ecfc15 100644
--- a/src/makefiles/Makefile.netbsd
+++ b/src/makefiles/Makefile.netbsd
@@ -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 $@ $<
diff --git a/src/makefiles/Makefile.openbsd b/src/makefiles/Makefile.openbsd
index ef9fbbee641..79684ecfc15 100644
--- a/src/makefiles/Makefile.openbsd
+++ b/src/makefiles/Makefile.openbsd
@@ -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 $@ $<
diff --git a/src/makefiles/Makefile.osf b/src/makefiles/Makefile.osf
index a9e8e948ec6..23156edc9d8 100644
--- a/src/makefiles/Makefile.osf
+++ b/src/makefiles/Makefile.osf
@@ -1,2 +1,8 @@
-%.so: %.o
+AROPT = crs
+DLSUFFIX = .so
+CFLAGS_SL =
+
+%.so: %.o
$(LD) -shared -expect_unresolved '*' -o $@ $<
+
+LDFLAGS += -rpath $(libdir)
diff --git a/src/makefiles/Makefile.qnx4 b/src/makefiles/Makefile.qnx4
index 4921bffd2e5..e9cfbce3eaf 100644
--- a/src/makefiles/Makefile.qnx4
+++ b/src/makefiles/Makefile.qnx4
@@ -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 $<'
diff --git a/src/makefiles/Makefile.sco b/src/makefiles/Makefile.sco
index 0cc90f9fd9d..a68f92e6251 100644
--- a/src/makefiles/Makefile.sco
+++ b/src/makefiles/Makefile.sco
@@ -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 $@ $<
diff --git a/src/makefiles/Makefile.solaris b/src/makefiles/Makefile.solaris
index 19ef50188b3..8c08f79e038 100644
--- a/src/makefiles/Makefile.solaris
+++ b/src/makefiles/Makefile.solaris
@@ -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 $@ $<
diff --git a/src/makefiles/Makefile.sunos4 b/src/makefiles/Makefile.sunos4
index 3bcdf0806c5..0b8542b4f2f 100644
--- a/src/makefiles/Makefile.sunos4
+++ b/src/makefiles/Makefile.sunos4
@@ -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 $@ $<
diff --git a/src/makefiles/Makefile.svr4 b/src/makefiles/Makefile.svr4
index 21e1d7207d7..dd1fdec4fa9 100644
--- a/src/makefiles/Makefile.svr4
+++ b/src/makefiles/Makefile.svr4
@@ -4,6 +4,8 @@
LDFLAGS+= -lc /usr/ucblib/libucb.a -LD-Blargedynsym
+DLSUFFIX = .so
+CFLAGS_SL =
+
%.so: %.o
$(LD) -G -Bdynamic -o $@ $<
-
diff --git a/src/makefiles/Makefile.ultrix4 b/src/makefiles/Makefile.ultrix4
index d71b474a245..09e37b7d271 100644
--- a/src/makefiles/Makefile.ultrix4
+++ b/src/makefiles/Makefile.ultrix4
@@ -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 $@ $<
diff --git a/src/makefiles/Makefile.univel b/src/makefiles/Makefile.univel
index 1fc4ee65d8f..f91cf357e73 100644
--- a/src/makefiles/Makefile.univel
+++ b/src/makefiles/Makefile.univel
@@ -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
-
diff --git a/src/makefiles/Makefile.unixware b/src/makefiles/Makefile.unixware
index 51ca500bb1d..f91cf357e73 100644
--- a/src/makefiles/Makefile.unixware
+++ b/src/makefiles/Makefile.unixware
@@ -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
-
diff --git a/src/makefiles/Makefile.win b/src/makefiles/Makefile.win
index 02456dff98c..bcc01c747af 100644
--- a/src/makefiles/Makefile.win
+++ b/src/makefiles/Makefile.win
@@ -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
diff --git a/src/template/aix b/src/template/aix
index 8b81c6e1549..75cd678a283 100644
--- a/src/template/aix
+++ b/src/template/aix
@@ -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
diff --git a/src/template/beos b/src/template/beos
index 9375b3aa661..c435200929c 100644
--- a/src/template/beos
+++ b/src/template/beos
@@ -1,4 +1 @@
-AROPT=crs
-SHARED_LIB='-fpic -DPIC'
CFLAGS='-O2'
-DLSUFFIX=.so
diff --git a/src/template/bsdi b/src/template/bsdi
index 1ea345595ed..d6698e77726 100644
--- a/src/template/bsdi
+++ b/src/template/bsdi
@@ -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
diff --git a/src/template/dgux b/src/template/dgux
index c0864198416..7abc138a9f9 100644
--- a/src/template/dgux
+++ b/src/template/dgux
@@ -1,4 +1 @@
-AROPT=crs
CFLAGS=
-SHARED_LIB=-fpic
-DLSUFFIX=.so
diff --git a/src/template/freebsd b/src/template/freebsd
index ba10deb6b25..c3706a65176 100644
--- a/src/template/freebsd
+++ b/src/template/freebsd
@@ -1,4 +1 @@
-AROPT=cq
-SHARED_LIB='-fpic -DPIC'
CFLAGS='-O2 -m486 -pipe'
-DLSUFFIX=.so
diff --git a/src/template/hpux b/src/template/hpux
index 91057f3c91f..2c3754ef7d8 100644
--- a/src/template/hpux
+++ b/src/template/hpux
@@ -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
diff --git a/src/template/irix5 b/src/template/irix5
index c1652186c4d..7abc138a9f9 100644
--- a/src/template/irix5
+++ b/src/template/irix5
@@ -1,4 +1 @@
-AROPT=crs
CFLAGS=
-SHARED_LIB=
-DLSUFFIX=.so
diff --git a/src/template/linux b/src/template/linux
index 0c2d6601941..02371c1d04f 100644
--- a/src/template/linux
+++ b/src/template/linux
@@ -1,7 +1,4 @@
-AROPT=crs
CFLAGS=-O2
-SHARED_LIB=-fpic
-DLSUFFIX=.so
case $host_cpu in
mips*) CFLAGS="$CFLAGS -mips2";;
diff --git a/src/template/netbsd b/src/template/netbsd
index 38fa1df7956..bfbcbdd5975 100644
--- a/src/template/netbsd
+++ b/src/template/netbsd
@@ -1,4 +1 @@
-AROPT=cq
-SHARED_LIB='-fpic -DPIC'
CFLAGS='-O2 -pipe'
-DLSUFFIX=.so
diff --git a/src/template/openbsd b/src/template/openbsd
index 38fa1df7956..bfbcbdd5975 100644
--- a/src/template/openbsd
+++ b/src/template/openbsd
@@ -1,4 +1 @@
-AROPT=cq
-SHARED_LIB='-fpic -DPIC'
CFLAGS='-O2 -pipe'
-DLSUFFIX=.so
diff --git a/src/template/osf b/src/template/osf
index aa1a84317b5..f41a0557d60 100644
--- a/src/template/osf
+++ b/src/template/osf
@@ -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=
diff --git a/src/template/qnx4 b/src/template/qnx4
index 001f1715c9f..cea09e25eea 100644
--- a/src/template/qnx4
+++ b/src/template/qnx4
@@ -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++
diff --git a/src/template/sco b/src/template/sco
index 8de1c8c2715..8b3a7bf0b72 100644
--- a/src/template/sco
+++ b/src/template/sco
@@ -1,5 +1,2 @@
-AROPT=cq
CFLAGS=
-SHARED_LIB='-K PIC'
-DLSUFFIX=.so
CC="$CC -b elf"
diff --git a/src/template/solaris b/src/template/solaris
index d77bec50b2f..33d40cfb87c 100644
--- a/src/template/solaris
+++ b/src/template/solaris
@@ -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
diff --git a/src/template/sunos4 b/src/template/sunos4
index 6c26fabf298..7abc138a9f9 100644
--- a/src/template/sunos4
+++ b/src/template/sunos4
@@ -1,10 +1 @@
-AROPT=cr
-DLSUFFIX=.so
-
-if test "$GCC" = yes ; then
- CFLAGS=
- SHARED_LIB=-fPIC
-else
- CFLAGS=
- SHARED_LIB=-PIC
-fi
+CFLAGS=
diff --git a/src/template/svr4 b/src/template/svr4
index c1652186c4d..7abc138a9f9 100644
--- a/src/template/svr4
+++ b/src/template/svr4
@@ -1,4 +1 @@
-AROPT=crs
CFLAGS=
-SHARED_LIB=
-DLSUFFIX=.so
diff --git a/src/template/ultrix4 b/src/template/ultrix4
index d708414ec4d..7abc138a9f9 100644
--- a/src/template/ultrix4
+++ b/src/template/ultrix4
@@ -1,4 +1 @@
-AROPT=crs
-CFLAGS=-DNOFIXADE
-SHARED_LIB='-G 0'
-DLSUFFIX=.so
+CFLAGS=
diff --git a/src/template/univel b/src/template/univel
index 8bc70f1ae9c..025fbda7bf4 100644
--- a/src/template/univel
+++ b/src/template/univel
@@ -1,5 +1,2 @@
-AROPT=crs
CFLAGS='-v -O -K i486,host,inline,loop_unroll -Dsvr4'
-SHARED_LIB='-K PIC'
-DLSUFFIX=.so
LIBS=-lc89
diff --git a/src/template/unixware b/src/template/unixware
index 989285e8fcc..a7e715bdc3a 100644
--- a/src/template/unixware
+++ b/src/template/unixware
@@ -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
diff --git a/src/template/win b/src/template/win
index d5734c0a8a4..fb2f10ea92f 100644
--- a/src/template/win
+++ b/src/template/win
@@ -1,6 +1,4 @@
-AROPT=crs
CFLAGS=-O2
SRCH_INC=/usr/local/include
SRCH_LIB=/usr/local/lib
-DLSUFFIX=.dll
LIBS=-lcygipc