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

Commit3031ec7

Browse files
committed
NetBSD Shared Library Patch from Martin J. Laubach
1 parent078633e commit3031ec7

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

‎src/interfaces/libpq/Makefile

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.28 1997/03/14 23:34:03 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.29 1997/03/15 19:17:03 scrappy Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -23,21 +23,25 @@ ifdef KRBVERS
2323
CFLAGS+=$(KRBFLAGS)
2424
endif
2525

26-
# dllist.c is found in backend/lib
27-
VPATH:=$(VPATH):../backend/lib
28-
2926
OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-lobj.o\
30-
../backend/lib/dllist.o pqsignal.o
31-
27+
dllist.o pqsignal.o
3228

29+
# Shared library stuff
3330
shlib :=
3431
install-shlib-dep :=
3532
ifeq ($(PORTNAME), linux)
3633
ifdef LINUX_ELF
3734
install-shlib-dep := install-shlib
3835
shlib := libpq.so.1
36+
LDFLAGS_SL = -shared
3937
endif
4038
endif
39+
ifeq ($(PORTNAME), BSD44_derived)
40+
install-shlib-dep := install-shlib
41+
shlib := libpq.so.1.0
42+
LDFLAGS_SL = -x -Bshareable -Bforcearchive
43+
CFLAGS += -fpic -DPIC
44+
endif
4145

4246
all: libpq.a$(shlib) c.h
4347

@@ -51,17 +55,19 @@ endif
5155

5256
fe-lobj.o: ../backend/fmgr.h
5357

58+
# We need to compile this with special options for shared libs,
59+
# so we can't use the object in ../backend
60+
dllist.c:../backend/lib/dllist.c
61+
-ln ../backend/lib/dllist.c
62+
5463
# The following rules cause dependencies in the backend directory to
5564
# get made if they don't exist, but don't cause them to get remade if they
5665
# are out of date.
5766
../backend/fmgr.h:
5867
$(MAKE) -C ../backend fmgr.h
5968

60-
../backend/lib/dllist.o:
61-
$(MAKE) -C ../backend/lib dllist.o
62-
63-
libpq.so.1:$(OBJS)
64-
gcc$(LDFLAGS) -shared -o$@$(OBJS)
69+
$(shlib):$(OBJS)
70+
$(LD)$(LDFLAGS)$(LDFLAGS_SL) -o$@$(OBJS)
6571

6672
c.h: ../include/c.h
6773
rm -f c.h

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp