Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modified hints for Darwin x86 64bit #9228

Closed
p5pRT opened this issue Feb 17, 2008 · 7 comments
Closed

modified hints for Darwin x86 64bit #9228

p5pRT opened this issue Feb 17, 2008 · 7 comments

Comments

@p5pRT
Copy link

p5pRT commented Feb 17, 2008

Migrated from rt.perl.org#50946 (status was 'resolved')

Searchable as RT50946$

@p5pRT
Copy link
Author

p5pRT commented Feb 17, 2008

From danq@brtt.com

The existing hints file for Darwin for perl 5.10 (and 5.8.8) doesn't
allow
the option of 64bit compilation on an intel mac. I think the attached
version
is an improvement.

-- danq

@p5pRT
Copy link
Author

p5pRT commented Feb 17, 2008

From danq@brtt.com

darwin.sh

@p5pRT
Copy link
Author

p5pRT commented Feb 18, 2008

From @Tux

On Sun, 17 Feb 2008 14​:20​:58 -0800, "Daniel M. Quinlan" (via RT)
<perlbug-followup@​perl.org> wrote​:

# New Ticket Created by "Daniel M. Quinlan"
# Please include the string​: [perl #50946]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=50946 >

The existing hints file for Darwin for perl 5.10 (and 5.8.8) doesn't
allow the option of 64bit compilation on an intel mac. I think
the attached version is an improvement.

If you could resend that as an uniformed diff, not only would it be much
easier to see what you changed, and if that could cause any objections,
and comments, but also would it make it much more likely that the change
would be accepted.

--
H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/)
using & porting perl 5.6.2, 5.8.x, 5.10.x on HP-UX 10.20, 11.00, 11.11,
& 11.23, SuSE 10.1 & 10.2, AIX 5.2, and Cygwin. http​://qa.perl.org
http​://mirrors.develooper.com/hpux/ http​://www.test-smoke.org
  http​://www.goldmark.org/jeff/stupid-disclaimers/

@p5pRT
Copy link
Author

p5pRT commented Feb 18, 2008

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Feb 18, 2008

From @rgs

On 17/02/2008, via RT Daniel M. Quinlan <perlbug-followup@​perl.org> wrote​:

The existing hints file for Darwin for perl 5.10 (and 5.8.8) doesn't
allow
the option of 64bit compilation on an intel mac. I think the attached
version
is an improvement.

Thanks, applied to bleadperl as change #33330.

@p5pRT p5pRT closed this as completed Feb 18, 2008
@p5pRT
Copy link
Author

p5pRT commented Feb 18, 2008

@rgs - Status changed from 'open' to 'resolved'

@p5pRT
Copy link
Author

p5pRT commented Feb 25, 2008

From @nwc10

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&#8203;: \[perl \#50946\] modified hints for Darwin x86  64bit 
From&#8203;: "Daniel M\. Quinlan" \(via RT\) \<perlbug\-followup@&#8203;perl\.org>
Date&#8203;: Sun\, 17 Feb 2008 14&#8203;:20&#8203;:58 \-0800
Message\-ID&#8203;: \<rt\-3\.6\.HEAD\-24181\-1203286856\-952\.50946\-75\-0@&#8203;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#6327333 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant