Created attachment 206877 [details] v1 Enable fat library by default on AMD64, ARM64 and ARM(v7) as this makes libnettle include multiple versions of certain functions in the library and select the ones to use at run-time. This enables various instructions such as AES-NI on AMD64 and allows libnettle to use NEON when possible on ARM. Also set TEST_TARGET so "make test" runs as expected.
I forgot to mention that I moved USES variable to make portlint happy, sorry about that.
@Fukang Can you assist with ARM poudriere confirmation?
Thank you for the report and patch Daniel
Created attachment 206878 [details] v2 List supported architectures in menu for fat library option
(In reply to Kubilay Kocak from comment #2) Sure thing. poudriere OK.
Created attachment 206898 [details] nettle-3.5.1_2.log.armv7
Created attachment 206899 [details] nettle-3.5.1_2.log.aarch64
Created attachment 206904 [details] v3 I missed the fact that the configure script isn't arm64/aarch64 aware while the code does take 64-bit platforms into account. https://git.lysator.liu.se/nettle/nettle/blob/nettle_3.5.1_release_20190627/fat-arm.c#L124 https://git.lysator.liu.se/nettle/nettle/blob/nettle_3.5.1_release_20190627/configure.ac#L431 I also tried to modify the configure script to include assembly code (files) on aarch64 however that resulted in compliation errors so I think we have to settle for amd64 and arm(v7) for now. My apologies for not noticing it earlier. This revision doesn't enable fat library on arm64/aarch64
(In reply to daniel.engberg.lists from comment #8) I'll add OPTIONS_DEFINE_{am64,armv7}=FAT instead of adding FAT to OPTIONS_DEFINE since we can only build fat library on those 2 architectures currently. OPTIONS_DEFINE= DOCS EXAMPLES OPTIONS_DEFINE_amd64= FAT OPTIONS_DEFINE_armv7= FAT OPTIONS_DEFAULT_amd64= FAT OPTIONS_DEFAULT_armv7= FAT FAT_DESC= Build fat library
(In reply to daniel.engberg.lists from comment #0) How is that supposed to work for us? The runtime cpu detection seems specific for linux: https://git.lysator.liu.se/nettle/nettle/blob/nettle_3.5.1_release_20190627/fat-arm.c#L64
Closing this for now, I don't have time to look into this further. Sorry for the late reply.