NetBSD Problem Report #56152

From www@netbsd.org  Fri May  7 10:54:58 2021
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 0AF391A9260
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  7 May 2021 10:54:58 +0000 (UTC)
Message-Id: <20210507105456.691A21A9261@mollari.NetBSD.org>
Date: Fri,  7 May 2021 10:54:56 +0000 (UTC)
From: pekdon@gmail.com
Reply-To: pekdon@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Add disable-asm option to security/libgcrypt
X-Send-Pr-Version: www-1.0

>Number:         56152
>Category:       pkg
>Synopsis:       Add disable-asm option to security/libgcrypt
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 07 10:55:00 +0000 2021
>Closed-Date:    Tue Nov 23 12:34:20 +0000 2021
>Last-Modified:  Tue Nov 23 12:34:20 +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 libgcrypt with assembly enabled cause link issues on Solaris 10 x86_64 as shown below:

section [4].eh_frame: section type is SHT_PROGBITS: expected SHT_AMD64_UNWIND

This issue can probably be avoided with a more up-to-date linkerw, easy way out is however to disable assembly with the --disable-asm.

Add option to support compiling without assembly enabled.
>How-To-Repeat:
Build security/libgcrypt (tested gcc 6.5, Solaris provided gcc 3.4.3) on Solaris 10 x86_64 with an unpatched /usr/ccs/bin/ld
>Fix:
diff --git a/security/libgcrypt/options.mk b/security/libgcrypt/options.mk
index bb7fb562cb6..7a16c3e9860 100644
--- a/security/libgcrypt/options.mk
+++ b/security/libgcrypt/options.mk
@@ -1,7 +1,7 @@
 # $NetBSD: options.mk,v 1.8 2013/04/21 14:44:53 wiz Exp $

 PKG_OPTIONS_VAR=       PKG_OPTIONS.libgcrypt
-PKG_SUPPORTED_OPTIONS=
+PKG_SUPPORTED_OPTIONS= disable-asm

 .include "../../mk/bsd.prefs.mk"

@@ -20,6 +20,10 @@ PKG_SUGGESTED_OPTIONS+=      via-padlock

 .include "../../mk/bsd.options.mk"

+.if !empty(PKG_OPTIONS:Mdisable-asm)
+CONFIGURE_ARGS+=       --disable-asm
+.endif
+
 .if empty(PKG_OPTIONS:Mvia-padlock)
 # Disable VIA Padlock support.
 CONFIGURE_ARGS+=       --disable-padlock-support

>Release-Note:

>Audit-Trail:
From: =?utf-8?q?Claes_N=C3=A4st=C3=A9n?= <pekdon@gmail.com>
To: gnats-bugs <gnats-bugs@netbsd.org>
Cc: 
Subject: Re: pkg/56152: Add disable-asm option to security/libgcrypt
Date: Tue, 23 Nov 2021 13:26:28 +0100

 Excerpts from gnats-admin's message of 2021-05-07 10:55:00 +0000:
 > Thank you very much for your problem report.
 > It has the internal identification `pkg/56152'.
 > The individual assigned to look at your
 > report is: pkg-manager. 
 > 
 > >Category:       pkg
 > >Responsible:    pkg-manager
 > >Synopsis:       Add disable-asm option to security/libgcrypt
 > >Arrival-Date:   Fri May 07 10:55:00 +0000 2021

 Please disregard and close this one.

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Tue, 23 Nov 2021 12:34:20 +0000
State-Changed-Why:
Closed on submitter's request.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.