NetBSD Problem Report #24579

Received: (qmail 14468 invoked by uid 605); 27 Feb 2004 16:52:09 -0000
Message-Id: <200402271652.i1RGq3429908@serpens.de>
Date: Fri, 27 Feb 2004 17:52:05 +0100 (MET)
From: "S.P.Zeidler" <spz@serpens.de>
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: spz@serpens.de
To: gnats-bugs@gnats.netbsd.org
Cc: wiz@netbsd.org
Subject: security/gnupg should choose ELF format for m68k--netbsdelf
X-Send-Pr-Version: 3.95

>Number:         24579
>Category:       pkg
>Synopsis:       security/gnupg should choose ELF format for m68k--netbsdelf
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 27 16:53:00 +0000 2004
>Closed-Date:    Mon Mar 01 19:13:35 +0000 2004
>Last-Modified:  Mon Mar 01 19:13:35 +0000 2004
>Originator:     S.P.Zeidler
>Release:        NetBSD 1.6_STABLE
>Organization:
spz@serpens.de (S.P.Zeidler)
>Environment:
System: NetBSD serpens.de 1.6_STABLE NetBSD 1.6_STABLE (SERPENS) #0: Thu Dec 19 09:27:32 MET 2002 spz@sagitta:/data/cvs/src16/sys/arch/amiga/compile/SERPENS amiga
Architecture: m68k
Machine: amiga
>Description:
	gnupg contains assembler routines to speed up operations on a few
	platforms, among these m68k. As there are several different assembler
	dialects for m68k, one needs to pick the right one. Due to there not
	yet being any specification in the gnupg source it does not know to
	pick ELF syntax for m68k--netbsdelf, but tries to use MIT syntax,
	the default for m68k, which makes the assembler barf on it and the
	package build thusly fail.
>How-To-Repeat:
	try to make the package as is on a m68k--netbsdelf system
>Fix:
	the following fix corrects the 'does not compile' problem, but has an
	issue in that it does not discern between various m68k CPUs, so
	it won't pick the optimum solution for M68060:

--- mpi/config.links.orig	Fri Feb 27 08:23:34 2004
+++ mpi/config.links	Fri Feb 27 08:36:38 2004
@@ -191,7 +191,8 @@
 	path="m68k"
 	;;
     m680[234]0*-*-linux* | \
-    m68k*-*-linux*)
+    m68k*-*-linux* | \
+    m68k*-*-netbsdelf)
 	echo '#define ELF_SYNTAX'           >>./mpi/asm-syntax.h
 	cat  $srcdir/mpi/m68k/syntax.h	    >>./mpi/asm-syntax.h
 	;;

for M68060 you'd want it one rule lower, i.e.:

--- mpi/config.links.orig	Wed Dec  3 11:10:16 2003
+++ mpi/config.links	Fri Feb 27 17:19:40 2004
@@ -195,7 +195,8 @@
 	echo '#define ELF_SYNTAX'           >>./mpi/asm-syntax.h
 	cat  $srcdir/mpi/m68k/syntax.h	    >>./mpi/asm-syntax.h
 	;;
-    m68060*-*-linux*)
+    m68060*-*-linux* | \
+    m68k*-*-netbsdelf)
 	echo '#define ELF_SYNTAX'           >>./mpi/asm-syntax.h
 	cat  $srcdir/mpi/m68k/syntax.h	    >>./mpi/asm-syntax.h
 	path="m68k"

getting the pkg system to use the best variant is left as an exercise to
the maintainer ,-)
>Release-Note:
>Audit-Trail:

From: "S.P.Zeidler" <spz@serpens.de>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, wiz@netbsd.org
Subject: Re: pkg/24579: security/gnupg should choose ELF format for m68k--netbsdelf
Date: Sat, 28 Feb 2004 23:47:07 +0100

 Amend the fix to:
 ------ snip ---------
 --- Makefile    8 Feb 2004 01:00:13 -0000       1.60
 +++ Makefile    28 Feb 2004 22:32:48 -0000
 @@ -33,12 +33,18 @@

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

 -BUILD_DEFS+=   USE_I586 USE_IDEA USE_OPENLDAP
 +BUILD_DEFS+=   USE_I586 USE_IDEA USE_OPENLDAP M68060

  .if defined(USE_I586) && ${USE_I586} == YES
  # use assembler routines optimized for i586
  ONLY_FOR_PLATFORM=     *-*-i386
  MACHINE_GNU_ARCH=      i586
 +.endif
 +
 +.if defined(M68060) && ${M68060} == YES 
 +# be more efficient on M68060 machines
 +CONFIGURE_ENV+=                M68060=${M68060}
 +CFLAGS+=                       -m68060
  .endif

  .if defined(USE_IDEA) && ${USE_IDEA} == YES
 ------ snip ---------

 plus

 ------ snip ---------
 --- mpi/config.links.orig	Wed Dec  3 11:10:16 2003
 +++ mpi/config.links	Sat Feb 28 22:00:08 2004
 @@ -200,6 +200,14 @@
  	cat  $srcdir/mpi/m68k/syntax.h	    >>./mpi/asm-syntax.h
  	path="m68k"
  	;;
 +    m68k*-*-netbsdelf)
 +	echo '#define ELF_SYNTAX'           >>./mpi/asm-syntax.h
 +	cat  $srcdir/mpi/m68k/syntax.h	    >>./mpi/asm-syntax.h
 +	path="m68k"
 +	if ! test x$M68060 = xYES; then
 +		path="m68k/mc68020 m68k"
 +	fi
 +	;;
      m68k-atari-mint)
  	echo '#define MIT_SYNTAX'           >>./mpi/asm-syntax.h
  	cat  $srcdir/mpi/m68k/syntax.h	    >>./mpi/asm-syntax.h
 ------ snip ---------

 where the latter hopefully may get included into gnupg eventually.

 A make test runs about 17 minutes for the above 060 solution and 
 25min in the 'C code only' version on an 060. 

 So much for leaving exercises .. .-7
 -- 
 spz@serpens.de (S.P.Zeidler)

From: Thomas Klausner <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/24579 CVS commit: pkgsrc/security/gnupg
Date: Mon,  1 Mar 2004 19:12:25 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	wiz
 Date:		Mon Mar  1 19:12:25 UTC 2004

 Modified Files:
 	pkgsrc/security/gnupg: Makefile distinfo
 Added Files:
 	pkgsrc/security/gnupg/patches: patch-ab

 Log Message:
 Make build on m68kelf, and honour M68060 variable for quite a bit
 of speedup on m68060 machines.
 From S.P. Zeidler in PR 24579.


 To generate a diff of this commit:
 cvs rdiff -r1.60 -r1.61 pkgsrc/security/gnupg/Makefile
 cvs rdiff -r1.25 -r1.26 pkgsrc/security/gnupg/distinfo
 cvs rdiff -r0 -r1.22 pkgsrc/security/gnupg/patches/patch-ab

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed 
State-Changed-By: wiz 
State-Changed-When: Mon Mar 1 19:13:27 UTC 2004 
State-Changed-Why:  
Committed, thanks a lot! 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.