Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+361-371
Large diffs are not rendered by default.

configure.in

+2-8
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

+1-4
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

+4-4
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

+1-5
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

+1
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

+13
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

+6
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

+16-2
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

+4
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 $@ $<

src/makefiles/Makefile.freebsd

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1+
AROPT = cq
2+
13
ifdef ELF_SYSTEM
24
export_dynamic = -export-dynamic
35
endif
46

7+
DLSUFFIX = .so
8+
CFLAGS_SL = -fpic -DPIC
9+
510
%.so: %.o
611
ifdef ELF_SYSTEM
712
$(LD) -x -shared -o $@ $<
@@ -14,4 +19,3 @@ else
1419
@rm -f $@
1520
$(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
1621
endif
17-

src/makefiles/Makefile.hpux

+9
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ endif
2626
LDFLAGS+= -Wl,+b -Wl,$(libdir) -Wl,-z
2727
export_dynamic = -Wl,-E
2828

29+
AROPT = crs
30+
31+
DLSUFFIX = .sl
32+
ifeq ($(GCC), yes)
33+
CFLAGS_SL = -fPIC
34+
else
35+
CFLAGS_SL = +z
36+
endif
37+
2938
# Rule for building shared libs (currently used only for regression test
3039
# shlib ... should go away, since this is not really enough knowledge)
3140
%.sl: %.o

src/makefiles/Makefile.irix5

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
21
# RANLIB is not used on IRIX 5
32
RANLIB= touch
43
MK_NO_LORDER= true
4+
AROPT = crs
5+
6+
DLSUFFIX = .so
7+
CFLAGS_SL =
58

69
%.so: %.o
710
$(LD) -G -Bdynamic -shared -o $@ $<

src/makefiles/Makefile.linux

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
AROPT = crs
12
export_dynamic = -export-dynamic
2-
MK_NO_LORDER= true
3+
DLSUFFIX = .so
4+
CFLAGS_SL = -fpic
35

46
%.so: %.o
57
$(CC) -shared -o $@ $<

src/makefiles/Makefile.netbsd

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
AROPT = cq
2+
13
ifdef ELF_SYSTEM
24
export_dynamic = -Wl,-E
35
endif
6+
7+
DLSUFFIX = .so
8+
CFLAGS_SL = -fpic -DPIC
9+
410
%.so: %.o
511
ifdef ELF_SYSTEM
612
$(LD) -x -Bshareable -o $@ $<

src/makefiles/Makefile.openbsd

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
AROPT = cq
2+
13
ifdef ELF_SYSTEM
24
export_dynamic = -Wl,-E
35
endif
6+
7+
DLSUFFIX = .so
8+
CFLAGS_SL = -fpic -DPIC
9+
410
%.so: %.o
511
ifdef ELF_SYSTEM
612
$(LD) -x -Bshareable -o $@ $<

src/makefiles/Makefile.osf

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1-
%.so: %.o
1+
AROPT = crs
2+
DLSUFFIX = .so
3+
CFLAGS_SL =
4+
5+
%.so: %.o
26
$(LD) -shared -expect_unresolved '*' -o $@ $<
7+
8+
LDFLAGS += -rpath $(libdir)

src/makefiles/Makefile.qnx4

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
MK_NO_LORDER= true
22
CXXFLAGS+= -I/usr/local/lib/gcc-lib/i386-pc-qnx4/egcs-2.91.60/include/g++
33
AR= ar
4+
AROPT = cr
45
LD= $(AR)
56
LDREL= $(AROPT)
67
LDOUT=
78
LIBS= -lunix
89
LDFLAGS= $(LIBS)
910

11+
DLSUFFIX = .so
12+
CFLAGS_SL =
13+
1014
%$(DLSUFFIX): %.o
11-
@echo Cannot make shared library $@ from $*.o
15+
@echo 'cannot make shared object $@ from $<'

src/makefiles/Makefile.sco

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
override CFLAGS += -dy
22
export_dynamic = -W l,-Bexport
3+
AROPT = cq
4+
5+
DLSUFFIX = .so
6+
CFLAGS_SL = -K PIC
37

48
%.so: %.o
59
$(LD) -G -Bdynamic -o $@ $<

src/makefiles/Makefile.solaris

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1-
# $Header: /cvsroot/pgsql/src/makefiles/Makefile.solaris,v 1.2 2000/10/20 23:57:34 petere Exp $
1+
# $Header: /cvsroot/pgsql/src/makefiles/Makefile.solaris,v 1.3 2000/10/21 22:36:13 petere Exp $
2+
3+
AROPT = crs
24

35
ifeq ($(with_gnu_ld), yes)
46
export_dynamic = -Wl,-E
57
endif
68

9+
DLSUFFIX = .so
10+
ifeq ($(GCC), yes)
11+
CFLAGS_SL = -fPIC
12+
else
13+
CFLAGS_SL = -KPIC
14+
endif
15+
716
%.so: %.o
817
$(LD) -G -Bdynamic -o $@ $<

src/makefiles/Makefile.sunos4

+9
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1+
AROPT = cr
2+
3+
DLSUFFIX = .so
4+
ifeq ($(GCC), yes)
5+
CFLAGS_SL = -fPIC
6+
else
7+
CFLAGS_SL = -PIC
8+
endif
9+
110
%.so: %.o
211
$(LD) -dc -dp -Bdynamic -o $@ $<

src/makefiles/Makefile.svr4

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
LDFLAGS+= -lc /usr/ucblib/libucb.a -LD-Blargedynsym
66

7+
DLSUFFIX = .so
8+
CFLAGS_SL =
9+
710
%.so: %.o
811
$(LD) -G -Bdynamic -o $@ $<
9-

src/makefiles/Makefile.ultrix4

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
SHELL=/bin/sh5
2+
AROPT = crs
23

3-
#
4+
DLSUFFIX = .so
45
# "-G 0" works for both DEC cc and GNU cc.
5-
#
6+
CFLAGS_SL = -G 0
7+
68
%.so: %.c
79
$(CC) -c -G 0 $(CPPFLAGS) $(CFLAGS) -o $@ $<

src/makefiles/Makefile.univel

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
LDFLAGS+= -lc89
1+
AROPT = crs
22
export_dynamic = -Wl,-Bexport
3+
DLSUFFIX = .so
4+
CFLAGS_SL = -K PIC
35

46
%.so: %.o
57
$(LD) -G -Bdynamic -o $@ $<
68

79
INSTALL= /usr/ucb/install
8-

src/makefiles/Makefile.unixware

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
AROPT = crs
12
export_dynamic = -Wl,-Bexport
3+
DLSUFFIX = .so
4+
CFLAGS_SL = -K PIC
25

36
%.so: %.o
47
$(LD) -G -Bdynamic -o $@ $<
58

69
INSTALL= /usr/ucb/install
7-

0 commit comments

Comments
 (0)