The below patch, to be applied using patch -p0 while in the main directory,
which I inserted (not copied and pasted) into this mail message - so it
should be OK in terms of spacing - makes "usemallocwrap='false'" the default
(overridable via command-line or manual Configure entries) for cc -n32
compiles on IRIX 6.2+. It applies on, and so far works on, both 5.8.x
(23430) and 5.9.x (23438):

Checking status for configuration 'testpatch.5.8.x_config' (5.8.x)
  Change number 23430 started on Sun Oct 31 00:21:38 2004.
    4 out of 36 configurations finished in 3 hours 24 minutes.
    2 configurations showed failures (F).
    0 failures in the running configuration.
    32 configurations to finish, estimated completion in 1 day 2 hours 13 minutes
    Average smoke duration: 51 minutes 9 seconds.
  Matrix, using cc -n32 version MIPSpro Compilers: Version 7.3.1.3m:
     23430     Configuration (common) -Accflags='-mips4'
  ----------- ---------------------------------------------------------
  O O O O     -Duseperlio
  M - M -     -Duseperlio -Dusemallocwrap
  ? - - -     -Duseperlio -Uusemallocwrap
  | | | +----- PERLIO = perlio -DDEBUGGING
  | | +------- PERLIO = stdio  -DDEBUGGING
  | +--------- PERLIO = perlio
  +----------- PERLIO = stdio

Checking status for configuration 'testpatch.5.9.x_config' (5.9.x)
  Change number 23438 started on Sun Oct 31 01:04:43 2004.
    4 out of 18 configurations finished in 2 hours 22 minutes.
    2 configurations showed failures (F).
    0 failures in the running configuration.
    14 configurations to finish, estimated completion in 7 hours 54 minutes
    Average smoke duration: 35 minutes 32 seconds.
  Matrix, using cc -n32 version MIPSpro Compilers: Version 7.3.1.3m:
     23438     Configuration (common) -Accflags='-mips4'
  ----------- ---------------------------------------------------------
  O O O O     
  M - M -     -Dusemallocwrap
  - - - -     -Uusemallocwrap
  | | | +----- PERLIO = perlio -DDEBUGGING
  | | +------- PERLIO = stdio  -DDEBUGGING
  | +--------- PERLIO = perlio
  +----------- PERLIO = stdio

Still running are the checks for -Uusemallocwrap, -32/-o32 mode, and -64
mode, but I do not anticipate any differences from the expected results in
regard to usemallocwrap (I am interested to see what happens with Math::Trig
in -32/-o32 mode on a 64-bit machine and on machines with other processors
than IP22 and IP32, and will report on any differences). I describe this as
a temporary fix because:
  A. While this may be suitable for stable to _keep_ it stable, it would be
     nice to make this option functional for IRIX for 5.9.x (and thence
     5.10.x), if possible.
  B. I don't know if this option should be turned off when using gcc without
     -mabi=64.

     -Allen

P.S. BTW, would it be preferable if I put this in as a bug report? I wasn't
sure, since there was already discussion on it on the smokers/daily-build
list which got transferred to perl5-porters.

--- hints/irix_6.sh.old Sat Oct 30 23:01:24 2004
+++ hints/irix_6.sh     Sat Oct 30 23:58:08 2004
@@ -41,6 +41,9 @@
 # The compiler bug has been reported to SGI.
 # -- Allen Smith <[EMAIL PROTECTED]>
 
+# Modified (10/30/04) to turn off usemallocwrap (PERL_MALLOC_WRAP) in -n32
+# mode - Allen.
+
 case "$use64bitall" in
 $define|true|[yY]*)
     case "`uname -s`" in
@@ -140,7 +143,15 @@
        test -z "$lddlflags" && lddlflags="-n32 -shared"
        test -z "$libc" && libc='/usr/lib32/libc.so'
        test -z "$plibpth" && plibpth='/usr/lib32 /lib32 /usr/ccs/lib'
-       ;;
+
+       # PERL_MALLOC_WRAP gives false alarms ("panic: memory wrap") in IRIX
+       # -n32 mode, resulting in perl compiles never getting further than
+       # miniperl. I am not sure whether it actually does any good in -32 or
+       # -64 mode, especially the latter, but it does not give false
+       # alarms (in testing). -Allen
+
+       usemallocwrap=${usemallocwrap:-false}
+       ;;
 *"cc -64"*)
     case "`uname -s`" in
     IRIX)
@@ -188,6 +199,8 @@
                lddlflags="$lddlflags -mabi=64"
                ;;
        *)      ccflags="$ccflags -DIRIX32_SEMUN_BROKEN_BY_GCC"
+                # XXX Note: It is possible that turning off usemallocwrap is
+                # needed here; insufficient data! - Allen
                ;;
        esac
        ;;


-- 
Allen Smith                     http://cesario.rutgers.edu/easmith/
September 11, 2001              A Day That Shall Live In Infamy II
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." - Benjamin Franklin

Reply via email to