![]() ![]() |
Jul 3 2010, 04:05 AM
Post
#1
|
|
|
Group: Members Posts: 70 Joined: 24-May 04 From: Germany Member No.: 3,406 |
Since gcc 2.95 is getting a bit old, and 4.5 has interesting new things like whole program link time optimization, I've though about building a gcc 4.5 cross-compiler to complement g++ 2.95 (which can't be replaced because of the ABI). The problem is, there doesn't seem to be much documentation about how to actually build a cross-compiler for the Zaurus (maybe there was more five years ago). Has anyone every tried this (probably not with 4.5, but maybe some older version)? Are there any docs on how to build any cross-compiler for the Sharp ROM, or have people always just used the premade packages?
|
|
|
|
Jul 6 2010, 12:17 PM
Post
#2
|
|
|
Group: Members Posts: 318 Joined: 25-February 04 From: UK Member No.: 2,025 |
I think the majority of people use the tool chains that are already available.
I am using the quantumstep chain (http://www.lucid-cake.net/osx_arm/index_en.html) because I am using a Mac. IIRC Andreas said that he had followed the instructions of http://frank.harvard.edu/~coldwell/toolchain/ There is also this: http://www.ailis.de/~k/archives/19-ARM-cro...ling-howto.html I think the main reason why people don't try to build a more up to date gcc is to do with setting up a two libc system. Another reason is that they are not interested in such old kernels when you can go for another distro, e.g. Debian or zubuntu and immediately switch to a 2.6 kernel. |
|
|
|
Jul 6 2010, 03:07 PM
Post
#3
|
|
|
Group: Members Posts: 70 Joined: 24-May 04 From: Germany Member No.: 3,406 |
I think the majority of people use the tool chains that are already available. Sure, that's easier. I vaguely remember people playing with gcc 3.x for the Sharp ROM years ago though, but I couldn't find any docs about this now.QUOTE I think the main reason why people don't try to build a more up to date gcc is to do with setting up a two libc system. Hm, does that mean if I get gcc 4.5 to work, I can't link g++ 2.95 and gcc 4.5 object files (either directly or as dynamic libraries)? That was really the main point of this, if I can use gcc 4.5 only for pure C programs (or maybe C++ programs that don't depend on anything already on the Sharp ROM), it's not worth the effort.QUOTE Another reason is that they are not interested in such old kernels when you can go for another distro, e.g. Debian or zubuntu and immediately switch to a 2.6 kernel. Yeah, but my main use for the Zaurus is still as a dictionary with Kanji handwriting recognition, so I'm stuck with the Sharp ROM.
|
|
|
|
Jul 6 2010, 11:38 PM
Post
#4
|
|
|
Group: Members Posts: 318 Joined: 25-February 04 From: UK Member No.: 2,025 |
Hm, does that mean if I get gcc 4.5 to work, I can't link g++ 2.95 and gcc 4.5 object files (either directly or as dynamic libraries)? I'm no expert but you can't mix files that use a different ABI, you need a libc for each ABI. QUOTE(cybersphinx) Yeah, but my main use for the Zaurus is still as a dictionary with Kanji handwriting recognition, so I'm stuck with the Sharp ROM. You can run zbedic on zubuntu and use scim with the tomoe module http://scim-imengine.sourceforge.jp/hiki.cgi?SCIMTomoe The engine used in Kanji Nirvana was a simple port from somewhere else, so you could even take that to write your own input method. |
|
|
|
Jul 7 2010, 09:50 AM
Post
#5
|
|
|
Group: Members Posts: 70 Joined: 24-May 04 From: Germany Member No.: 3,406 |
I'm no expert but you can't mix files that use a different ABI, you need a libc for each ABI. On a Debian etch system (the last one with gcc-2.95), I can link gcc 4.1 object files into g++ 2.95 C++ programs, so basically it should work. The question is, does that work for the Zaurus as well, and if yes, how do I get a compiler for it?QUOTE You can run zbedic on zubuntu and use scim with the tomoe module http://scim-imengine.sourceforge.jp/hiki.cgi?SCIMTomoe Last time I looked into alternatives (unfortunately, I only have one Zaurus that needs to work, so I'm not very inclined to experiment with reflashing it), those all were pretty basic, requiring kanji to be input one by one, with each stroke separately in the right order. While the Sharp ROM gives me a screen-wide area where I can write whole words, and as long as the stroke order is mostly correct, it recognizes almost everything.The engine used in Kanji Nirvana was a simple port from somewhere else, so you could even take that to write your own input method. |
|
|
|
Jul 8 2010, 01:52 AM
Post
#6
|
|
|
Group: Members Posts: 318 Joined: 25-February 04 From: UK Member No.: 2,025 |
Are you really sure you linked gcc 4.1 object files to 2.95 programs ? GCC changed the ABI around ~3.0. Maybe if you used a pure C interface and rentrant code, but C++ ??? I'm very sceptical.
While the Sharp ROM gives me a screen-wide area where I can write whole words, and as long as the stroke order is mostly correct, it recognizes almost everything. Is that a Sharp specific IM or is it available through Opie ? |
|
|
|
Jul 8 2010, 07:25 AM
Post
#7
|
|
|
Group: Members Posts: 70 Joined: 24-May 04 From: Germany Member No.: 3,406 |
Are you really sure you linked gcc 4.1 object files to 2.95 programs ? GCC changed the ABI around ~3.0. The C++ ABI, yes. But the C ABI has been the same for ages, afaik.QUOTE Maybe if you used a pure C interface and rentrant code, but C++ ??? I'm very sceptical. Well, I tried something likeCODE file1.c: int test(int i) { return i * i; } CODE file2.cpp: extern "C" { int test(int); } void main(void) { cout << " x " << test(3) << " y " << endl; } CODE gcc-4.1 -c file1.c which works as expected.g++-2.95 -c file2.cpp g++-2.95 -o test file1.o file2.o QUOTE Is that a Sharp specific IM or is it available through Opie ? It's one of the Sharp ROM's default Japanese input methods, only available in binary form. It might work on OPIE if that's compiled with g++ 2.95 (for the old ABI), but afaik all OPIE systems use newer toolchains.
|
|
|
|
Jul 8 2010, 12:38 PM
Post
#8
|
|
|
Group: Members Posts: 318 Joined: 25-February 04 From: UK Member No.: 2,025 |
|
|
|
|
Jul 10 2010, 08:07 AM
Post
#9
|
|
|
Group: Members Posts: 70 Joined: 24-May 04 From: Germany Member No.: 3,406 |
I'm sorry to be a sceptic still but how do you gain the benefit of link time optimisation if you are linking with the old 2.95 ? Heh, good question actually. From what I read, it works for dynamic libraries. I thought to do the same for static libraries, but that seems not possible. Anyway, that's not the only thing I hope gcc 4.5 is better with, it also should have a generally better optimizer, and support for the Xscale architecture.
|
|
|
|
Aug 21 2010, 12:20 PM
Post
#10
|
|
|
Group: Members Posts: 318 Joined: 25-February 04 From: UK Member No.: 2,025 |
It looks like someone has already done this with gcc 3.4... see http://prudentialscatterbrain.hp.infoseek.co.jp/
Binaries compiled with his gcc may need a static libgcc and libstdc++ which he supplies in ipks. (He says that the files in the first table are compiled with his gcc 3.4 but don't need the additional libraries, files in the second table do). HTH |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th May 2013 - 06:51 AM |