Christian Holm Christensen wrote: > Hi Thiemo, > > On Tue, 2007-11-06 at 18:56 +0000, Thiemo Seufer wrote: > > Christian Holm Christensen wrote: > > > Hi Thiemo, > > > > > > On Mon, 2007-11-05 at 00:48 +0000, Debian Bug Tracking System wrote: > > > > Processing commands for [EMAIL PROTECTED]: > > > > > > > > > tags 434855 +patch > > > > Bug#434855: root-system_5.15.07-4(experimental/mipsel/modi): Attempts > > > > at guessing your architecture failed. > > > > Tags were: experimental > > > > Tags added: patch > > > > > > > > > thanks > > > > > > Thank you for looking into this. However, I have, with the help of > > > Boris <[EMAIL PROTECTED]> ported ROOT to mips. The GSL stuff is also > > > fixed. The current sources at > > > > I notice that the regex in configure excludes now mipsel. > > I did that because I wasn't sure if it would work on mipsel straight out > of the box, since the endianess is important for I/O among other > things.
The places where endianness is visible would need some care, true. The compiler provides built-in macros for that purpose: __MIPSEL__ for little endian __MIPSEB__ for big endian I presume you already use a macro to select endianness, selecting it via the compiler builtins should be straightforward. > > The only > > difference between both is the endianness. For complete MIPS support > > it would need the following: > > > > mips O32 ABI, ILP32, "long long" in a "aligned" even-odd register > > mipsel pair, 4 argument registers > > > > mipsn32el N32 ABI, ILP32, but with 64 bit wide registers, and > > mipsn32 "long long" in a single register, 8 argument registers > > > > mips64el N64 ABI, LP64, 8 argument registers > > mips64 > > I'm not sure how to understand your table. Could you, along the lines > outlined at > > http://wiki.debian.org/DebianScienceROOT -> Porting Notes > > tell me what changes would be needed? Perhaps which already support > registers the 6 cases above would be similar to? > > I guess the O32/N32/N64 is the "word-size", but what is the "O" and > "N"? > > I don't know what you mean by ILP32/LP63. I also don't know how to deal > with "long long" in 1 or 2 registers. Sorry, I realize that was too terse. O32/N32/N64 are the names of the ABIs (Application Binary Interfaces) supported on Linux/MIPS. I attempted to add a short outline of its properties to each mention. ILP32 is a common abbreviation for an ABI with "32bit integer, 32bit long, 32bit pointer size", describing the most important C types. This is like classic Linux i386. The comparable MIPS ABI is O32. LP64 is a shorthand for "64bit long, 64bit pointer size". This is what most 64bit Unices use, one example is Linux AMD64. The comparable MIPS ABI is N64. The N32 ABI is a bit odd, it combines a 32bit address space with 64bit wide registers, but it still retains the classic (ILP32) data type lengths. I mentioned "long long" since that is the only data type which is subtly different between both ILP32 variants. Maybe this part isn't relevant for ROOT. > I guess the "argument registers" refers to variadic arguments, but > exactly what that would imply in the ROOT source code I don't know. On MIPS (and most other RISC-like architectures) the first few arguments to a function are passed via registers. From the powerpc code in cint I inferred this is an important property which the code needs to know about. > I've Cc'ed this mail to rootdev and cintdev for more input. > > > Note that the "el" is always the suffix. > > OK. That goes for the return from `uname'? Not quite. The uname is on a 32bit kernel "MIPS", and on a 64bit kernel "MIPS64", regardless of endianness. You may have noticed by now that I say "ABI" and try to avoid "Machine" or "CPU", since those are not necessarily identical things. 'uname' would return the wrong result if we want to build a 32bit program on a 64bit capable machine. In Debian the selection is handled via dpkg-architecture, which tells exactly what build type is asked for. For other Distributions the best practice is to combine uname output with a test for predefined compiler macros to figure out the default endianness, and hope the result is what was asked for. > > > deb-src http://mirror.phy.bnl.gov/debian-root unstable main contrib > > > > > > supports mips and hppa. For more details, see > > > > > > http://wiki.debian.org/DebianScienceROOT > > > > > > But thank you for looking into this. If you'd like to help, then if you > > > could try to build the packages, it would be great. > > > > Builds fine on mips/experimental. > > Great. Could you make the packages publicly available? If so, I'll > upload them to the above repository. Will soon show up at http://people.debian.org/~ths/root-system/mips/ Thiemo -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]