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

Commit27942ba

Browse files
committed
Don't use deprecated dllwrap on Cygwin.
The preferred method is to use "cc -shared", and this allows binariesto be rebased if required, unlike dllwrap.Backpatch to 9.0 where we have buildfarm coverage.There are still some issues with Cygwin, especially modern Cygwin, butthis helps us get closer to good support.Marco Atzeri.
1 parent1e9876c commit27942ba

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

‎src/Makefile.shlib

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ ifeq ($(PORTNAME), unixware)
281281
endif
282282

283283
ifeq ($(PORTNAME), cygwin)
284+
LINK.shared= $(CC) -shared
284285
ifdef SO_MAJOR_VERSION
285286
shlib= cyg$(NAME)$(DLSUFFIX)
286287
endif
@@ -371,6 +372,16 @@ else # PORTNAME == cygwin || PORTNAME == win32
371372

372373
# If SHLIB_EXPORTS is set, the rules below will build a .def file from
373374
# that. Else we build a temporary one here.
375+
ifeq ($(PORTNAME), cygwin)
376+
$(shlib): $(OBJS) | $(SHLIB_PREREQS)
377+
$(CC) $(CFLAGS) -shared -o $@ $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) $(LDAP_LIBS_BE)
378+
379+
$(stlib): $(OBJS) | $(SHLIB_PREREQS)
380+
$(LINK.static) $@ $^
381+
$(RANLIB) $@
382+
383+
384+
else
374385
ifeq (,$(SHLIB_EXPORTS))
375386
DLL_DEFFILE = lib$(NAME)dll.def
376387
exports_file = $(DLL_DEFFILE)
@@ -387,6 +398,7 @@ $(shlib): $(OBJS) $(DLL_DEFFILE) | $(SHLIB_PREREQS)
387398
$(stlib): $(shlib) $(DLL_DEFFILE) | $(SHLIB_PREREQS)
388399
$(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(DLL_DEFFILE) --output-lib $@
389400

401+
endif # PORTNAME == cygwin
390402
endif # PORTNAME == cygwin || PORTNAME == win32
391403

392404

‎src/makefiles/Makefile.cygwin

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# src/makefiles/Makefile.cygwin
21
DLLTOOL= dlltool
3-
DLLWRAP= dllwrap
2+
# src/makefiles/Makefile.cygwin
43
ifdef PGXS
54
BE_DLLLIBS= -L$(libdir) -lpostgres
65
else
@@ -44,6 +43,4 @@ endif
4443

4544
# Rule for building a shared library from a single .o file
4645
%.dll: %.o
47-
$(DLLTOOL) --export-all --output-def $*.def $<
48-
$(DLLWRAP) -o $@ --def $*.def $< $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)
49-
rm -f $*.def
46+
$(CC) $(CFLAGS) -shared -o $@ $< $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp