[gnutls-devel] GnuTLS | accelerated: avoid symbol export mismatch with _gnutls_x86_cpuid_s (!1642)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Mon Sep 19 00:48:24 CEST 2022



Daiki Ueno created a merge request: https://gitlab.com/gnutls/gnutls/-/merge_requests/1642

Project:Branches: dueno/gnutls:wip/dueno/cpuid-symbol-rename to gnutls/gnutls:master
Author:   Daiki Ueno




If the LD doesn't have support for version scripts,
_gnutls_x86_cpuid_s is exported through libtool's
--export-symbols-regex and that causes link error with clang:

  libtool: link: nmedit -s .libs/libgnutls-symbols.expsym .libs/libgnutls.30.dylib
  /Library/Developer/CommandLineTools/usr/bin/nmedit: error: symbols names listed in: .libs/libgnutls-symbols.expsym not in: /opt/local/var/macports/build/_Users_marius_Development_MacPorts_ports_devel_gnutls/gnutls-devel/work/gnutls-3.7.5/lib/.libs/libgnutls.30.dylib
  __gnutls_x86_cpuid_s
  make[4]: *** [libgnutls.la] Error 1

This patch renames _gnutls_x86_cpuid_s to __gnutls_x86_cpuid_s (double
underscore) to avoid the issue.

Problem investigated and fix suggested by Clemens Lang in:
https://gitlab.com/gnutls/gnutls/-/issues/1370#note_967832583

Fixes: #1370 

## Checklist
 * [x] Commits have `Signed-off-by:` with name/author being identical to the commit author
 * [ ] Code modified for feature
 * [ ] Test suite updated with functionality tests
 * [ ] Test suite updated with negative tests
 * [ ] Documentation updated / NEWS entry present (for non-trivial changes)
 * [ ] CI timeout is 2h or higher (see Settings/CICD/General pipelines/Timeout)

## Reviewer's checklist:
 * [ ] Any issues marked for closing are addressed
 * [ ] There is a test suite reasonably covering new functionality or modifications
 * [ ] Function naming, parameters, return values, types, etc., are consistent and according to `CONTRIBUTION.md`
 * [ ] This feature/change has adequate documentation added
 * [ ] No obvious mistakes in the code

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1642
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/20220918/420e925c/attachment.html>


More information about the Gnutls-devel mailing list