Re: REQ: build src/backend/postgres w/o -lncurses or -lreadline - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: REQ: build src/backend/postgres w/o -lncurses or -lreadline
Date
Msg-id 200105122111.f4CLBHB09680@candle.pha.pa.us
Whole thread Raw
In response to REQ: build src/backend/postgres w/o -lncurses or -lreadline  ("Todd R. Eigenschink" <todd@tekinteractive.com>)
Responses Re: REQ: build src/backend/postgres w/o -lncurses or -lreadline  ("Todd R. Eigenschink" <todd@tekinteractive.com>)
List 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.
>

It is my understanding that having them there causes no bloat in the
binary.  No symbols are resolved in those libs.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Irix build failes (PSQL 7.1.1)
Next
From: Peter Eisentraut
Date:
Subject: Re: pg_config broken in 7.1.1 on FreeBSD with Tcl + Java