diff options
author | Tom Lane | 2010-07-05 18:54:38 +0000 |
---|---|---|
committer | Tom Lane | 2010-07-05 18:54:38 +0000 |
commit | 291a9577454a63f99b5537e48a3dceae6d35ea8d (patch) | |
tree | a842e9bd4b21b681b89516a33fe65b207a21c42d /configure | |
parent | eb81b6509f4c9109ecf8839d8c482cc597270687 (diff) |
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.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/configure b/configure index f6b891e46b1..91261a47b86 100755 --- a/configure +++ b/configure @@ -704,6 +704,7 @@ ld_R_works with_gnu_ld LD LDFLAGS_SL +LDFLAGS_EX ELF_SYS EGREP GREP @@ -856,6 +857,7 @@ LDFLAGS LIBS CPPFLAGS CPP +LDFLAGS_EX LDFLAGS_SL DOCBOOKSTYLE' @@ -1551,7 +1553,8 @@ Some influential environment variables: CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor - LDFLAGS_SL linker flags for shared library linking + LDFLAGS_EX extra linker flags for linking executables only + LDFLAGS_SL extra linker flags for linking shared libraries only DOCBOOKSTYLE location of DocBook stylesheets @@ -5788,6 +5791,7 @@ LDFLAGS="$LDFLAGS $LIBDIRS" + # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes @@ -28826,7 +28830,6 @@ fi # If compiler will take -Wl,--as-needed (or various platform-specific # spellings thereof) then add that to LDFLAGS. This is much easier than # trying to filter LIBS to the minimum for each executable. -# (Note that shared library links won't use this switch, though.) # On (at least) some Red-Hat-derived systems, this switch breaks linking to # libreadline; therefore we postpone testing it until we know what library # dependencies readline has. The test code will try to link with $LIBS. |