Hiding internal symbols

2022-08-07 Thread Magnus Holmgren
Hi Niels, 

Tracking which internal symbols exist on different architectures to avoid 
errors and warnings when generating the symbols files for Debian is a major 
PITA, but I should probably give up on that and simply tag them all 
"optional". But have you considered hiding them? https://developer.apple.com/
library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-
Articles/DynamicLibraryDesignGuidelines.html, https://gcc.gnu.org/onlinedocs/
gcc/Common-Function-Attributes.html#Common-Function-Attributes, and gcc(1) 
have some information on this.

What you do is to attach 

__attribute__((visibility("default"))) 

to the symbols to be exported (you can of course #define a macro, say EXPORT, 
with this), then compile with -fvisibility=hidden in CFLAGS.

This should be cross-platform, it sounds like, but I'm not 100% sure.

-- 
Magnus Holmgrenholmg...@debian.org
Debian Developer 

signature.asc
Description: This is a digitally signed message part.
___
nettle-bugs mailing list -- nettle-bugs@lists.lysator.liu.se
To unsubscribe send an email to nettle-bugs-le...@lists.lysator.liu.se


Re: [PATCH] Fix libdir definition on FreeBSD for 32-bit ABI

2022-08-07 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes:

> Ah, that's a bug, I think. That *mips* pattern (see
> https://git.lysator.liu.se/nettle/nettle/-/blob/master/configure.ac#L344)
> should be replaced to only match 64-bit mips.>
>
> Does it work to just replace it with *mips64*?

I tried logging in to the gcc farm machine gcc22.fsffrance.org, and
config.guess says mips64-unknown-linux-gnu, probably based on uname -m
saying "mips64". So changing to mips64 for the abi check should probably work.

>  And similar for *sparc*, just above.

Unfortunately, sparcs appear to behave differently. Tried logging in to
gcc210.fsffrance.org, there uname -m says "sun4u", and config.guess says
"sparc-sun-solaris2.10" (not "sparc64*"). 

Regards,
/Niels

-- 
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
___
nettle-bugs mailing list -- nettle-bugs@lists.lysator.liu.se
To unsubscribe send an email to nettle-bugs-le...@lists.lysator.liu.se


Re: [PATCH] doc: document compress functions

2022-08-07 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes:

> Corentin Labbe  writes:
>
>> Since new shaxxx_compress functions were added, it is time to add
>> documenation for it along documentation for old md5/sha1_compress.
>
> Thanks. A few comments below. Let me know if you can do yet another
> revision, otherwise, I'll do the suggested edits when I apply the patch.

Now applied with some edits. Thanks!
/Niels

-- 
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
___
nettle-bugs mailing list -- nettle-bugs@lists.lysator.liu.se
To unsubscribe send an email to nettle-bugs-le...@lists.lysator.liu.se