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

Commite5c22c1

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 parentdfb4a1a commite5c22c1

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
@@ -309,6 +309,7 @@ ifeq ($(PORTNAME), unixware)
309309
endif
310310

311311
ifeq ($(PORTNAME), cygwin)
312+
LINK.shared= $(CC) -shared
312313
ifdef SO_MAJOR_VERSION
313314
shlib= cyg$(NAME)$(DLSUFFIX)
314315
endif
@@ -399,6 +400,16 @@ else # PORTNAME == cygwin || PORTNAME == win32
399400

400401
# If SHLIB_EXPORTS is set, the rules below will build a .def file from
401402
# that. Else we build a temporary one here.
403+
ifeq ($(PORTNAME), cygwin)
404+
$(shlib): $(OBJS) | $(SHLIB_PREREQS)
405+
$(CC) $(CFLAGS) -shared -o $@ $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) $(LDAP_LIBS_BE)
406+
407+
$(stlib): $(OBJS) | $(SHLIB_PREREQS)
408+
$(LINK.static) $@ $^
409+
$(RANLIB) $@
410+
411+
412+
else
402413
ifeq (,$(SHLIB_EXPORTS))
403414
DLL_DEFFILE = lib$(NAME)dll.def
404415
exports_file = $(DLL_DEFFILE)
@@ -415,6 +426,7 @@ $(shlib): $(OBJS) $(DLL_DEFFILE) | $(SHLIB_PREREQS)
415426
$(stlib): $(shlib) $(DLL_DEFFILE) | $(SHLIB_PREREQS)
416427
$(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(DLL_DEFFILE) --output-lib $@
417428

429+
endif # PORTNAME == cygwin
418430
endif # PORTNAME == cygwin || PORTNAME == win32
419431

420432
endif # enable_shared

‎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
@@ -40,6 +39,4 @@ endif
4039

4140
# Rule for building a shared library from a single .o file
4241
%.dll: %.o
43-
$(DLLTOOL) --export-all --output-def $*.def $<
44-
$(DLLWRAP) -o $@ --def $*.def $< $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)
45-
rm -f $*.def
42+
$(CC) $(CFLAGS) -shared -o $@ $< $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp