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

Reini Urban <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32,gmane.comp.db.postgresql.devel.general,gmane.comp.db.postgresql.cygwin
Message-ID <[email protected]>
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/

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.