Subject: pkg/5447: bsd.pkg.mk doesn't properly guess dynamic loading support
To: None <gnats-bugs@gnats.netbsd.org>
From: Jaromir Dolecek <dolecek@ics.muni.cz>
List: netbsd-bugs
Date: 05/12/1998 21:18:21
>Number:         5447
>Category:       pkg
>Synopsis:       bsd.pkg.mk doesn't properly guess dynamic loading support
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 12 12:20:00 1998
>Last-Modified:
>Originator:     Jaromir Dolecek
>Organization:
	ICS MU, Brno, Czech Republic
>Release:        1.3.1
>Environment:
	
System: NetBSD saruman.ics.muni.cz 1.3.1 NetBSD 1.3.1 (SARUMAN) #0: Sun Apr 19 16:15:24 MEST 1998 dolecek@saruman.ics.muni.cz:/usr/home/dolecek/N131/usr/src/sys/arch/i386/compile/SARUMAN i386


>Description:
	To support dynamic loading feature of many packages and
	still retain compatibility with these archs which do not
	support DSO, packages use separate PLIST-md.shared and
	PLIST-md.static and make(1) dynamically guesses which one
	to use on particular system. There is explicit list
	of architectures which doesn't support DSO. This list
	is, well, "a bit misleading".

	First, it considers alpha & mips as not capable of DSO.
	For alpha, it's plainly not true. For mips, it's not true
	for -current as of today and upcoming 1.3.2 release.
	
	Secondly, vax is NOT listed on this list, even through
	it doesn't have dynamic loading nor shared libs yet.
>How-To-Repeat:
>Fix:
	XXX comment in bsd.pkg.mk says alpha is on that
	list just for because of broken support for DSO in perl on alpha,
	so it's definitely safe to remove it; perl package
	would need a patch which adds support for DSO on NetBSD/alpha
	(if the newest perl doesn't support NetBSD/alpha out of box).
	It's not definitely task of bsd.pkg.mk to deal with broken
	software.

	mips is a bit harder. Maybe OS version should be checked
	to find out if it really supports dynamic loading ? But
	I would vote to not complicate code more than necessary.

	Anyway, vax should be added to list of PLIST-md.static systems
	(I hope vax's ${MACHINE_ARCH} is vax).

	Here is a quick patch.

--- bsd.pkg.mk.orig	Tue May 12 20:46:41 1998
+++ bsd.pkg.mk	Tue May 12 20:47:07 1998
@@ -2014,9 +2014,7 @@
       exists(${PKGDIR}/PLIST-md.shared) && \
       exists(${PKGDIR}/PLIST-md.static)
 PLIST_SRC=	${PKGDIR}/PLIST-mi
-.if ${MACHINE_ARCH} == "powerpc" ||  ${MACHINE_ARCH} == "mips" ||  ${MACHINE_ARCH} == "alpha"
-# XXX this is mostly for perl; alpha can be removed once perl knows
-#     how to do dynamic loading - hubertf
+.if ${MACHINE_ARCH} == "powerpc" ||  ${MACHINE_ARCH} == "vax"
 PLIST_SRC+=	${PKGDIR}/PLIST-md.static
 .else
 PLIST_SRC+=	${PKGDIR}/PLIST-md.shared
>Audit-Trail:
>Unformatted: