Re: LDFLAGS overriding

From: Reini Urban <rurban(at)x-ray(dot)at>
To: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: LDFLAGS overriding
Date: 2004-10-04 10:47:54
Message-ID: 41612A5A.6010406@x-ray.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane schrieb:
> Reini Urban <rurban(at)x-ray(dot)at> writes:
>>Peter Eisentraut schrieb:
>>
>>>Please point out where that happens so it can be corrected.
>
>>Something like this (against an older cvs snap), but I don't believe
>>that this is the best way to solve it. It just solved building under cygwin.
>
> Peter asked to know where the problem is, not what your proposed
> solution is (especially if you admit the solution needs work).
>
> What happens exactly when you try to build without this patch?

rurban(at)reini /usr/src/postgresql/postgresql-8.0.0cvs/contrib/spi
$ make
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -DREFINT_VERBOSE -I.
-I../../src/include -c -o timetravel.o timetravel.c
dlltool --export-all --output-def timetravel.def timetravel.o
dllwrap -o timetravel.dll --def timetravel.def timetravel.o
../../src/utils/dllinit.o -L../../src/backend -lpostgres
timetravel.o(.text+0x231):timetravel.c: undefined reference to
`_pg_strcasecmp'
collect2: ld gab 1 als Ende-Status zur"uck
dllwrap: gcc exited with status 1
make: *** [timetravel.dll] Fehler 1
rm timetravel.o

Analysis:
-lpgport missing in SHLIB_LINK
-L$(top_builddir)/src/port not added from LDFLAGS to SHLIB_LINK

make -p gives:
%.dll: %.o
# Auszuf"uhrende Kommandos (aus >>../../src/Makefile.port<<, Zeile 16):
$(DLLTOOL) --export-all --output-def $*.def $<
$(DLLWRAP) -o $@ --def $*.def $< $(DLLINIT) $(SHLIB_LINK)
rm -f $*.def

# >>override<<-Anweisung (from `../../src/Makefile.global', line 366)
LDFLAGS := -L../../src/port -L/usr/local/lib

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Reini Urban 2004-10-04 11:03:14 contrib/spi -lpgport missing
Previous Message John Hansen 2004-10-04 09:18:05 Re: Quieting the copyright/startup message...