Re: Linking backend in one piece
От | Alvaro Herrera |
---|---|
Тема | Re: Linking backend in one piece |
Дата | |
Msg-id | 20080222151521.GA9392@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Linking backend in one piece (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: Linking backend in one piece
|
Список | pgsql-hackers |
Peter Eisentraut wrote: > Here is a patch so that the backend is linked in one piece instead of using > the SUBSYS.o files. > > The question is how we want to activate that. I currently used make > BIGLINK=1, which is obviously just for testing. Should we just turn it on by > default and see if anyone complains? Hmm. Do we need the text file? I was kinda hoping we could just aggregate each subdir's OBJS into a big variable listing all the needed files, and then invoking the linker with that. Also, the concatenating thing looks weird. Did you try using .SECOND_EXPANSION? Sometime ago I came up with this trick to link files from the backend into a src/bin/ subdirectory, which we use to build a Replicator utility that links some files from the backend. It looks like this: # Common makefile to symlink files from the backend directory. The subdir # makefile should define a LN_OBJS variable, listing the files it wants to # compile from any particular backend directory, which is defined in the # BACKEND_DIR variable. If those files are in turn inside another directory # then use the name including that directory, and replace the / with __. # For example, files in src/backend/access/ should be listed with # BACKEND_DIR = access # and the files themselves would be # LN_OBJS = transam__xact.o gist__gistget.o # # Then include this file. Extra files may be declared in the variable OBJS. mammoth_includedir=$(top_srcdir)/src/bin/mammoth/include OBJS += $(LN_OBJS) LN_SRC = $(LN_OBJS:.o=.c) .SECONDEXPANSION: $(LN_SRC): %: $$(subst __,/,$(top_srcdir)/src/backend/$(BACKEND_DIR)/%) rm -f $@ && $(LN_S) $(subst __,/,$<) $@ I think we should be able to use something like this here. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
В списке pgsql-hackers по дате отправления: