Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3ddeba7

Browse files
committed
pltcl didn't work well at all when Tcl had been built with a different
compiler than the one selected to build Postgres with. It was trying to feed Postgres-compiler switches to Tcl's compiler. (Seen this before with the perl5 interface...) Fix to use only CFLAGS taken from Tcl's configure information, plus -I which is pretty universal.
1 parent ef6c33f commit 3ddeba7

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

src/pl/tcl/Makefile

Lines changed: 14 additions & 11 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.11 2000/03/08 01:58:46 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.12 2000/04/21 03:28:17 tgl Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -59,6 +59,19 @@ endif
5959
$(TCL_SHLIB_LD) -o $@ $< $(TCL_LIB_SPEC) $(SHLIB_EXTRA_LIBS)
6060

6161

62+
CC = $(TCL_CC)
63+
64+
# Since we are using Tcl's choice of C compiler, which might not be the
65+
# same one selected for Postgres, do NOT use CFLAGS from Makefile.global.
66+
# Instead use TCL's CFLAGS plus necessary -I directives.
67+
68+
# Can choose either TCL_CFLAGS_OPTIMIZE or TCL_CFLAGS_DEBUG here, as needed
69+
CFLAGS= $(TCL_CFLAGS_OPTIMIZE)
70+
71+
CFLAGS+= $(TCL_SHLIB_CFLAGS) $(TCL_DEFS)
72+
73+
CFLAGS+= -I$(SRCDIR)/include -I$(SRCDIR)/backend
74+
6275
#
6376
# Uncomment the following to enable the unknown command lookup
6477
# on the first of all calls to the call handler. See the doc
@@ -67,16 +80,6 @@ endif
6780
#CFLAGS+= -DPLTCL_UNKNOWN_SUPPORT
6881

6982

70-
CC = $(TCL_CC)
71-
CFLAGS+= -I$(LIBPQDIR) -I$(SRCDIR)/include $(TCL_SHLIB_CFLAGS)
72-
73-
# For fmgr.h
74-
CFLAGS+= -I$(SRCDIR)/backend
75-
76-
CFLAGS+= $(TCL_DEFS)
77-
78-
LDADD+= $(LIBPQ)
79-
8083
#
8184
# DLOBJS is the dynamically-loaded object file.
8285
#

0 commit comments

Comments
 (0)