pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/56154: Support building security/nettle without assembler enabled



>Number:         56154
>Category:       pkg
>Synopsis:       Support building security/nettle without assembler enabled
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 07 12:40:01 +0000 2021
>Originator:     Claes Nästén
>Release:        trunk 2021-05-07
>Organization:
>Environment:
SunOS u40 5.10 Generic_147148-26 i86pc i386 i86pc

>Description:
Building security/nettle on Solaris 10 x86_64 on my Ultra 40 ends with issues with the assembler:

aes-encrypt-internal-2.s: Assembler messages:
aes-encrypt-internal-2.s:103: Error: no such instruction: `aesenc %xmm1,%xmm15'
aes-encrypt-internal-2.s:104: Error: no such instruction: `aesenc %xmm2,%xmm15'
aes-encrypt-internal-2.s:105: Error: no such instruction: `aesenc %xmm3,%xmm15'
aes-encrypt-internal-2.s:106: Error: no such instruction: `aesenc %xmm4,%xmm15'
aes-encrypt-internal-2.s:107: Error: no such instruction: `aesenc %xmm5,%xmm15'
aes-encrypt-internal-2.s:108: Error: no such instruction: `aesenc %xmm6,%xmm15'
aes-encrypt-internal-2.s:109: Error: no such instruction: `aesenc %xmm7,%xmm15'
aes-encrypt-internal-2.s:110: Error: no such instruction: `aesenc %xmm8,%xmm15'
aes-encrypt-internal-2.s:111: Error: no such instruction: `aesenc %xmm9,%xmm15'
aes-encrypt-internal-2.s:114: Error: no such instruction: `aesenc %xmm10,%xmm15'
aes-encrypt-internal-2.s:115: Error: no such instruction: `aesenc %xmm11,%xmm15'
aes-encrypt-internal-2.s:119: Error: no such instruction: `aesenc %xmm12,%xmm15'
aes-encrypt-internal-2.s:120: Error: no such instruction: `aesenc %xmm13,%xmm15'
aes-encrypt-internal-2.s:123: Error: no such instruction: `aesenclast %xmm14,%xmm15'

Assuming this could be remedied by using the GNU assembler, adding an option to disable use of assembly code as supported by the nettle configure script allows for working around the problem.
>How-To-Repeat:
Build security/nettle on Solaris 10 x86_64.
>Fix:
diff --git a/security/nettle/Makefile b/security/nettle/Makefile
index a0581e724ed..d911231d6a5 100644
--- a/security/nettle/Makefile
+++ b/security/nettle/Makefile
@@ -29,6 +29,8 @@ TEST_TARGET=          check
 PKGCONFIG_OVERRIDE=    hogweed.pc.in
 PKGCONFIG_OVERRIDE+=   nettle.pc.in
 
+.include "options.mk"
+
 BUILDLINK_API_DEPENDS.gmp+=    gmp>=6.0
 .include "../../devel/gmp/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/security/nettle/options.mk b/security/nettle/options.mk
new file mode 100644
index 00000000000..355344af288
--- /dev/null
+++ b/security/nettle/options.mk
@@ -0,0 +1,10 @@
+# $Id$
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.nettle
+PKG_SUPPORTED_OPTIONS= disable-asm
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mdisable-asm)
+CONFIGURE_ARGS+=       --disable-assembler
+.endif


Home | Main Index | Thread Index | Old Index