[Tack-devel] ACK compiles on NetBSD-macppc, sort of...
Moved to https://github.com/davidgiven/ack
Brought to you by:
dtrg
From: Gregory T. (t. K. <gt...@di...> - 2006-07-16 20:01:24
|
Hi All, Since ACK is BSD-licensed, seems like it'd be a good thing to have it= compile on a *BSD OS :-) I have downloaded the package and made a pass at= getting ack-5.6 to compile on NetBSD 3.99.3 running on a PowerPC (macppc). = With only a couple changes to the first/get_* files, it does generate an= INSTALL file which appears to successfully execute. The first change is to first/get_sys: Index: first/get_sys =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/tack/Ack/first/get_sys,v retrieving revision 1.5 diff -r1.5 get_sys 83a84 > ppc32 32-bit PowerPC running *BSD=20 which just adds the ppc32 option to the list of systems. The second change= is to first/get_makepars to recognize that ppc32 system for word and= pointer sizes: Index: first/get_makepars =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/tack/Ack/first/get_makepars,v retrieving revision 1.9 diff -r1.9 get_makepars 3c3 < vax*|i386|sun*|sparc*|m68_sysV_0|m68020|mantra|pmds4|m68k4) --- > ppc32|vax*|i386|sun*|sparc*|m68_sysV_0|m68020|mantra|pmds4|m68k4) Minor stuff, and I found the process pretty easy so a tip of the hat to= David Given for the excellent effort. I used BSD4_2, em44 and libbsd4_2= for the Unix type, target machine, and system call library, respectively. After sh INSTALL > INSTALL.out ran for a while, everything seemed to= complete, although there are a lot of "FAILED" entries. There appear to be= executables, however: > ls bin/bin 6500 cp_dir lint-lib.unix prid 6800 do_deps m2 rm_deps 6805 do_resolve m2mm s2650 6809 em22 m68020 sparc LLgen em24 m68k2 sparc_solaris abc em44 m68k4 sun2 acc esize mantra sun3 ack f2c march tabgen ack_sys flex minix update_ceg apc grind minixST vax4 arm i386 mk_manpage xenix3 cc-and-mkdep.ack i80 ns yacc cc-and-mkdep.all i86 ocm z80 cc-and-mkdep.sun install_ceg pdp z8000 cclash lint pmds cid lint-lib.ack pmds4 > bin/bin/ack -m bin/bin/ack: -m needs machine name I've posted the INSTALL.out file at http://www.dialectronics.com/ack/INSTALL.out I have several questions, but a bit of background for context: I'm looking to get away from the GPL/GNU toolchain. I find it obtuse and= difficult to deal with wrt to optimizations. In particular, the PowerPC= code is not particularly good and stuff like Altivec is not really dealt= with in a decent manner. I'm also looking into alternative operating= systems, such as the Minix microkernel and Dawson Engler's exokernel= designs. These are leading me away from the standard toolchain. I have some experience with Forth, which is also a stack-based virtual= machine, through my efforts to port OpenBSD to Old World Macs (which= required learning a lot about Open Firmware). I also have some experience= with PowerPC hardware, enough to read and write assembly code. 1) RISC/PowerPC CPUs are anything but stack based. There are 32 general= purpose registers and typical 32 floating point registers as well as 32= SIMD registers. Everything is done in registers, even reading from and= writing to memory. EM/ACK seem focused on x86 type approaches, in the= sense of gearing towards stack-based operations. Is this going to present= additional obstacles to writing a back-end table for RISC/PowerPC? 2) Can the output from ACK be tweaked manually? In other words, if the= back-end table gets a close first pass, is it possible to go in and tweak= the final version? 3) Is the PowerPC port of Minix going to use ACK? 4) Is this a bootstrap situation, where the PowerPC back-end table needs to= be written before PowerPC Minix can occur? 5) Are there plans to extend the object file formats ACK/LLgen are capable= of producing? Would this be a good time to propose a PowerPC file format= alternative to a.out/xcoff? (My personal preference would be the Motorola= PEF format, as opposed to ELF.) I have more questions, but this should get the discussion rolling :-) thanks in advance, tim Gregory T. (tim) Kelly Owner Dialectronics.com P.O. Box 606 Newberry, SC 29108 "Anything war can do, peace can do better." -- Bishop Desmond Tutu |