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


When attempting a 64-bit Intel build on OS X 10.5, the build fails
when the assembler ingests PPC opcodes.  These result from the PPC
branches being followed thanks to -DPPC being set.  -DPPC results from
the JIT checks seeing that cpuarch is ppc, and arch.pm says ppc as
$byteorder isn't 1234 (it's 12345678 on 64-bit builds) in the
darwin-specific checks.  The attached patch changes the arch.pm check
to use /^1234/, like byteorder.pm does.

$ perl Configure.pl --ccflags='-arch x86_64' --ldflags='-arch x86_64'
--linkflags='-arch x86_64' --cc='gcc -arch x86_64' --verbose-step=arch
[...]
Determining if your C library has a working S_ISREG....................yes.
Determining CPU architecture and OS...
determining operating system and cpu architecture
archname: <darwin-thread-multi-2level>
byteorder: 12345678
osname: darwin
cpuarch: ppc
................................done.
Setting Configuration Data:
(
        verbose => undef,
);

Determining JIT capability.............................................yes.
[...]
$ make
[...]
gcc -arch x86_64 -I./include -g -pipe -fno-common -no-cpp-precomp
-Wdeclaration-after-statement -I/usr/local/include -pipe -fno-common
-Wno-long-double -DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED
-DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NONNULL -DHASATTRIBUTE_NORETURN
-DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED
-DHASATTRIBUTE_WARN_UNUSED_RESULT -falign-functions=16
-fvisibility=hidden -maccumulate-outgoing-args -W -Wall
-Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts
-Wcomment -Wdisabled-optimization -Wendif-labels -Wextra -Wformat
-Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k
-Wimplicit -Wimport -Winit-self -Winline -Winvalid-pch
-Wmissing-braces -Wmissing-field-initializers
-Wno-missing-format-attribute -Wpacked -Wparentheses -Wpointer-arith
-Wreturn-type -Wsequence-point -Wno-shadow -Wsign-compare
-Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default
-Wtrigraphs -Wundef -Wunknown-pragmas -Wno-unused -Wvariadic-macros
-Wwrite-strings -Wbad-function-cast -Wdeclaration-after-statement
-Wimplicit-function-declaration -Wimplicit-int -Wmain
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wnonnull
-g -Wno-shadow -DHAS_JIT -DPPC -DHAVE_COMPUTED_GOTO -I. -o xx.o -c
xx.c
[...]
perl tools/build/pmc2c.pl --c src/pmc/undef.pmc
perl tools/build/c2str.pl src/pmc/undef.c > src/pmc/undef.str
perl tools/build/c2str.pl --all
src/string.c
src/ops/core_ops.c
{standard input}:102476:no such instruction: `trap'
make: *** [src/ops/core_ops.o] Error 1
$

-- 
Seneca Cunningham
<[EMAIL PROTECTED]>
Index: config/auto/arch.pm
===================================================================
--- config/auto/arch.pm (revision 29942)
+++ config/auto/arch.pm (working copy)
@@ -59,7 +59,7 @@
     # the above split fails because archname is "darwin-thread-multi-2level".
     if ( $cpuarch =~ /darwin/ ) {
         $osname = 'darwin';
-        if ( $conf->data->get('byteorder') == 1234 ) {
+        if ( $conf->data->get('byteorder') =~ /^1234/ ) {
             $cpuarch = 'i386';
         }
         else {

Reply via email to