Subject: pkg/18301: lang/perl58 fails tests on Alpha when gcc is too old (patch provided)
To: None <gnats-bugs@gnats.netbsd.org>
From: Rhialto <rhialto@azenomei.knuffel.net>
List: netbsd-bugs
Date: 09/15/2002 19:04:17
>Number:         18301
>Category:       pkg
>Synopsis:       lang/perl58 fails tests on Alpha when gcc is too old (patch provided)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 15 10:05:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Rhialto
>Release:        <NetBSD-current source date>
>Organization:
	
>Environment:
	
System: NetBSD azenomei.falu.nl 1.5.1_BETA NetBSD 1.5.1_BETA (AZENOMEI) #0: Sun Apr 22 00:38:14 CEST 2001 rhialto@azenomei.falu.nl:/vol1/rhialto/cvs/netbsd-1-5/syssrc/sys/arch/alpha/compile/AZENOMEI alpha


>Description:
	
	When perl 5.8.0 is compiled on Alpha with the gcc that is
	shipped with NetBSD 1.5, it fails some of the tests in the
	testsuite.
	Options are to upgrade gcc, or to disable optimisation.
>How-To-Repeat:
	see above
>Fix:
	This patch, which will be part of perl 5.8.1, will detect
	the situation.
	Additionally, a conditional build-time dependency on the
	lang/gcc package could be added when necessary.
	As I understand, the gcc in NetBSD 1.6 is good enough.
	When perl 5.8.1 is integrated this patch should not be needed
	anymore.

--- hints/netbsd.sh.orig	Sat Jun  1 19:03:12 2002
+++ hints/netbsd.sh	Sat Sep 14 17:26:54 2002
@@ -144,3 +144,28 @@
 	done
 	;;
 esac
+
+case `uname -m` in
+alpha)
+    echo 'int main() {}' > try.c
+    gcc=`${cc:-cc} -v -c try.c 2>&1|grep 'gcc version egcs-2'`
+    case "$gcc" in
+    '' | "gcc version egcs-2.95."[3-9]*) ;; # 2.95.3 or better okay
+    *)	cat >&4 <<EOF
+***
+*** Your gcc ($gcc) is known to be
+*** too buggy on netbsd/alpha to compile Perl with optimization.
+*** It is suggested you install the lang/gcc package which should
+*** have at least gcc 2.95.3 which should work okay: use for example
+*** Configure -Dcc=/usr/pkg/gcc-2.95.3/bin/cc.  You could also
+*** Configure -Doptimize=-O0 to compile Perl without any optimization
+*** but that is not recommended.
+***
+EOF
+	exit 1
+	;;
+    esac
+    rm -f try.*
+    ;;
+esac
+

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert      -- The evil eye is caused by the black
\X/ rhialto/at/xs4all.nl        -- tongue - Tom Poes, "Het boze oog", 4456.
>Release-Note:
>Audit-Trail:
>Unformatted: