Fixing AC_CHECK_DECLS to do the right thing with clang
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Cc: Noah Misch <noah@leadboat.com>
Date: 2018-11-18T04:32:47Z
Lists: pgsql-hackers
Attachments
- import-autoconf-fix-for-clang.patch (text/x-diff) patch
We've seen repeated complaints about bogus build warnings when using "clang": it complains that strlcpy and some related library functions haven't been declared. Several of the buildfarm animals exhibit such warnings, for instance. That's because Autoconf's AC_CHECK_DECLS macro fails to cope with the fact that clang only generates a warning, not an error, for the test case that that macro uses. Noah fixed this in upstream autoconf several years ago: http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=82ef7805faffa151e724aa76c245ec590d174580 However, I'm beginning to despair of the Autoconf crowd ever putting out an official new release. Hence, I propose to apply and back-patch the attached, which essentially just imports Noah's fix into our configure script. I've verified that this does the right thing with Fedora 28's version of clang (clang version 6.0.1). regards, tom lane
Commits
-
Fix configure's AC_CHECK_DECLS tests to work correctly with clang.
- f6ce9cee6207 9.3 (unreleased) landed
- b8464d2f5da0 9.2 (unreleased) landed
- dcd6200165ca 11.2 landed
- 97b398ee5cb7 10.7 landed
- 8af1511e9cb5 9.6.12 landed
- 5fcb210e8d0e 9.4.21 landed
- 593320abac7d 9.5.16 landed
- 16fbac39ff68 12.0 landed