Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8753b23

Browse files
committed
Fix 'SO__MINOR_VERSION' typo for irix5; add AIX shlib support
from Andreas Z.; minor cosmetic cleanups.
1 parent36ce6d4 commit8753b23

File tree

1 file changed

+41
-19
lines changed

1 file changed

+41
-19
lines changed

‎src/Makefile.shlib

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Copyright (c) 1998, Regents of the University of California
77
#
88
# IDENTIFICATION
9-
# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.13 1999/07/15 02:03:00 tgl Exp $
9+
# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.14 1999/07/16 22:56:01 tgl Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

@@ -56,25 +56,12 @@ install-shlib-dep :=
5656
# Makefile.global (or really Makefile.port) to supply DLSUFFIX and other
5757
# symbols.
5858

59-
ifeq ($(PORTNAME), irix5)
60-
install-shlib-dep := install-shlib
61-
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO__MINOR_VERSION)
62-
LDFLAGS_SL := -shared
63-
CFLAGS += $(CFLAGS_SL)
64-
endif
59+
# Try to keep the sections in some kind of order, folks...
6560

66-
ifeq ($(PORTNAME), freebsd)
67-
ifdef BSD_SHLIB
68-
install-shlib-dep:= install-shlib
69-
ifdef ELF_SYSTEM
70-
shlib:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
71-
LDFLAGS_SL:= -x -shared -soname $(shlib)
72-
else
73-
shlib:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
74-
LDFLAGS_SL:= -x -Bshareable -Bforcearchive
75-
endif
76-
CFLAGS+= $(CFLAGS_SL)
77-
endif
61+
ifeq ($(PORTNAME), aix)
62+
install-shlib-dep:= install-shlib
63+
shlib:= lib$(NAME)$(DLSUFFIX)
64+
SHLIB_LINK+= -lc
7865
endif
7966

8067
ifeq ($(PORTNAME), bsd)
@@ -108,6 +95,20 @@ ifeq ($(PORTNAME), bsdi)
10895
endif
10996
endif
11097

98+
ifeq ($(PORTNAME), freebsd)
99+
ifdef BSD_SHLIB
100+
install-shlib-dep:= install-shlib
101+
ifdef ELF_SYSTEM
102+
shlib:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
103+
LDFLAGS_SL:= -x -shared -soname $(shlib)
104+
else
105+
shlib:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
106+
LDFLAGS_SL:= -x -Bshareable -Bforcearchive
107+
endif
108+
CFLAGS+= $(CFLAGS_SL)
109+
endif
110+
endif
111+
111112
ifeq ($(PORTNAME), hpux)
112113
install-shlib-dep:= install-shlib
113114
# HPUX doesn't believe in version numbers for shlibs
@@ -116,6 +117,13 @@ ifeq ($(PORTNAME), hpux)
116117
CFLAGS+= $(CFLAGS_SL)
117118
endif
118119

120+
ifeq ($(PORTNAME), irix5)
121+
install-shlib-dep := install-shlib
122+
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
123+
LDFLAGS_SL := -shared
124+
CFLAGS += $(CFLAGS_SL)
125+
endif
126+
119127
ifeq ($(PORTNAME), linux)
120128
install-shlib-dep:= install-shlib
121129
shlib:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
@@ -188,18 +196,22 @@ all: lib$(NAME).a $(shlib)
188196
# Rules to build regular and shared libraries
189197

190198
ifneq ($(PORTNAME), win)
199+
191200
lib$(NAME).a: $(OBJS)
192201
ifdef MK_NO_LORDER
193202
$(AR) $(AROPT) $@ $(OBJS)
194203
else
195204
$(AR) $(AROPT) $@ `lorder $(OBJS) | tsort`
196205
endif
197206
$(RANLIB) $@
207+
198208
endif
199209

200210
ifneq ($(shlib),)
201211
ifneq ($(PORTNAME), win)
212+
ifneq ($(PORTNAME), aix)
202213

214+
# Normal case
203215
$(shlib): $(OBJS)
204216
$(LD) $(LDFLAGS_SL) -o $@ $(OBJS) $(SHLIB_LINK)
205217
if [ "$(shlib)" != "lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)" ]; then \
@@ -213,6 +225,16 @@ $(shlib): $(OBJS)
213225

214226
else
215227

228+
# AIX case
229+
$(shlib): lib$(NAME).a
230+
$(MKLDEXPORT) lib$(NAME).a $(LIBDIR) > lib$(NAME)$(EXPSUFF)
231+
$(LD) -H512 -bM:SRE -bI:$(SRCDIR)/backend/$(POSTGRES_IMP) -bE:lib$(NAME)$(EXPSUFF) -o $@ $< $(LDFLAGS) $(SHLIB_LINK)
232+
233+
endif
234+
235+
else
236+
237+
# WIN case
216238
$(shlib) lib$(NAME).a: $(OBJS) $(SRCDIR)/utils/dllinit.o
217239
$(DLLTOOL) --export-all --output-def $(NAME).def $(OBJS)
218240
$(DLLWRAP) -o $(shlib) --dllname $(shlib) --def $(NAME).def $(OBJS) $(SRCDIR)/utils/dllinit.o $(DLLINIT) $(SHLIB_LINK)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp