guix/nix
Doğan Çeçen dcaccc8b72
daemon: Fix linking gcrypt when --as-needed linker arg is used
This is a followup to 8a7bd211d2.

As it is mentioned in autoconf manual that library names should be
specified in LIBS, not LDFLAGS. See:

https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/html_node/Preset-Output-Variables.html#index-LDFLAGS-2

This change also brings back the save_* vars trick that was there
before. I missed in my earlier change that nix/local.mk was referring
LIBGCRYPT_* vars directly.

And, instead of CXXFLAGS, CPPFLAGS is used since the latter is probably
more correct as this is used for include dirs, therefore using
preprocessor flags.

Tested with ./configure LDFLAGS="-Wl,--as-needed" --with-libgcrypt-prefix=... combinations.

* config-daemon.ac: Set ‘LIBGCRYPT_CPPFLAGS’ instead of
‘LIBGCRYPT_CXXFLAGS’.  Set ‘LIBGCRYPT_LIBS’ in addition to
‘LIBGCRYPT_LDFLAGS’.  Save and restore ‘CPPFLAGS’, ‘LDFLAGS’, and ‘LIBS’
around test.
* nix/local.mk (libutil_a_CPPFLAGS): Add $(LIBGCRYPT_CPPFLAGS).
(libstore_a_CXXFLAGS): Remove $(LIBGCRYPT_CFLAGS).
(guix_daemon_LDFLAGS): New variable.

Change-Id: Iadb10e1994c9a78e2927847af2cfe5e096fbb2a8
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-09 23:15:45 +01:00
..
boost
libstore daemon: Improve error message in ‘checkStoreName’. 2024-11-17 23:15:49 +01:00
libutil daemon: Loop over ‘copy_file_range’ upon short writes. 2024-05-13 16:31:34 +02:00
nix-daemon daemon: Implement ‘substitute-urls’ RPC. 2023-12-11 23:18:53 +01:00
.gitignore
AUTHORS
COPYING
local.mk daemon: Fix linking gcrypt when --as-needed linker arg is used 2024-12-09 23:15:45 +01:00