Re: utils C files - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: utils C files
Date
Msg-id 200207180140.g6I1eP505920@candle.pha.pa.us
Whole thread Raw
In response to Re: utils C files  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > How is this any better than just mentioning the *.o file and letting the
> > default rules compile it.  I don't understand how linking to the current
> > directory gets us anything.  Now, if you did a 'make -C dir target' that
> > would be different.
>
> The whole point of the pushups for libpq is that we DON'T want the
> default rules.  We need to compile it PIC so that it can go into a
> shared library.  This will not be the same object file built in the
> ports directory.

Oh, so specifying the full path for the *.o allows it to use an existing
*.o, while putting it in the directory forces a recompile with the
current Makefile.  Got it.  Libpq has all of them done.

I see the comment in libpq/Makefile now:

# We use several backend modules verbatim, but since we need to
# compile with appropriate options to build a shared lib, we can't
# necessarily use the same object files as the backend uses. Instead,
# symlink the source files in here and build our own object file.

Thanks.

--
  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-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: utils C files
Next
From: Bruce Momjian
Date:
Subject: Re: utils C files