develooper Front page | perl.perl5.porters | Postings from February 2008

Re: Change 33330: [perl #50946] modified hints for Darwin x86 64bit

Thread Next
From:
Nicholas Clark
Date:
February 25, 2008 02:40
Subject:
Re: Change 33330: [perl #50946] modified hints for Darwin x86 64bit
Message ID:
20080225104001.GX23790@plum.flirble.org
On Mon, Feb 18, 2008 at 05:30:02AM -0800, Rafael Garcia-Suarez wrote:
> Change 33330 by rgs@scipion on 2008/02/18 13:29:01
> 
> 	Subject: [perl #50946] modified hints for Darwin x86  64bit 
> 	From: "Daniel M. Quinlan" (via RT) <perlbug-followup@perl.org>
> 	Date: Sun, 17 Feb 2008 14:20:58 -0800
> 	Message-ID: <rt-3.6.HEAD-24181-1203286856-952.50946-75-0@perl.org>
> 
> Affected files ...
> 
> ... //depot/perl/hints/darwin.sh#64 edit
> 
> Differences ...
> 
> ==== //depot/perl/hints/darwin.sh#64 (text) ====
> Index: perl/hints/darwin.sh
> --- perl/hints/darwin.sh#63~27333~	2006-02-27 02:33:59.000000000 -0800
> +++ perl/hints/darwin.sh	2008-02-18 05:29:01.000000000 -0800
> @@ -224,9 +224,19 @@
>  ***    ext/threads/shared/t/wait (threaded builds only)
>  
>  EOM
> +    case `uname -p` in 
> +    powerpc) arch=ppc64 ;;
> +    i386) arch=x86_64 ;;
> +    *) cat <<EOM >&4
> +
> +*** Don't recognize processor, can't specify 64 bit compilation.
> +
> +EOM
> +    ;;
> +    esac
>      for var in ccflags cppflags ld ldflags
>      do
> -       eval $var="\$${var}\ -arch\ ppc64"
> +       eval $var="\$${var}\ -arch\ $arch"
>      done
>  
>      [ "$d_msgctl" ] || d_msgctl='undef'
> End of Patch.

Innocent as it may look, I think that this patch (from Daniel M. Quinlan whose
address we don't have) creates a dangerous problem:

$ ./perl -Ilib -V:archname -V:longsize -V:ivsize -V:config_args
archname='darwin-2level';
longsize='4';
ivsize='4';
config_args='-Dusedevel -des';

$ ./perl -Ilib -V:archname -V:longsize -V:ivsize -V:config_args
archname='darwin-64int-2level';
longsize='4';
ivsize='8';
config_args='-Dusedevel -Duse64bitint -des';

$ ./perl -Ilib -V:archname -V:longsize -V:ivsize -V:config_args
archname='darwin-2level';
longsize='8';
ivsize='8';
config_args='-Dusedevel -Duse64bitall -des';


It looks like the act of changing to LP64 isn't being recorded in the archname,
which we must fix, else shared libraries which are not compatible will be
mapped onto the same pathnames.

Or does this comment in darwin.sh mean that all is safe?

  # Since we can build fat, the archname doesn't need the processor type
  archname='darwin';



I would assume no, as even if the linker can spot that (say)

/opt/local/lib/perl5/5.10.1/darwin-2level/auto/POSIX/POSIX.bundle

doesn't contain an architecture it can load, by default the build isn't fat,
so building a second perl to -Dprefix=/opt/local will overwrite the
architecture dependant files of the first.


So does that mean that that hints file is wrong even for 32bit stuff? In that
the archname should only be 'darwin' if we *are* building fat?

Nicholas Clark

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About