Skip to content

Commit f8ff1ee

Browse files
committed
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.
1 parent 0968601 commit f8ff1ee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+502
-502
lines changed

configure

Lines changed: 361 additions & 371 deletions
Large diffs are not rendered by default.

configure.in

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,15 @@ AC_LINK_FILES([src/makefiles/Makefile.${template}], [src/Makefile.port])
115115
# Pick right test-and-set (TAS) code. Most platforms have inline
116116
# assembler code in src/include/storage/s_lock.h, so we just use
117117
# a dummy file here.
118-
tas_file=dummy.s
119-
need_tas=no
120118
case $host in
121119
*-*-hpux*) need_tas=yes; tas_file=hpux.s ;;
122120
sparc-*-solaris*) need_tas=yes; tas_file=solaris_sparc.s ;;
123121
i?86-*-solaris) need_tas=yes; tas_file=solaris_i386.s ;;
122+
*) need_tas=no; tas_file=dummy.s ;;
124123
esac
124+
AC_LINK_FILES([src/backend/port/tas/${tas_file}], [src/backend/port/tas.s])
125125

126126
if test "$need_tas" = yes ; then
127-
AC_LINK_FILES([src/backend/port/tas/${tas_file}], [src/backend/port/tas.s])
128127
TAS=tas.o
129128
fi
130129
AC_SUBST(TAS)
@@ -249,12 +248,7 @@ AC_PROG_CC_WORKS
249248
AC_EXEEXT
250249
AC_PROG_CPP
251250
AC_PROG_GCC_TRADITIONAL
252-
253251
AC_SUBST(GCC)
254-
AC_SUBST(AROPT)
255-
AC_SUBST(SHARED_LIB)
256-
AC_SUBST(DLSUFFIX)
257-
AC_SUBST(DL_LIB)
258252

259253
# Create compiler version string
260254
if test x"$GCC" = x"yes" ; then

src/Makefile.global.in

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-makefile-*-
2-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.102 2000/10/20 23:57:33 petere Exp $
2+
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.103 2000/10/21 22:36:11 petere Exp $
33

44
#------------------------------------------------------------------------------
55
# 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
137137
CC = @CC@
138138
GCC = @GCC@
139139
CFLAGS = @CFLAGS@
140-
CFLAGS_SL = @SHARED_LIB@
141140
ifeq ($(GCC), yes)
142141
CFLAGS += -Wall -Wmissing-prototypes -Wmissing-declarations
143142
endif
@@ -158,15 +157,13 @@ FLEXFLAGS = @FLEXFLAGS@ $(LFLAGS)
158157

159158
# Linking
160159

161-
AROPT = @AROPT@
162160
LIBS = @LIBS@
163161
LD = @LD@
164162
with_gnu_ld = @with_gnu_ld@
165163
LDFLAGS = @LDFLAGS@ $(LIBS)
166164
KRB_LIBS = @KRB_LIBS@
167165
LDREL = -r
168166
LDOUT = -o
169-
DLSUFFIX = @DLSUFFIX@
170167
RANLIB = @RANLIB@
171168
LORDER = @LORDER@
172169
X = @EXEEXT@

src/backend/main/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.32 2000/10/07 14:39:07 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.33 2000/10/21 22:36:11 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -17,7 +17,7 @@
1717
#include <pwd.h>
1818
#include <unistd.h>
1919

20-
#if defined(__alpha__) && !defined(linux)
20+
#if defined(__alpha) && !defined(linux)
2121
#include <sys/sysinfo.h>
2222
#include "machine/hal_sysinfo.h"
2323
#define ASSEMBLER
@@ -43,7 +43,7 @@ main(int argc, char *argv[])
4343
{
4444
int len;
4545

46-
#if defined(__alpha__)
46+
#if defined(__alpha)
4747
#ifdef NOFIXADE
4848
int buffer[] = {SSIN_UACPROC, UAC_SIGBUS};
4949

@@ -71,7 +71,7 @@ main(int argc, char *argv[])
7171
syscall(SYS_sysmips, MIPS_FIXADE, 0, NULL, NULL, NULL);
7272
#endif
7373

74-
#if defined(__alpha__)
74+
#if defined(__alpha)
7575
if (setsysinfo(SSI_NVPAIRS, buffer, 1, (caddr_t) NULL,
7676
(unsigned long) NULL) < 0)
7777
elog(NOTICE, "setsysinfo failed: %d\n", errno);

src/include/port/osf.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1+
#define NOFIXADE
12
#define USE_POSIX_TIME
23
#define DISABLE_XOPEN_NLS
34
#define HAS_TEST_AND_SET
45
/*#include <sys/mman.h>*/ /* for msemaphore */
56
/*typedef msemaphore slock_t;*/
67
#include <alpha/builtins.h>
78
typedef volatile long slock_t;
8-
9-
/* some platforms define __alpha, but not __alpha__ */
10-
#if defined(__alpha) && !defined(__alpha__)
11-
#define __alpha__
12-
#endif

src/include/port/ultrix4.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#define NOFIXADE
12
#define USE_POSIX_TIME
23
#define NEED_STRDUP
34

src/makefiles/Makefile.aix

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ MAKE_EXPORTS= true
44

55
RANLIB= touch
66
MK_NO_LORDER= true
7+
AROPT = crs
8+
9+
DLSUFFIX = .so
10+
ifneq ($(GCC), yes)
11+
ifeq ($(host_os), aix3.2.5)
12+
CFLAGS_SL = -e _nostart
13+
endif
14+
ifeq ($(host_os), aix4.1)
15+
CFLAGS_SL = -bnoentry
16+
endif
17+
endif
18+
CFLAGS_SL += -lc
19+
720

821
EXPSUFF= .exp
922
IMPSUFF= .imp

src/makefiles/Makefile.beos

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
MK_NO_LORDER=true
2+
AROPT = crs
3+
24
ifdef ELF_SYSTEM
35
export_dynamic = -Wl,-E
46
endif
7+
8+
DLSUFFIX = .so
9+
CFLAGS_SL = -fpic -DPIC
10+
511
%.so: %.o
612
ln -fs $(top_srcdir)/src/backend/postgres _APP_
713
$(CC) -nostart -Xlinker -soname=$@ -o $@ _APP_ $<

src/makefiles/Makefile.bsdi

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1-
# for bsdi 4.0 ELF
2-
# if we defined .so in template/bsdi_4.0
1+
AROPT = cq
2+
3+
# bsdi 4.0 and later is ELF
4+
DLSUFFIX = .so
5+
ifeq ($(host_os), bsdi2.0)
6+
DLSUFFIX = .o
7+
endif
8+
ifeq ($(host_os), bsdi2.1)
9+
DLSUFFIX = .o
10+
endif
11+
ifeq ($(findstring bsdi3, $(host_os)), bsdi3)
12+
DLSUFFIX = .o
13+
endif
314

415
ifeq ($(DLSUFFIX), .so)
16+
CFLAGS_SL = -fpic
517
export_dynamic = -export-dynamic
18+
else
19+
CFLAGS_SL =
620
endif
721

822
%.so: %.o

src/makefiles/Makefile.dgux

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
AROPT = crs
2+
DLSUFFIX = .so
3+
CFLAGS_SL = -fpic
4+
15
%.so: %.o
26
$(CC) -shared -o $@ $<

0 commit comments

Comments
 (0)