Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: [HACKERS] Need for DLLINIT in Makefile.shlib


  • From: Reini Urban <rurban(at)x-ray(dot)at>
  • To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
  • Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>, PostgreSQL Cygwin mailing list <pgsql-cygwin(at)postgreSQL(dot)org>, PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgreSQL(dot)org>
  • Subject: Re: [HACKERS] Need for DLLINIT in Makefile.shlib
  • Date: Tue, 12 Oct 2004 01:37:48 +0200
  • Message-id: <416B194C(dot)9020205(at)x-ray(dot)at>

Bruce Momjian schrieb:
I am curious why Cygwin needs DLLINIT in Makefile.shlib, and Win32
doesn't:

	# Cygwin case
	$(shlib) lib$(NAME).a: $(OBJS) $(DLLINIT)
	        $(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS)
	        $(DLLWRAP) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(DLLINIT) $(SHLIB_LINK)
	        $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a
	
	$(DLLINIT): $(DLLINIT:%.o=%.c)
	        $(MAKE) -C $(@D) $(@F)
	
	endif # PORTNAME == cygwin
	
	else # PORTNAME == win32
	
	# win32 case
	$(shlib) lib$(NAME).a: $(OBJS)
	        $(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS)
	        $(DLLWRAP) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK)
	        $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a
	
	endif # PORTNAME == win32

The only difference I see is that Cygwin uses $(DLLINIT) while Win32 does
not.  Is that correct?  Why?

Both set DLLINIT in their makefiles:

	DLLINIT = $(top_builddir)/src/utils/dllinit.o

Could they be merged into a single snipped of code?

Good point!
Out of my head: I don't think that we (cygwin) don't need that anymore. With newer binutils it should get autogenerated. But I'll have to test before you can remove that dir.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group