From 291a9577454a63f99b5537e48a3dceae6d35ea8d Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 5 Jul 2010 18:54:38 +0000 Subject: Split the LDFLAGS make variable into two parts: LDFLAGS is now used for linking both executables and shared libraries, and we add on LDFLAGS_EX when linking executables or LDFLAGS_SL when linking shared libraries. This provides a significantly cleaner way of dealing with link-time switches than the former behavior. Also, make sure that the various platform-specific %.so: %.o rules incorporate LDFLAGS and LDFLAGS_SL; most of them missed that before. (I did not add these variables for the platforms that invoke $(LD) directly, however. It's not clear if we can do that safely, since for the most part we assume these variables use CC command-line syntax.) Per gripe from Aaron Swenson and subsequent investigation. --- doc/src/sgml/installation.sgml | 15 ++++++++++++--- doc/src/sgml/ref/pg_config-ref.sgml | 22 +++++++++++++++++----- 2 files changed, 29 insertions(+), 8 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index 2f3ec3beab0..01f57a70e30 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -1,4 +1,4 @@ - + <![%standalone-include[<productname>PostgreSQL</>]]> @@ -1468,7 +1468,16 @@ su - postgres <term><envar>LDFLAGS</envar></term> <listitem> <para> - options to pass to the link editor + options to use when linking either executables or shared libraries + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><envar>LDFLAGS_EX</envar></term> + <listitem> + <para> + additional options for linking executables only </para> </listitem> </varlistentry> @@ -1477,7 +1486,7 @@ su - postgres <term><envar>LDFLAGS_SL</envar></term> <listitem> <para> - linker options for shared library linking + additional options for linking shared libraries only </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/pg_config-ref.sgml b/doc/src/sgml/ref/pg_config-ref.sgml index 5c63942542e..66cf79b2f4b 100644 --- a/doc/src/sgml/ref/pg_config-ref.sgml +++ b/doc/src/sgml/ref/pg_config-ref.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_config-ref.sgml,v 1.29 2010/04/03 07:23:01 petere Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_config-ref.sgml,v 1.30 2010/07/05 18:54:37 tgl Exp $ --> <refentry id="app-pgconfig"> <refmeta> @@ -232,13 +232,24 @@ </listitem> </varlistentry> + <varlistentry> + <term><option>--ldflags_ex</option></> + <listitem> + <para> + Print the value of the <varname>LDFLAGS_EX</varname> variable that was used for building + <productname>PostgreSQL</>. This shows linker switches + used for building executables only. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><option>--ldflags_sl</option></> <listitem> <para> Print the value of the <varname>LDFLAGS_SL</varname> variable that was used for building <productname>PostgreSQL</>. This shows linker switches - used for building shared libraries. + used for building shared libraries only. </para> </listitem> </varlistentry> @@ -275,7 +286,7 @@ <title>Notes - The option was new in + The option was added in PostgreSQL 7.2. In prior releases, the server include files were installed in the same location as the client headers, which could be queried with the option . To make your @@ -290,8 +301,9 @@ , , , , , , - and are new in PostgreSQL 8.1. - The option is new in PostgreSQL 8.4. + and were added in PostgreSQL 8.1. + The option was added in PostgreSQL 8.4. + The option was added in PostgreSQL 9.0. -- cgit v1.2.3