REQ: build src/backend/postgres w/o -lncurses or -lreadline

From: "Todd R(dot) Eigenschink" <todd(at)tekinteractive(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: REQ: build src/backend/postgres w/o -lncurses or -lreadline
Date: 2001-05-08 15:15:19
Message-ID: 15096.3463.474526.956647@rtfm.ofc.tekinteractive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

When Postgres is configured and decides to use libncurses and
libreadline, the backend gets linked against those two libs, too, even
though it really doesn't use them. This is just extra wasted size and
(if they're shared libs) dependencies you don't need.

I made this ultra-cheesy change to src/backend/Makefile to take care
of that.

postgres: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $(export_dynamic) $^ $(LIBS) -o $@

to

postgres: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $(export_dynamic) $^ `echo $(LIBS) | sed -e 's/ -lncurses//' -e 's/ -lreadline//'` -o $@

I realize this is a sort of special-purpose request. It's not a big
deal to build the whole thing, then just relink src/backend/postgres
without those libs. It just feels dirty to have them there when they
aren't needed.

Todd

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Vince Vielhaber 2001-05-08 15:19:26 Re: Alter table add column ignores default
Previous Message Nabil Sayegh 2001-05-08 15:14:10 Re: Alter table add column ignores default