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

Commit458474d

Browse files
committed
Accept slightly grotty coding in Makefile.global in order to keep the -L
flag for src/port/ in front of any -L flags placed in LDFLAGS by configure.This undoes an L-flag-ordering change that I had thought would be safe,but seems to be making at least one buildfarm member fail --- the onlytheory for orca's failure that I can think of is that it's got an oldcopy of libpgport.a in /usr/lib. Also allow for LDFLAGS_SL to be set bycontrib makefiles before they invoke Makefile.global.
1 parent46ee42b commit458474d

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

‎src/Makefile.global.in

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-makefile-*-
2-
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.263 2010/07/05 18:54:37 tgl Exp $
2+
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.264 2010/07/06 22:03:05 tgl Exp $
33

44
#------------------------------------------------------------------------------
55
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -235,9 +235,21 @@ OSSP_UUID_LIBS = @OSSP_UUID_LIBS@
235235
LD = @LD@
236236
with_gnu_ld = @with_gnu_ld@
237237
ld_R_works = @ld_R_works@
238-
LDFLAGS = @LDFLAGS@
238+
239+
# We want -L for libpgport.a to be first in LDFLAGS. We also need LDFLAGS
240+
# to be a "recursively expanded" variable, else adjustments to rpathdir
241+
# don't work right. So we must NOT do LDFLAGS := something, meaning this has
242+
# to be done first and elsewhere we must only do LDFLAGS += something.
243+
ifdefPGXS
244+
LDFLAGS = -L$(libdir)
245+
else
246+
LDFLAGS = -L$(top_builddir)/src/port
247+
endif
248+
LDFLAGS += @LDFLAGS@
249+
239250
LDFLAGS_EX = @LDFLAGS_EX@
240-
LDFLAGS_SL = @LDFLAGS_SL@
251+
# LDFLAGS_SL might have already been assigned by calling makefile
252+
LDFLAGS_SL += @LDFLAGS_SL@
241253
LDREL = -r
242254
LDOUT = -o
243255
RANLIB = @RANLIB@
@@ -450,16 +462,11 @@ endif
450462
##########################################################################
451463
#
452464
# substitute implementations of C library routines (see src/port/)
465+
# note we already included -L.../src/port in LDFLAGS above
453466

454467
LIBOBJS = @LIBOBJS@
455468

456469
LIBS := -lpgport$(LIBS)
457-
# add location of libpgport.a to LDFLAGS
458-
ifdefPGXS
459-
LDFLAGS += -L$(libdir)
460-
else
461-
LDFLAGS += -L$(top_builddir)/src/port
462-
endif
463470

464471
# to make ws2_32.lib the last library, and always link with shfolder,
465472
# so SHGetFolderName isn't picked up from shell32.dll

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp