![]() For many optional libraries, we extract the -L and -l switches needed
to link the library from a helper program such as llvm-config. In
some cases we put the resulting -L switches into LDFLAGS ahead of
-L switches specified via --with-libraries. That risks breaking
the user's intention for --with-libraries.
It's not such a problem if the library's -L switch points to a
directory containing only that library, but on some platforms a
library helper may "helpfully" offer a switch such as -L/usr/lib
that points to a directory holding all standard libraries. If the
user specified --with-libraries in hopes of overriding the standard
build of some library, the -L/usr/lib switch prevents that from
happening since it will come before the user-specified directory.
To fix, avoid inserting these switches directly into LDFLAGS during
configure, instead adding them to LIBDIRS or SHLIB_LINK. They will
still eventually get added to LDFLAGS, but only after the switches
coming from --with-libraries.
The same problem exists for -I switches: those coming from
--with-includes should appear before any coming from helper programs
such as llvm-config. We have not heard field complaints about this
case, but it seems certain that a user attempting to override a
standard library could have issues.
The changes for this go well beyond configure itself, however,
because many Makefiles have occasion to manipulate CPPFLAGS to
insert locally-desirable -I switches, and some of them got it wrong.
The correct ordering is any -I switches pointing at within-the-
source-tree-or-build-tree directories, then those from the tree-wide
CPPFLAGS, then those from helper programs. There were several places
that risked pulling in a system-supplied copy of libpq headers, for
example, instead of the in-tree files. (Commit
|
2 months ago | |
---|---|---|
config | Don't put library-supplied -L/-I switches before user-supplied ones. | 2 months ago |
contrib | Fix incompatibility with libxml2 >= 2.14 | 2 months ago |
doc | Clarify documentation for the initcap function | 2 months ago |
src | Don't put library-supplied -L/-I switches before user-supplied ones. | 2 months ago |
.cirrus.star | Remove duplicate words in docs and code comments. | 2 years ago |
.cirrus.tasks.yml | ci: Upgrade FreeBSD image | 6 months ago |
.cirrus.yml | ci: Make compute resources for CI configurable | 2 years ago |
.dir-locals.el | Make Emacs perl-mode indent more like perltidy. | 7 years ago |
.editorconfig | Add .editorconfig | 6 years ago |
.git-blame-ignore-revs |
Add commit 7229ebe011 to .git-blame-ignore-revs.
|
1 year ago |
.gitattributes | Exclude LLVM files from whitespace checks | 10 months ago |
.gitignore | Update top-level .gitignore. | 3 years ago |
COPYRIGHT | Align organization wording in copyright statement | 4 months ago |
GNUmakefile.in | Allow selecting the git revision to be packaged by "make dist". | 1 year ago |
HISTORY | Canonicalize some URLs | 6 years ago |
Makefile | Adapt REL_17_STABLE to its new status as a stable branch | 1 year ago |
README.md | Adapt REL_17_STABLE to its new status as a stable branch | 1 year ago |
aclocal.m4 | autoconf: Move export_dynamic determination to configure | 3 years ago |
configure | Don't put library-supplied -L/-I switches before user-supplied ones. | 2 months ago |
configure.ac | Don't put library-supplied -L/-I switches before user-supplied ones. | 2 months ago |
meson.build | meson: Fix meson warning | 3 months ago |
meson_options.txt | Allow selecting the git revision to be packaged by "make dist". | 1 year ago |
README.md
PostgreSQL Database Management System
This directory contains the source code distribution of the PostgreSQL database management system.
PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings.
Copyright and license information can be found in the file COPYRIGHT.
General documentation about this version of PostgreSQL can be found at https://www.postgresql.org/docs/17/. In particular, information about building PostgreSQL from the source code can be found at https://www.postgresql.org/docs/17/installation.html.
The latest version of this software, and related software, may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.