diff options
author | Carlos O'Donell <carlos@systemhalted.org> | 2016-12-02 15:39:09 -0500 |
---|---|---|
committer | Carlos O'Donell <carlos@systemhalted.org> | 2016-12-02 15:39:09 -0500 |
commit | 84aa75162cd5ba73caa76864496fadd2551a5caa (patch) | |
tree | 0840bcbc833f69aeaf450a49a2f4bf5048386b45 /elf/tst-linkall-static.c | |
parent | 01b23a30b42a90b1ebd882a0d81110a1542e504a (diff) | |
download | glibc-84aa75162cd5ba73caa76864496fadd2551a5caa.tar glibc-84aa75162cd5ba73caa76864496fadd2551a5caa.tar.gz glibc-84aa75162cd5ba73caa76864496fadd2551a5caa.tar.bz2 glibc-84aa75162cd5ba73caa76864496fadd2551a5caa.zip |
Bug 20918 - Building with --enable-nss-crypt fails tst-linkall-static
Some configurations may use NSS cryptographic routines but have no
static library for those routines. The following changes allow glibc to
be built and tested with --enable-nss-crypt, but without having a static
NSS library. At a high level the change does two things:
(1) Detect at configure time if static NSS crypto libraries are
available. Assumes libfreebl3.a (instead of the existing Fedora
libfreebl.a which is incomplete) which matches libfreebl3.so.
(2) If static NSS crypto libraries are _not_ available then adjust the
way in which we build tst-linkall-static. This includes excluding a
reference to crypt and not linking against libcrypt.a, all of which
will fail otherwise.
Testing assumptions:
* Static library is named libfreebl3.a (not libfreebl.a as is currently
provided in Fedora), matching libfreebl3.so shared link name.
Tested on x86_64 on Fedora with:
(a) --enable-nss-crypt, with no static NSS library support: PASS
(previous FAIL)
(b) --enable-nss-crypt, with faked static NSS library support: PASS
(unsupported)
* Requires changing elf/Makefile to include a stub
/lib64/libfreebl3.a for testing purposes.
(c) --disable-nss-crypt: PASS
(default)
No regressions on x86_64.
For details see:
https://www.sourceware.org/ml/libc-alpha/2016-11/msg00647.html
Diffstat (limited to 'elf/tst-linkall-static.c')
-rw-r--r-- | elf/tst-linkall-static.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/elf/tst-linkall-static.c b/elf/tst-linkall-static.c index 7a4aaccf58..cc77f0788e 100644 --- a/elf/tst-linkall-static.c +++ b/elf/tst-linkall-static.c @@ -32,7 +32,9 @@ void *references[] = { &pow, /* libm */ &pthread_create, /* libpthread */ +#if USE_CRYPT &crypt, /* libcrypt */ +#endif &res_send, /* libresolv */ &dlopen, /* libdl */ &login, /* libutil */ |