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

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: 2004-10-11 23:37:48
Message-ID: 416B194C.9020205@x-ray.at (view raw or flat)
Thread:
Lists: pgsql-cygwinpgsql-hackerspgsql-hackers-win32
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/

In response to

Responses

pgsql-cygwin by date

Next:From: Reini UrbanDate: 2004-10-11 23:42:34
Subject: Re: [HACKERS] open item: tablespace handing in pg_dump/pg_restore
Previous:From: Bruce MomjianDate: 2004-10-11 23:09:52
Subject: Re: [HACKERS] open item: tablespace handing in pg_dump/pg_restore

pgsql-hackers by date

Next:From: Tom LaneDate: 2004-10-11 23:40:02
Subject: Re: minor code question: portal memory cxts
Previous:From: Neil ConwayDate: 2004-10-11 23:29:31
Subject: minor code question: portal memory cxts

pgsql-hackers-win32 by date

Next:From: Reini UrbanDate: 2004-10-11 23:42:34
Subject: Re: [HACKERS] open item: tablespace handing in pg_dump/pg_restore
Previous:From: Bruce MomjianDate: 2004-10-11 23:09:52
Subject: Re: [HACKERS] open item: tablespace handing in pg_dump/pg_restore

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group