Re: [perl #32514] Cannot Build Parrot on Linux PPC (nonvolatile registers)
On Thu, 2004-11-25 at 07:49 +0100, Leopold Toetsch wrote: Well, we need a more generic way to include such files. * platform_asm.s is just one file and depends on $platform. Here's a patch that's only a little bit ugly but makes things work automatically for me again. -- c Index: MANIFEST === RCS file: /cvs/public/parrot/MANIFEST,v retrieving revision 1.803 diff -u -u -r1.803 MANIFEST --- MANIFEST 9 Dec 2004 05:54:42 - 1.803 +++ MANIFEST 12 Dec 2004 23:21:36 - @@ -240,6 +240,7 @@ config/gen/platform/generic/math.h[] config/gen/platform/generic/memalign.c[] config/gen/platform/generic/memexec.c [] +config/gen/platform/generic/ppc_asm.s [] config/gen/platform/generic/signal.c [] config/gen/platform/generic/signal.h [] config/gen/platform/generic/stat.c[] Index: config/auto/jit.pl === RCS file: /cvs/public/parrot/config/auto/jit.pl,v retrieving revision 1.34 diff -u -u -r1.34 jit.pl --- config/auto/jit.pl 20 Oct 2004 08:03:13 - 1.34 +++ config/auto/jit.pl 12 Dec 2004 23:21:36 - @@ -116,6 +116,11 @@ $execcapable = 0; } } + + if ($jitcpuarch eq 'ppc' $osname eq 'linux') + { + Configure::Data-set( platform_asm = 1 ); + } $execcapable = $set_execcapable if defined $set_execcapable; if ($execcapable) { Configure::Data-set( Index: config/gen/platform.pl === RCS file: /cvs/public/parrot/config/gen/platform.pl,v retrieving revision 1.19 diff -u -u -r1.19 platform.pl --- config/gen/platform.pl 8 Oct 2004 09:45:01 - 1.19 +++ config/gen/platform.pl 12 Dec 2004 23:21:36 - @@ -211,9 +211,14 @@ close PLATFORM_C; if ( Configure::Data-get( 'platform_asm' ) ) { - my $asm_file = config/gen/platform/$platform/asm.s; - if ( -e $asm_file ) { + my $asm_path = config/gen/platform/$platform/; + + for my $prefix ( Configure::Data-get( 'jitcpuarch' ) . '_', '' ) + { + my $asm_file = $asm_path . $prefix . 'asm.s'; + next unless -e $asm_file; copy_if_diff( $asm_file, src/platform_asm.s ); + last; } } --- /dev/null 1969-12-31 16:00:00.0 -0800 +++ config/gen/platform/generic/ppc_asm.s 2004-12-12 15:04:24.0 -0800 @@ -0,0 +1,25 @@ +.text + .align 12 + .globl Parrot_ppc_jit_restore_nonvolatile_registers +Parrot_ppc_jit_restore_nonvolatile_registers: + +lfd 14, -84(1) +lfd 15, -92(1) +lfd 16, -100(1) +lfd 17, -108(1) +lfd 18, -116(1) +lfd 19, -124(1) +lfd 20, -132(1) +lfd 21, -140(1) +lfd 22, -148(1) +lfd 23, -156(1) +lfd 24, -164(1) +lfd 25, -172(1) +lfd 26, -180(1) +lfd 27, -188(1) +lfd 28, -196(1) +lfd 29, -204(1) +lfd 30, -212(1) +lfd 31, -220(1) + +blr
Re: [perl #32514] Cannot Build Parrot on Linux PPC (nonvolatile registers)
Ah, I've made Parrot build again on Linux PPC (and make testj only has the expected t/library/streams.t failure present with make test too). The attached file works as the eventual src/platform_asm.s file, at least on my architecture. I'm not sure how to plug it in to the generated fileset cleanly, but that's a lot easier than trying to debug assembly code on a platform you don't have. Leo, what do you suggest to connect the dots here? -- c .macro RESTORE_NONVOLATILE_FLOATS lfdf14, -PPC_JIT_GP_REGISTER_SAVE_SPACE-1*8(r1) lfdf15, -PPC_JIT_GP_REGISTER_SAVE_SPACE-2*8(r1) lfdf16, -PPC_JIT_GP_REGISTER_SAVE_SPACE-3*8(r1) lfdf17, -PPC_JIT_GP_REGISTER_SAVE_SPACE-4*8(r1) lfdf18, -PPC_JIT_GP_REGISTER_SAVE_SPACE-5*8(r1) lfdf19, -PPC_JIT_GP_REGISTER_SAVE_SPACE-6*8(r1) lfdf20, -PPC_JIT_GP_REGISTER_SAVE_SPACE-7*8(r1) lfdf21, -PPC_JIT_GP_REGISTER_SAVE_SPACE-8*8(r1) lfdf22, -PPC_JIT_GP_REGISTER_SAVE_SPACE-9*8(r1) lfdf23, -PPC_JIT_GP_REGISTER_SAVE_SPACE-10*8(r1) lfdf24, -PPC_JIT_GP_REGISTER_SAVE_SPACE-11*8(r1) lfdf25, -PPC_JIT_GP_REGISTER_SAVE_SPACE-12*8(r1) lfdf26, -PPC_JIT_GP_REGISTER_SAVE_SPACE-13*8(r1) lfdf27, -PPC_JIT_GP_REGISTER_SAVE_SPACE-14*8(r1) lfdf28, -PPC_JIT_GP_REGISTER_SAVE_SPACE-15*8(r1) lfdf29, -PPC_JIT_GP_REGISTER_SAVE_SPACE-16*8(r1) lfdf30, -PPC_JIT_GP_REGISTER_SAVE_SPACE-17*8(r1) lfdf31, -PPC_JIT_GP_REGISTER_SAVE_SPACE-18*8(r1) .endm .text .align 12 .globl Parrot_ppc_jit_restore_nonvolatile_registers Parrot_ppc_jit_restore_nonvolatile_registers: lfd 14, -84(1) lfd 15, -92(1) lfd 16, -100(1) lfd 17, -108(1) lfd 18, -116(1) lfd 19, -124(1) lfd 20, -132(1) lfd 21, -140(1) lfd 22, -148(1) lfd 23, -156(1) lfd 24, -164(1) lfd 25, -172(1) lfd 26, -180(1) lfd 27, -188(1) lfd 28, -196(1) lfd 29, -204(1) lfd 30, -212(1) lfd 31, -220(1) blr
Re: [perl #32514] Cannot Build Parrot on Linux PPC (nonvolatile registers)
Chromatic [EMAIL PROTECTED] wrote: Ah, I've made Parrot build again on Linux PPC (and make testj only has the expected t/library/streams.t failure present with make test too). He he, great. The attached file works as the eventual src/platform_asm.s file, at least on my architecture. I'm not sure how to plug it in to the generated fileset cleanly, but that's a lot easier than trying to debug assembly code on a platform you don't have. Leo, what do you suggest to connect the dots here? Well, we need a more generic way to include such files. * platform_asm.s is just one file and depends on $platform. But we have as $jitarchname: ppc-darwin ppc-aix ppc-linux# AFAIK This file is common for all PPC JIT architectures. OTOH there is a config dispatch on $cpu in config/gen/cpu, but that is for C files. But as this asm.s is JIT-specific and needed for PPC it should be included by jit.pl. Where are the config hackers ;) leo
Re: [perl #32514] Cannot Build Parrot on Linux PPC (nonvolatile registers)
On Sun, 2004-11-21 at 11:21 +0100, Leopold Toetsch wrote: Chromatic [EMAIL PROTECTED] wrote: Apparently the AIX and Darwin JIT fixes have broken the Linux PPC build, which doesn't pick up the appropriate hints file. I tried a couple of ways to force it to do so to no avail. Someone who knows what he's doing will have to do it. jitosname=LINUX, jitcpuarch=ppc ^^^ The selection of the missing helper file should be done by jitcpuarch and not by IIRC platform. As it's a JIT only thingy, the proper place to include that file is in jit.pl. Alright, poking around blindly for an hour, I made the changes in the attached patch (not for applying) and came up with a different breakage: as -o src/platform_asm.o src/platform_asm.s src/platform_asm.s: Assembler messages: src/platform_asm.s:3: Error: Unrecognized opcode: `this' src/platform_asm.s:4: Error: Unrecognized opcode: `rather' src/platform_asm.s:5: Error: syntax error; found `i' but expected `,' src/platform_asm.s:5: Error: junk at end of line: `is not currently configurable in the Parrot makefiles' src/platform_asm.s:7: Error: unexpected end of file in macro definition make: *** [src/platform_asm.o] Error 1 Running 'gcc' or 'cc' on the file produces the same error, as you'd expect. -- c Index: config/auto/jit.pl === RCS file: /cvs/public/parrot/config/auto/jit.pl,v retrieving revision 1.34 diff -u -u -r1.34 jit.pl --- config/auto/jit.pl 20 Oct 2004 08:03:13 - 1.34 +++ config/auto/jit.pl 21 Nov 2004 23:52:02 - @@ -116,6 +116,12 @@ $execcapable = 0; } } + + if ($jitcpuarch eq 'ppc' $osname eq 'linux') + { + Configure::Data-set( platform_asm = 1 ); + } + $execcapable = $set_execcapable if defined $set_execcapable; if ($execcapable) { Configure::Data-set( Index: config/gen/platform.pl === RCS file: /cvs/public/parrot/config/gen/platform.pl,v retrieving revision 1.19 diff -u -u -r1.19 platform.pl --- config/gen/platform.pl 8 Oct 2004 09:45:01 - 1.19 +++ config/gen/platform.pl 21 Nov 2004 23:52:02 - @@ -26,6 +26,8 @@ my ($miniparrot, $verbose) = @_; my $platform=lc $^O; + $platform=ppc if $platform eq 'linux' + Configure::Data-get( 'jitcpuarch' ) eq 'ppc'; $platform=ansi if defined($miniparrot); $platform=win32 if $platform =~ /^msys/; $platform=win32 if $platform =~ /^mingw/;
[perl #32514] Cannot Build Parrot on Linux PPC (nonvolatile registers)
# New Ticket Created by chromatic # Please include the string: [perl #32514] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=32514 --- osname= linux osvers= 2.4.24-benh0 arch= powerpc-linux cc= gcc 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r3, propolice) --- Flags: category=core severity=critical ack=no --- Apparently the AIX and Darwin JIT fixes have broken the Linux PPC build, which doesn't pick up the appropriate hints file. I tried a couple of ways to force it to do so to no avail. Someone who knows what he's doing will have to do it. c++ -o parrot -L/usr/local/lib -Wl,-E -g imcc/main.o blib/lib/libparrot.a blib/lib/libicuuc.a blib/lib/libicudata.a -lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt -lgmp blib/lib/libparrot.a(jit_cpu.o)(.text+0x2722): In function `Parrot_end_jit': src/jit_cpu.c:74: undefined reference to `Parrot_ppc_jit_restore_nonvolatile_registers' blib/lib/libparrot.a(jit_cpu.o)(.text+0x2726):src/jit_cpu.c:74: undefined reference to `Parrot_ppc_jit_restore_nonvolatile_registers' blib/lib/libparrot.a(jit_cpu.o)(.text+0x274e):src/jit_cpu.c:74: undefined reference to `Parrot_ppc_jit_restore_nonvolatile_registers' blib/lib/libparrot.a(jit_cpu.o)(.text+0x2752):src/jit_cpu.c:74: undefined reference to `Parrot_ppc_jit_restore_nonvolatile_registers' blib/lib/libparrot.a(jit_cpu.o)(.text+0x2772):src/jit_cpu.c:74: undefined reference to `Parrot_ppc_jit_restore_nonvolatile_registers' blib/lib/libparrot.a(jit_cpu.o)(.text+0x2776):src/jit_cpu.c:74: more undefined references to `Parrot_ppc_jit_restore_nonvolatile_registers' follow collect2: ld returned 1 exit status make: *** [parrot] Error 1 --- Summary of my parrot 0.1.1 configuration: configdate='Fri Nov 19 13:50:03 2004' Platform: osname=linux, archname=powerpc-linux jitcapable=1, jitarchname=ppc-linux, jitosname=LINUX, jitcpuarch=ppc execcapable=1 perl=/usr/bin/perl Compiler: cc='gcc', ccflags='-DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', Linker and Libraries: ld='gcc', ldflags=' -L/usr/local/lib', cc_ldflags='', libs='-lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt -lgmp' Dynamic Linking: share_ext='.so', ld_share_flags='-shared -L/usr/local/lib -fPIC', load_ext='.so', ld_load_flags='-shared -L/usr/local/lib -fPIC' Types: iv=long, intvalsize=4, intsize=4, opcode_t=long, opcode_t_size=4, ptrsize=4, ptr_alignment=1 byteorder=4321, nv=double, numvalsize=8, doublesize=8 --- Environment: HOMELANGLANGUAGELC_ALLLD_LIBRARY_PATHLOGDIR PATHSHELL