Skip to content

Commit e390967

Browse files
committed
Build pltcl.so correctly on platforms that want dependent
shared libraries to be listed in the link command.
1 parent 3a52e3f commit e390967

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

src/pl/tcl/Makefile

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Makefile for the pltcl shared object
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.9 1998/10/18 19:41:00 tgl Exp $
7+
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.10 1998/12/13 23:46:49 tgl Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -38,14 +38,25 @@ endif
3838
endif
3939

4040

41-
# Change following to how shared library that contain
42-
# correct references to libtcl must get built on your system.
41+
# Change following to how shared library that contains
42+
# references to libtcl must get built on your system.
4343
# Since these definitions come from the tclConfig.sh script,
4444
# they should work if the shared build of tcl was successful
45-
# on this system.
46-
#
45+
# on this system. However, tclConfig.sh lies to us a little bit
46+
# (at least in versions 7.6 through 8.0.4) --- it doesn't mention -lc
47+
# in TCL_LIBS, but you still need it on systems that want to hear about
48+
# dependent libraries...
49+
50+
ifneq ($(TCL_SHLIB_LD_LIBS),)
51+
# link command for a shared lib must mention shared libs it uses
52+
SHLIB_EXTRA_LIBS=$(TCL_LIBS) -lc
53+
else
54+
# link command for a shared lib must NOT mention shared libs it uses
55+
SHLIB_EXTRA_LIBS=
56+
endif
57+
4758
%$(TCL_SHLIB_SUFFIX): %.o
48-
$(TCL_SHLIB_LD) -o $@ $< $(TCL_SHLIB_LD_LIBS) $(TCL_LIB_SPEC) $(TCL_LIBS)
59+
$(TCL_SHLIB_LD) -o $@ $< $(TCL_LIB_SPEC) $(SHLIB_EXTRA_LIBS)
4960

5061

5162
#

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy