[gnutls-devel] GnuTLS | Fail to compile gnutls with custom llvm pass (#1492)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Sun Jul 9 15:37:18 CEST 2023
Jiamin Yu commented: https://gitlab.com/gnutls/gnutls/-/issues/1492#note_1462701662
Thanks for your reply.
1. Yes, I set ``CC`` to ``clang-12``, ``CFLAGS`` to ``-Xclang -load -Xclang /path/to/pass.so`` and there is no missing ``-``.
2. Commands behind ``CCLD libgnutls.la`` are:
``libtool: link: clang-12 -shared -fPIC -DPIC .libs/range.o .libs/record.o .libs/compress.o .libs/debug.o .libs/cipher.o .libs/handshake-tls13.o .libs/mbuffers.o .libs/buffers.o .libs/handshake.o .libs/errors.o .libs/dh.o .libs/kx.o .libs/cipher-cbc.o .libs/priority.o .libs/hash_int.o .libs/cipher_int.o .libs/session.o .libs/db.o .libs/x509_b64.o .libs/hello_ext.o .libs/auth.o .libs/sslv2_compat.o .libs/datum.o .libs/session_pack.o .libs/mpi.o .libs/pk.o .libs/cert-cred.o .libs/global.o .libs/constate.o .libs/anon_cred.o .libs/pkix_asn1_tab.o .libs/gnutls_asn1_tab.o .libs/mem.o .libs/fingerprint.o .libs/tls-sig.o .libs/ecc.o .libs/alert.o .libs/privkey_raw.o system/.libs/certs.o system/.libs/threads.o system/.libs/fastopen.o system/.libs/sockets.o .libs/str-iconv.o .libs/system.o .libs/profiles.o inih/.libs/ini.o .libs/str.o .libs/str-unicode.o .libs/str-idna.o .libs/state.o .libs/cert-cred-x509.o .libs/file.o .libs/supplemental.o .libs/random.o .libs/crypto-api.o .libs/privkey.o .libs/pcert.o .libs/pubkey.o .libs/locks.o .libs/dtls.o .libs/system_override.o .libs/crypto-backend.o .libs/verify-tofu.o .libs/pin.o .libs/tpm.o .libs/fips.o .libs/safe-memfuncs.o .libs/atfork.o .libs/randomart.o .libs/urls.o .libs/prf.o .libs/auto-verify.o .libs/dh-session.o .libs/cert-session.o .libs/handshake-checks.o .libs/dtls-sw.o .libs/dh-primes.o .libs/openpgp_compat.o .libs/crypto-selftests.o .libs/crypto-selftests-pk.o .libs/secrets.o .libs/extv.o .libs/hello_ext_lib.o .libs/ocsp-api.o .libs/stek.o .libs/cert-cred-rawpk.o .libs/iov.o system/.libs/ktls.o .libs/pathbuf.o .libs/vko.o system/.libs/keys-dummy.o tls13/.libs/encrypted_extensions.o tls13/.libs/certificate_request.o tls13/.libs/certificate_verify.o .libs/tls13-sig.o tls13/.libs/finished.o tls13/.libs/key_update.o tls13/.libs/hello_retry.o tls13/.libs/session_ticket.o tls13/.libs/certificate.o tls13/.libs/early_data.o tls13/.libs/post_handshake.o tls13/.libs/psk_ext_parser.o tls13/.libs/anti_replay.o .libs/pkcs11.o .libs/pkcs11x.o .libs/pkcs11_privkey.o .libs/pkcs11_write.o .libs/pkcs11_secret.o .libs/pkcs11_int.o .libs/srp.o .libs/psk.o -Wl,--whole-archive ../gl/.libs/libgnu.a x509/.libs/libgnutls_x509.a ext/.libs/libgnutls_ext.a auth/.libs/libgnutls_auth.a algorithms/.libs/libgnutls_alg.a extras/.libs/libgnutls_extras.a unistring/.libs/libunistring.a accelerated/.libs/libaccelerated.a nettle/.libs/libcrypto.a -Wl,--no-whole-archive -load -lz -lp11-kit /usr/lib/libidn2.so /usr/lib/libtasn1.so -lnettle -lhogweed -lgmp -Wl,--version-script=./libgnutls.map -Wl,-soname -Wl,libgnutls.so.30 -o .libs/libgnutls.so.30.35.0``
which have a ``-load`` at ``-Wl,--no-whole-archive -load -lz -lp11-kit``, while no loaded plugin after it, so it may cause the error.
In ``Makefile``, there are only two variables contain ``-load``: ``CFLAGS`` and ``CCASFLAGS``, which are both ``-Xclang -load -Xclang /path/to/pass.so``.
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/issues/1492#note_1462701662
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20230709/5a97bb7d/attachment-0001.html>
More information about the Gnutls-devel
mailing list