Subject: pkg/18301: lang/perl58 fails tests on Alpha when gcc is too old (patch provided)
To: None <>
From: Rhialto <>
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
>Originator:     Rhialto
>Release:        <NetBSD-current source date>
System: NetBSD 1.5.1_BETA NetBSD 1.5.1_BETA (AZENOMEI) #0: Sun Apr 22 00:38:14 CEST 2001 alpha

	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
	Options are to upgrade gcc, or to disable optimisation.
	see above
	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

--- hints/	Sat Jun  1 19:03:12 2002
+++ hints/	Sat Sep 14 17:26:54 2002
@@ -144,3 +144,28 @@
+case `uname -m` in
+    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.
+	exit 1
+	;;
+    esac
+    rm -f try.*
+    ;;

___ Olaf 'Rhialto' Seibert      -- The evil eye is caused by the black
\X/ rhialto/at/        -- tongue - Tom Poes, "Het boze oog", 4456.