Subject: pkg/24579: security/gnupg should choose ELF format for m68k--netbsdelf
To: None <gnats-bugs@gnats.netbsd.org>
From: S.P.Zeidler <spz@serpens.de>
List: netbsd-bugs
Date: 02/27/2004 17:52:05
>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:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 27 16:53:00 UTC 2004
>Closed-Date:
>Last-Modified:
>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:
>Unformatted: