GnuPoc

-SymbianOS SDK for MAC OSX

LINUX WIKI FORUM MAIL

What is all this about?

It is about running a SymbianOS SDK on a big endian mashine, especially Mac OSX.

This document is based on gnupoc_ppc.txt from Alfred E. Heggestad.
Page last updated Saturday, 22 January 2005

Making SymbianOS SDK run on Mac OSX ...

Generic Steps
1) zipping up a installed SymbianOS SDK (epoc32 directory) and unzipping it on mac mashine
2) fix file names, window CRs & include files (e.g with fixscr.pl)
3) build gcc, petran, makesis, bmconv & rcomp for mac osx (rcomp has still to be fixed)
4) install sdk2unix or gnupoc patch of the SymbianOS perl build scripts (still some porting to be done)
5) connectivity: use existing apple connectivity solution to transfer files
6) build helloworld SIS file and compare with the win32 binary :-)

(short term) tasks needed:
1) making rcomp pass regtest plus compile under gcc3
2) verifying gcc & produce working patch (at the moment there are only notes)
3) having a look at the gnupoc patch of the SymbianOS perl build scripts
4) having a look at the sdk2unix patch of the SymbianOS perl build scripts

(long term) tasks needed:
1) create 'working' installation script
2) create debian packages, that can be installed via 'fink install' onto a mac
3) Using of Simon Woodside's SDK unpacker on QEMU (Darwine)
4) porting more connectivity programs: p3nfs, QConsole (nearly there),  
   gnubox (on mac osx side) http://www.symbianos.org/yabbse/index.php?board=2;action=display;threadid=7

Download

tools
The long term goal would be to build debian packages, which could be installed easily via 'fink install'.
At the moment the source code of the tools (from below) had to be downloaded and build for the host. 
e.g. for bmconv:
    andres-Computer:~/sos andre$ cd bmconv-1.1.0-2
    andres-Computer:~/sos/bmconv-1.1.0-2 andre$ make
    andres-Computer:~/sos/bmconv-1.1.0-2 andre$ sudo make regtest
    andres-Computer:~/sos/bmconv-1.1.0-2 andre$ sudo make install
    andres-Computer:~/sos/bmconv-1.1.0-2 andre$ make tarball

tool     regtest  gcc
---------------------
makesis  yes      3
bmconv   yes      3
petran   yes      3
rcomp    fails    2

Big Thanks to Kita B. Ndara for porting makesis and petran to big endian !!! (kitandara at yahoo dot co dot uk)
rcomp still fails the regtest. More work needs to be done here.

    makesis for mac osx version 2.0.0 (16. Jan 2005) notes makesis
    bmconv  for mac osx version 1.1.0 (16. Jan 2005) notes bmconv
    petran  for mac osx version 1.0.0 (16. Jan 2005) notes petran
    rcomp   for mac osx version 7.0.1 (16. Jan 2005) notes rcomp


gcc
The gcc cross compiler needs to be patched for big endian mashines and the mac osx target

gcc-539-2aeh-source - Satus: works - Notes: needs patch instead of installation notes
    notes for patching gcc 539 to big endian on mac osx host

gcc-3.0-psion-98r2-9-src - Status: works - Notes: needs patch instead of installation notes
    notes for installing gcc-3.0-psion-98r2-9-src on mac osx host

gcc 3.4.3 - Status: configure works - make fails: arm-epoc-pe-ar command not found
    notes for installing gcc 3.4.3 on mac osx host
        

Here are some rough notes ...

The notes are very rough and should be on webdav for everyone to edit, but just for a start ...
1) unpacking the SDK
- either: running wine (qemu) and win32 uninstaller (see Simon's notes at gnupoc mailing list:)
??http://sourceforge.net/mailarchive/message.php?msg_id=10448263
- or: unpacking on win32, then zipping & transferring to mac
- optional: getting sponsor for ftp space and bandwidth for zipped sdk
2) fixing source (lower casing file names and include files, and win32 to unix CR)
fixsrc.pl: http://cvs.sourceforge.net/viewcvs.py/gnupoc/s60cpp/epoc32/fixsrc.pl?rev=1.1.1.1&view=markup
3) compiling the tools for mac osx (gcc, petran, ....)
well, the compiled toolchain should be very close then
4) install sdk2unix (existing)
Should work for UIQ SDK's and for S60 SDK's < v2.1
Simon mentioned (above link) that there was a big restructuring for the S60 v2.1+ SDK's, which needs adaptations in the perl build patches.
To get an idea what is involved, here is as example a gnupoc patch:
http://cvs.sourceforge.net/viewcvs.py/gnupoc/s60cpp/epoc32/gnupoc.s60cpp.patch?rev=1.1.1.1&view=markup
5) connectivity: use existing apple connectivity solution to transfer files


For Merging
1) howto produce a patch (problem with dependency, i.e. Simon has different environment
    prerequisite (try one of the following):
      o mac osx 10.3.7 plus latest mac gcc patch
      o follow the notes here on the web site
      o apply the patch provided
      o having some kind of scripts
2) howto produce a binary installer (open questions):
    o configure script needed
    o just zipping up the binaries
    o making a apple mac packaging module
    o putting it into opendarwin/fink
    o where to put it on the ftp site
        
    [andres-Computer:~/sos/diff/gcc539] andre% cp -r src src-orig
    [andres-Computer:~/sos/diff/gcc539] andre% diff -ruN --exclude config.cache --exclude config.status --exclude Makefile --exclude \*.o --exclude config.h --exclude config.log src-orig src | tee diff539
    

rcomp notes

The work seems to be limited to the file numval.cpp
There the ConvertToDouble and ConvertTNatural have to be ported to big endian
Only done for the double function so far ...

numval.cpp:
void NumericValue::ConvertToDouble( const String & Source)
	{
	assert( iNumericValueType == L_DOUBLE);
	assert( Source.Length() > 0);
	
	double d = atof( Source.GetBuffer());
	if ( d == 0.0 && !( Source == "0.0" || Source == "0") )
		{ MOFF; cerr << "atof may have failed for " << Source << endl; MON;}

+	//@todo andreh
+	unsigned char tmp1[8], tmp2[8];
+	memcpy(tmp1, (unsigned char *) &d, 8);
+	int up = 0; int down = 7;
+	while(down >=0)
+	   tmp2[up++] = tmp1[down--];
+	memcpy((unsigned char *) &d,tmp2, 8);

	iDoubleValue = d;
	}
 
void NumericValue::ConvertToNatural( const String & Source)
	{
    ...
    ... still to be ported to big endian
    ...
    
tsrc directory listing 
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ ls -ls
total 144
8 -rw-r--r--  1 andre  staff    94 22 Dec 13:07 Makefile
8 -rw-r--r--  1 andre  staff   415 22 Dec 13:07 error1.rh
8 -rw-r--r--  1 andre  staff  3130 22 Dec 13:07 error1.rss
8 -rw-r--r--  1 andre  staff  1994 22 Dec 13:07 test.cmd
8 -rw-r--r--  1 andre  staff  2243 22 Dec 13:07 test.htm
8 -rwxrwxrwx  1 andre  staff  1902 22 Dec 13:07 test.sh
8 -rw-r--r--  1 root   staff   108 17 Jan 08:18 test1.lis
8 -rw-r--r--  1 andre  staff   344 22 Dec 13:07 test2.dat
8 -rw-r--r--  1 andre  staff  3797 22 Dec 13:07 tutext.rss
8 -rw-r--r--  1 andre  staff  1098 22 Dec 13:07 tutext0.rsg
8 -rw-r--r--  1 root   staff  1098 17 Jan 08:18 tutext0.rsg.new
8 -rw-r--r--  1 andre  staff   579 22 Dec 13:07 tutext16.rsc
8 -rw-r--r--  1 root   staff   579 17 Jan 08:18 tutext16.rsc.new
8 -rw-r--r--  1 andre  staff   944 22 Dec 13:07 twtext.rss
8 -rw-r--r--  1 andre  staff   122 22 Dec 13:07 twtext0.rsg
8 -rw-r--r--  1 root   staff   122 17 Jan 08:18 twtext0.rsg.new
8 -rw-r--r--  1 andre  staff    68 22 Dec 13:07 twtext16.rsc
8 -rw-r--r--  1 root   staff    68 17 Jan 08:18 twtext16.rsc.new
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ 

diff of twtext0.rsg - fails 
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ diff twtext0.rsg twtext0.rsg.new 
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ 
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ cat twtext0.rsg
#define WIDE_STRING                               0x6455c001
#define LONG_STRING                               0x6455c002
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ 

diff of twtext16.rsc - fails 
andres-Computer:~/sos/rcomp-7.0.1 andre$ sudo make regtest
andres-Computer:~/sos/rcomp-7.0.1 andre$ cd tsrc 

andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ hexdump twtext16.rsc
0000000 6b4a 1f10 0000 0000 5c45 0600 0dd6 711a
0000010 0146 0001 2768 6572 6520 6172 6520 736f
0000020 6d65 2077 6964 6520 6368 6172 6163 7465
0000030 7273 3a0e 20ac 0e07 ed2e 2e2e ac20 1400
0000040 3c00 3e00                              
0000044
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ hexdump twtext16.rsc.new
0000000 6b4a 1f10 0000 0000 5c45 0600 0dd6 711a
0000010 0146 0001 2768 6572 6520 6172 6520 736f
0000020 6d65 2077 6964 6520 6368 6172 6163 7465
0000030 7273 3a0e 20ac 0e07 ed2e 2e2e 20ac 1400
0000040 3c00 3e00                              
0000044
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ diff twtext16.rsc twtext16.rsc.new 
Binary files twtext16.rsc and twtext16.rsc.new differ
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ 


diff of tutext0.rsg - OK!
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ diff tutext0.rsg tutext0.rsg.new 
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ 
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ cat tutext0.rsg
#define LIST_1                                    0x63faa001
#define BEGIN_EXCEPT                              0x63faa002
#define END_EXCEPT                                0x63faa003
#define SPECIAL_STRING                            0x63faa004
#define UNBROKEN_STRING                           0x63faa005
#define BROKEN_STRING                             0x63faa006
#define SYS_SPECIAL_CHARACTERS                    0x63faa007
#define SYS_STRING                                0x63faa008
#define SYS_DIMMED_MSG                            0x63faa009
#define SYS_LOCKED_MSG                            0x63faa00a
#define SYS_BUSY                                  0x63faa00b
#define SYS_SCANNING                              0x63faa00c
#define SYS_PRINTING_TO                           0x63faa00d
#define SYS_PAGE_IS                               0x63faa00e
#define SYS_ARRAY_ONE                             0x63faa00f
#define SYS_BUTTON_ONE                            0x63faa010
#define SYS_FLPTED_ONE                            0x63faa011
#define SYS_MENUBAR_ONE                           0x63faa012
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ 

diff of tutext16.rsc - fails
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ diff tutext16.rsc tutext16.rsc.new 
Binary files tutext16.rsc and tutext16.rsc.new differ
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ 
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ hexdump tutext16.rsc 
0000000 6b4a 1f10 0000 0000 aa3f 0600 6a6f e3fd
0000010 017a 00ff ff02 0007 0500 1e00 0200 0606
0000020 6974 656d 2031 0106 0669 7465 6d20 3238
0000030 7469 6c64 6520 2d7e 2d20 4445 4c45 5445
0000040 202d 7f2d 2045 7572 6f20 7369 676e 202d
0000050 0e20 ac2d 204e 4f54 2055 5345 4420 2831
0000060 2920 2d0e fffe 2d2e 3359 2077 6974 6820
0000070 6469 6165 7265 7369 7320 2d0e 0178 2d20
0000080 4e42 5350 202d a02d 2049 6e76 6572 7465
0000090 6420 6578 636c 6d20 2da1 2d2e 2174 6869
00000a0 7320 2d0e 2026 2d20 6973 2068 6f72 697a
00000b0 6f6e 7461 6c20 656c 6c69 7073 6973 1766
00000c0 6972 7374 2070 6172 742c 2073 6563 6f6e
00000d0 6420 7061 7274 1e66 6972 7374 2070 6172
00000e0 742c 2a40 0e20 ac01 1f20 7365 636f 6e64
00000f0 2070 6172 740e 2b2d 2a2f 3c2c 3e2e 011f
0000100 4e53 5745 0225 731a 5468 6973 2069 7465
0000110 6d20 6973 206e 6f74 2061 7661 696c 6162
0000120 6c65 1b54 6869 7320 6974 656d 2063 616e
0000130 6e6f 7420 6265 2063 6861 6e67 6564 0442
0000140 7573 7908 5363 616e 6e69 6e67 0e50 7269
0000150 6e74 696e 6720 746f 2025 7309 2870 6167
0000160 6520 2575 2900 0305 0003 0345 7363 0105
0000170 0545 6e74 6572 0103 0354 6162 0103 0344
0000180 656c 0105 0553 7061 6365 0005 0300 0500
0000190 0404 5465 7874 0200 1212 4269 746d 6170
00001a0 2070 6c61 6365 686f 6c64 6572 1200 0000
00001b0 0000 0000 0000 e550 2a0e dc1a b254 000f
00001c0 0800 0100 0000 01ab 6100 0200 0000 0202
00001d0 6162 0503 0000 0003 0361 6263 0504 0000
00001e0 0004 0461 6263 6405 0500 0000 0505 6162
00001f0 6364 6505 0600 0000 0606 6162 6364 6566
0000200 0507 0000 0007 0761 6263 6465 6667 0508
0000210 0000 0008 0861 6263 6465 6667 6816 002f
0000220 0068 009c 00be 00d6 00f5 0004 0107 0122
0000230 013e 0143 014c 015b 0165 018a 01ac 01be
0000240 011d 0200                              
0000243
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ 
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ hexdump tutext16.rsc.new
0000000 6b4a 1f10 0000 0000 aa3f 0600 6a6f e3fd
0000010 017a 00ff ff02 0007 0500 1e00 0200 0606
0000020 6974 656d 2031 0106 0669 7465 6d20 3238
0000030 7469 6c64 6520 2d7e 2d20 4445 4c45 5445
0000040 202d 7f2d 2045 7572 6f20 7369 676e 202d
0000050 0e20 ac2d 204e 4f54 2055 5345 4420 2831
0000060 2920 2d0e fffe 2d2e 3359 2077 6974 6820
0000070 6469 6165 7265 7369 7320 2d0e 0178 2d20
0000080 4e42 5350 202d a02d 2049 6e76 6572 7465
0000090 6420 6578 636c 6d20 2da1 2d2e 2174 6869
00000a0 7320 2d0e 2026 2d20 6973 2068 6f72 697a
00000b0 6f6e 7461 6c20 656c 6c69 7073 6973 1766
00000c0 6972 7374 2070 6172 742c 2073 6563 6f6e
00000d0 6420 7061 7274 1e66 6972 7374 2070 6172
00000e0 742c 2a40 0e20 ac01 1f20 7365 636f 6e64
00000f0 2070 6172 740e 2b2d 2a2f 3c2c 3e2e 011f
0000100 4e53 5745 0225 731a 5468 6973 2069 7465
0000110 6d20 6973 206e 6f74 2061 7661 696c 6162
0000120 6c65 1b54 6869 7320 6974 656d 2063 616e
0000130 6e6f 7420 6265 2063 6861 6e67 6564 0442
0000140 7573 7908 5363 616e 6e69 6e67 0e50 7269
0000150 6e74 696e 6720 746f 2025 7309 2870 6167
0000160 6520 2575 2900 0305 0003 0345 7363 0105
0000170 0545 6e74 6572 0103 0354 6162 0103 0344
0000180 656c 0105 0553 7061 6365 0005 0300 0500
0000190 0404 5465 7874 0200 1212 4269 746d 6170
00001a0 2070 6c61 6365 686f 6c64 6572 1200 0000
00001b0 0000 0000 0000 54b2 1adc 0e2a 50e5 000f
00001c0 0800 0100 0000 01ab 0061 0200 0000 0202
00001d0 6162 0503 0000 0003 0361 6263 0504 0000
00001e0 0004 0461 6263 6405 0500 0000 0505 6162
00001f0 6364 6505 0600 0000 0606 6162 6364 6566
0000200 0507 0000 0007 0761 6263 6465 6667 0508
0000210 0000 0008 0861 6263 6465 6667 6816 002f
0000220 0068 009c 00be 00d6 00f5 0004 0107 0122
0000230 013e 0143 014c 015b 0165 018a 01ac 01be
0000240 011d 0200                              
0000243
andres-Computer:~/sos/rcomp-7.0.1/tsrc andre$ 

build notes
[andres-Computer:~/sos] andre% diff -ru rcomp-7.0.1/ ./diff/rcomp-7.0.1/
diff -ru rcomp-7.0.1/src/Makefile ./diff/rcomp-7.0.1/src/Makefile
--- rcomp-7.0.1/src/Makefile    Wed Dec 22 13:21:43 2004
+++ ./diff/rcomp-7.0.1/src/Makefile     Sun Jan 16 14:53:18 2005
@@ -2,11 +2,7 @@
 # Makefile
 #
 
-#
-# Modify this to suit your platform specific needs.
-#
-#GCC_VERSION=-2.95
-GCC_VERSION=2  # For Darwin use gcc 2.95.2 - gcc 3.1 is b0rken !
+GCC_VERSION=-2.95
 CFLAGS+=-Wall -gstabs+ -Wno-deprecated
 CFLAGS+=-I../inc -Iderived
 LFLAGS=

[andres-Computer:~/sos] andre% cd rcomp-7.0.1/
[andres-Computer:~/sos/rcomp-7.0.1] andre% sudo make regtest
Password:
make all -sC src
make regtest -sC tsrc
Running through each test...
Test 1 : Compare output with previous version

TUTEXT (16-bit)
Expect five problem messages about deprecated characters...


(109) : Warning: Deprecated non-unicode value in source stream
(110) : Warning: Deprecated non-unicode value in source stream
(114) : Warning: Deprecated non-unicode value in source stream
(122) : Warning: Deprecated non-unicode value in source stream
(129) : Warning: Deprecated non-unicode value in source stream
#
# TEST FAILED: tutext0.rsc
#

TWTEXT (16-bit only)...


#
# TEST FAILED: twtext0.rsc
#
Check the contents of test1.lis for successful comparisons...
A successful run yields a file of approximately 336 bytes in size.
Test 2 : Demonstrate behaviour with source errors
  testing 'STUPID'

(1) : *** Unknown character '#' (value 0x23) 
(1) : Syntax error
RCOMP failed with code 1
  testing 'ERROR_INVALID_MEMBER'

(1) : *** Unknown character '#' (value 0x23) 
(1) : Syntax error
RCOMP failed with code 1
  testing 'MAIN_SYNTAX_ERROR_1'

(1) : *** Unknown character '#' (value 0x23) 
(1) : Syntax error
RCOMP failed with code 1
  testing 'H_SYNTAX_ERROR_1'

(1) : *** Unknown character '#' (value 0x23) 
(1) : Syntax error
RCOMP failed with code 1
  testing 'ERROR_MISSING_STRUCT'

(1) : *** Unknown character '#' (value 0x23) 
(1) : Syntax error
RCOMP failed with code 1

See the documentation in test.htm for an explanation of the error messages
[andres-Computer:~/sos/rcomp-7.0.1] andre% 


==> using gcc 3.x -> seems to be broken

[andres-Computer:~/sos/rcomp-7.0.1] andre% make
make all -sC src
ld: Undefined symbols:
___builtin_delete
___builtin_vec_delete
___builtin_vec_new
___rtti_user
ostream::operator<<(char const *)
___rtti_si
___throw
terminate(void)
___builtin_new
ostream::operator<<(ostream &(*)(ostream &))
ostream::operator<<(long)
_cout
endl(ostream &)
ostream::operator<<(int)
_cerr
___ls__7ostreamPFR3ios_RB2
ostream::operator<<(unsigned long)
dec(ios &)
hex(ios &)
___pure_virtual
ofstream::~ofstream(void)
ofstream::ofstream(int)
fstreambase::close(void)
ostream::flush(void)
fstreambase::is_open(void) const
ofstream::open(char const *, int, int)
ostream::seekp(long long, ios::seek_dir)
ostream::tellp(void)
ostream::write(unsigned char const *, int)
___rtti_class
make[1]: *** [rcomp] Error 1
make: *** [all] Error 2
[andres-Computer:~/sos/rcomp-7.0.1] andre% 

bmconv notes

[andres-Computer:~/sos] andre% cd bmconv-1.1.0-2/
[andres-Computer:~/sos/bmconv-1.1.0-2] andre% sudo make regtest
Password:
make all -sC src
make clean -sC test
make regtest -sC test


BMCONV version 110.
Compiling...
Multiple bitmap store type: File store
Epoc file: test1.mbm

Bitmap file 1   : test1_48i.bmp
Bitmap file 2   : test1_48m.bmp
Bitmap file 3   : test1_32i.bmp
Bitmap file 4   : test1_32m.bmp
Bitmap file 5   : test1_24i.bmp
Bitmap file 6   : test1_24m.bmp
Bitmap file 7   : test1_16i.bmp
Bitmap file 8   : test1_16m.bmp
Success.


BMCONV version 110.
Compiling...
Multiple bitmap store type: File store
Epoc file: test1.mbm

Bitmap file 1   : test1_48i.bmp
Bitmap file 2   : test1_48m.bmp
Bitmap file 3   : test1_32i.bmp
Bitmap file 4   : test1_32m.bmp
Bitmap file 5   : test1_24i.bmp
Bitmap file 6   : test1_24m.bmp
Bitmap file 7   : test1_16i.bmp
Bitmap file 8   : test1_16m.bmp
Success.


BMCONV version 110.
Decompiling...
Epoc file: test1_ref.mbm

Bitmap file 1   : decomp_gen_48i.bmp
Bitmap file 2   : decomp_gen_48m.bmp
Bitmap file 3   : decomp_gen_32i.bmp
Bitmap file 4   : decomp_gen_32m.bmp
Bitmap file 5   : decomp_gen_24i.bmp
Bitmap file 6   : decomp_gen_24m.bmp
Bitmap file 7   : decomp_gen_16i.bmp
Bitmap file 8   : decomp_gen_16m.bmp
Success.
[andres-Computer:~/sos/bmconv-1.1.0-2] andre% 

makesis notes

[andres-Computer:~/sos/diff] andre% ls -ls
total 304
 24 -rw-r--r--   1 andre  staff   8859 16 Jan 14:07 h_endian.h
 16 -rw-r--r--   1 andre  staff   4175 16 Jan 14:07 instendian.h
  0 drwxr-xr-x  14 andre  staff    476 16 Jan 14:08 makesis-2.0.0
112 -rw-r--r--   1 andre  staff  56528 16 Jan 14:07 makesis.diff
 32 -rw-r--r--   1 andre  staff  12489 16 Jan 14:05 makesis.diff.tgz
  0 drwxr-xr-x  12 andre  staff    408 16 Jan 14:18 petran-1.1.0
 88 -rw-r--r--   1 andre  staff  44980 16 Jan 14:07 petran.diff
 32 -rw-r--r--   1 andre  staff  13757 16 Jan 14:05 petran.diff.tgz
[andres-Computer:~/sos/diff] andre% 

[andres-Computer:~/sos/diff] andre% patch -p0 -R < makesis.diff
patching file makesis-2.0.0/include/tchar.h
patching file makesis-2.0.0/src/Makefile
patching file makesis-2.0.0/src/crtsis.cpp
patching file makesis-2.0.0/src/makesis.cpp
patching file makesis-2.0.0/src/parsepkg.cpp
patching file makesis-2.0.0/src/utils.h
patching file makesis-2.0.0/src/wcstub.c
[andres-Computer:~/sos/diff] andre% 

[andres-Computer:~/sos/diff] andre% cp instendian.h makesis-2.0.0/include/.
[andres-Computer:~/sos/diff] andre% 

[andres-Computer:~/sos/diff] andre% cd makesis-2.0.0/
[andres-Computer:~/sos/diff/makesis-2.0.0] andre% make
make all -C src
g++ -Wall -gstabs+ -I../include -c crtsis.cpp -o crtsis.o
g++ -Wall -gstabs+ -I../include -c makesis.cpp -o makesis.o
g++ -Wall -gstabs+ -I../include -c parsecmd.cpp -o parsecmd.o
g++ -Wall -gstabs+ -I../include -c parsepkg.cpp -o parsepkg.o
g++ -Wall -gstabs+ -I../include -c utf8.cpp -o utf8.o
g++ -Wall -gstabs+ -I../include -c utils.cpp -o utils.o
g++ -Wall -gstabs+ -I../include -c stub.cpp -o stub.o
gcc -Wall -gstabs+ -I../include -c wcstub.c -o wcstub.o
g++  crtsis.o makesis.o parsecmd.o parsepkg.o utf8.o utils.o stub.o wcstub.o -o makesis -lz
[andres-Computer:~/sos/diff/makesis-2.0.0] andre% 
[andres-Computer:~/sos/diff/makesis-2.0.0] andre% 
[andres-Computer:~/sos/diff/makesis-2.0.0] andre% 
[andres-Computer:~/sos/diff/makesis-2.0.0] andre% sudo make regtest
Password:
make all -sC src
make regtest -sC test
Processing test.pkg...
Created test.sis
Processing test2.pkg...
Created test2.sis
383d24fd236b5f4416a4d881e6e8a2c4  test.sis
f80ef0c48ee15c63535dbc4d7dd83750  test2.sis
f80ef0c48ee15c63535dbc4d7dd83750  test2_n9210cpp.SIS
f80ef0c48ee15c63535dbc4d7dd83750  test2_p800cpp.SIS
f80ef0c48ee15c63535dbc4d7dd83750  test2_s60cpp.SIS
383d24fd236b5f4416a4d881e6e8a2c4  test_n9210cpp.SIS
383d24fd236b5f4416a4d881e6e8a2c4  test_p800cpp.SIS
383d24fd236b5f4416a4d881e6e8a2c4  test_s60cpp.SIS
[andres-Computer:~/sos/diff/makesis-2.0.0] andre% 

petran notes

[andres-Computer:~/sos/diff] andre% ls -ls
total 304
 24 -rw-r--r--   1 andre  staff   8859 16 Jan 14:07 h_endian.h
 16 -rw-r--r--   1 andre  staff   4175 16 Jan 14:07 instendian.h
  0 drwxr-xr-x  14 andre  staff    476 16 Jan 14:08 makesis-2.0.0
112 -rw-r--r--   1 andre  staff  56528 16 Jan 14:07 makesis.diff
 32 -rw-r--r--   1 andre  staff  12489 16 Jan 14:05 makesis.diff.tgz
  0 drwxr-xr-x  12 andre  staff    408 16 Jan 14:18 petran-1.1.0
 88 -rw-r--r--   1 andre  staff  44980 16 Jan 14:07 petran.diff
 32 -rw-r--r--   1 andre  staff  13757 16 Jan 14:05 petran.diff.tgz
[andres-Computer:~/sos/diff] andre% 

[andres-Computer:~/sos/diff] andre% patch -p0 < petran.diff
patching file petran-1.1.0/Makefile
patching file petran-1.1.0/e32uid/Makefile
patching file petran-1.1.0/e32uid/e32uid.cpp
patching file petran-1.1.0/host/h_mem.cpp
patching file petran-1.1.0/host/h_utl.cpp
patching file petran-1.1.0/inc/h_utl.h
patching file petran-1.1.0/pefile/pe_dump.cpp
patching file petran-1.1.0/pefile/pe_file.cpp
patching file petran-1.1.0/pefile/pe_img.cpp
patching file petran-1.1.0/pefile/pe_imp.cpp
patching file petran-1.1.0/pefile/pe_io.cpp
patching file petran-1.1.0/pefile/pe_reloc.cpp
patching file petran-1.1.0/pefile/pe_tran.cpp
patching file petran-1.1.0/petran/Makefile
patching file petran-1.1.0/petran/petran.cpp
patching file petran-1.1.0/test/Makefile
[andres-Computer:~/sos/diff] andre% cd petran-1.1.0/
[andres-Computer:~/sos/diff/petran-1.1.0] andre% ls
License.txt     README          e32uid          inc             petran
Makefile        debian          host            pefile          test
[andres-Computer:~/sos/diff/petran-1.1.0] andre% cat Makefile 
#
# Makefile
#
VERSION=1.0.0
PROJECT=petran

all clean install uninstall:
        make $@ -C petran
        make $@ -C e32uid

tarball: clean
        debclean
        cd .. && tar -czvf $(PROJECT)-$(VERSION).tar.gz $(PROJECT)-$(VERSION) --exclude .svn

regtest:
        make all -C petran
        make regtest -C test
[andres-Computer:~/sos/diff/petran-1.1.0] andre% make
make all -C petran
g++ -Wall -gstabs+ -Wno-deprecated -I../inc -c petran.cpp -o petran.o
g++ -Wall -gstabs+ -Wno-deprecated -I../inc -c ../e32uid/e32uid.cpp -o ../e32uid/e32uid.o
../e32uid/e32uid.cpp:13:22: h_endian.h: No such file or directory
../e32uid/e32uid.cpp: In member function `UINT TCheckedUid::Check() const':
../e32uid/e32uid.cpp:237: error: `flipi' undeclared (first use this function)
../e32uid/e32uid.cpp:237: error: (Each undeclared identifier is reported only 
   once for each function it appears in.)
make[1]: *** [../e32uid/e32uid.o] Error 1
make: *** [all] Error 2
[andres-Computer:~/sos/diff/petran-1.1.0] andre% cd inc/
[andres-Computer:diff/petran-1.1.0/inc] andre% ls
e32def.h        e32rom.h        e32uid.h        h_ver.h         pe_file.h
e32image.h      e32std.h        h_utl.h         pe_defs.h
[andres-Computer:diff/petran-1.1.0/inc] andre% cp ../../h_endian.h .
[andres-Computer:diff/petran-1.1.0/inc] andre% cd ..
[andres-Computer:~/sos/diff/petran-1.1.0] andre% cd ..
[andres-Computer:~/sos/diff] andre% make
make: *** No targets specified and no makefile found.  Stop.
[andres-Computer:~/sos/diff] andre% cd petran
tcsh: petran: No such file or directory.
[andres-Computer:~/sos/diff] andre% cd petran-1.1.0/
[andres-Computer:~/sos/diff/petran-1.1.0] andre% make
make all -C petran
g++ -Wall -gstabs+ -Wno-deprecated -I../inc -c ../e32uid/e32uid.cpp -o ../e32uid/e32uid.o
g++ -Wall -gstabs+ -Wno-deprecated -I../inc -c ../host/h_utl.cpp -o ../host/h_utl.o
g++ -Wall -gstabs+ -Wno-deprecated -I../inc -c ../host/h_file.cpp -o ../host/h_file.o
g++ -Wall -gstabs+ -Wno-deprecated -I../inc -c ../host/h_mem.cpp -o ../host/h_mem.o
g++ -Wall -gstabs+ -Wno-deprecated -I../inc -c ../pefile/pe_img.cpp -o ../pefile/pe_img.o
../pefile/pe_img.cpp: In member function `TUint E32ImageFile::CheckSumCode()':
../pefile/pe_img.cpp:130: warning: comparison between signed and unsigned 
   integer expressions
../pefile/pe_img.cpp:132: warning: comparison between signed and unsigned 
   integer expressions
../pefile/pe_img.cpp: In member function `TUint E32ImageFile::CheckSumData()':
../pefile/pe_img.cpp:147: warning: comparison between signed and unsigned 
   integer expressions
../pefile/pe_img.cpp:149: warning: comparison between signed and unsigned 
   integer expressions
g++ -Wall -gstabs+ -Wno-deprecated -I../inc -c ../pefile/pe_imp.cpp -o ../pefile/pe_imp.o
g++ -Wall -gstabs+ -Wno-deprecated -I../inc -c ../pefile/pe_dump.cpp -o ../pefile/pe_dump.o
g++ -Wall -gstabs+ -Wno-deprecated -I../inc -c ../pefile/pe_utl.cpp -o ../pefile/pe_utl.o
g++ -Wall -gstabs+ -Wno-deprecated -I../inc -c ../pefile/pe_io.cpp -o ../pefile/pe_io.o
g++ -Wall -gstabs+ -Wno-deprecated -I../inc -c ../pefile/pe_tran.cpp -o ../pefile/pe_tran.o
g++ -Wall -gstabs+ -Wno-deprecated -I../inc -c ../pefile/pe_reloc.cpp -o ../pefile/pe_reloc.o
../pefile/pe_reloc.cpp: In function `TInt sizeOfCodeRelocs(TUint*, TUint*, int)
   ':
../pefile/pe_reloc.cpp:21: warning: comparison between signed and unsigned 
   integer expressions
../pefile/pe_reloc.cpp:21: warning: comparison between signed and unsigned 
   integer expressions
../pefile/pe_reloc.cpp:21: warning: comparison between signed and unsigned 
   integer expressions
../pefile/pe_reloc.cpp: In function `TInt sizeOfDataRelocs(TUint*, TUint*, int)
   ':
../pefile/pe_reloc.cpp:47: warning: comparison between signed and unsigned 
   integer expressions
../pefile/pe_reloc.cpp: In member function `char* 
   E32ImageFile::CreateCodeRelocs(TUint*, TUint*, int, TInt&)':
../pefile/pe_reloc.cpp:112: warning: comparison between signed and unsigned 
   integer expressions
../pefile/pe_reloc.cpp:112: warning: comparison between signed and unsigned 
   integer expressions
../pefile/pe_reloc.cpp:112: warning: comparison between signed and unsigned 
   integer expressions
../pefile/pe_reloc.cpp: In member function `char* 
   E32ImageFile::CreateDataRelocs(TUint*, TUint*, int, TInt&)':
../pefile/pe_reloc.cpp:172: warning: comparison between signed and unsigned 
   integer expressions
g++ -Wall -gstabs+ -Wno-deprecated -I../inc -c ../pefile/pe_file.cpp -o ../pefile/pe_file.o
g++  petran.o ../e32uid/e32uid.o ../host/h_utl.o ../host/h_file.o ../host/h_mem.o ../pefile/pe_img.o ../pefile/pe_imp.o ../pefile/pe_dump.o ../pefile/pe_utl.o ../pefile/pe_io.o ../pefile/pe_tran.o ../pefile/pe_reloc.o ../pefile/pe_file.o -o petran 
make all -C e32uid
g++ -Wall -gstabs+ -I../inc -c uidcrc.cpp -o uidcrc.o
g++  e32uid.o uidcrc.o -o uidcrc 
[andres-Computer:~/sos/diff/petran-1.1.0] andre% sudo make regtest
Password:
make all -C petran
make[1]: Nothing to be done for `all'.
make regtest -C test
rm -f esidplay.exe snus.exe
esidplay.exe: run petran, remove timestamp and compare
../petran/petran esidplay.exe.pe esidplay.exe \
-nocall -uid1 0x1000007a -uid2 0x00000000 -uid3 0x00000000 1>/dev/null
rm -f a b
dd if=esidplay.exe of=a bs=16 count=2 2>/dev/null
dd if=esidplay.exe of=b bs=16 skip=3 2>/dev/null
cat a b > esidplay.exe.nots
rm -f a b
dd if=esidplay.exe.ref of=a bs=16 count=2 2>/dev/null
dd if=esidplay.exe.ref of=b bs=16 skip=3 2>/dev/null
cat a b > esidplay.exe.ref.nots
rm -f a b
diff esidplay.exe.nots esidplay.exe.ref.nots &>/dev/null
rm -f esidplay.exe.nots esidplay.exe.ref.nots
snus.exe: run petran, remove timestamp and compare
../petran/petran snus.exe.pe snus.exe \
-nocall -uid1 0x1000007a -uid2 0x00000000 -uid3 0x00000000 1>/dev/null
rm -f a b
dd if=snus.exe of=a bs=16 count=2 2>/dev/null
dd if=snus.exe of=b bs=16 skip=3 2>/dev/null
cat a b > snus.exe.nots
rm -f a b
dd if=snus.exe.ref of=a bs=16 count=2 2>/dev/null
dd if=snus.exe.ref of=b bs=16 skip=3 2>/dev/null
cat a b > snus.exe.ref.nots
rm -f a b
diff snus.exe.nots snus.exe.ref.nots &>/dev/null
rm -f snus.exe.nots snus.exe.ref.nots
all OK
[andres-Computer:~/sos/diff/petran-1.1.0] andre% 


links

Here you can download the tools from Symbian

blueproxy - more bluetooth for mac osx
http://anil.recoil.org/projects/blueproxy.html

darwine & qemu
http://darwine.opendarwin.org/

gnubox original howto
http://symbianos.org/~malm/SymbianLinuxHowTo.html

linux and p800
http://www.kevinboone.com/p800_linux.html

installation on mac osx
http://www.cs.helsinki.fi/u/mraento/symbian/bt-ap.html
http://www.slamslash.com/nokia6600/
http://www.hfg-karlsruhe.de/~mbrand/nokia6600/media/Bluetooth%20Internet%20Sharing%20Scripts.dmg.tar
http://www.macosxhints.com/article.php?story=20031117142051675&mode=print
http://www.macosxhints.com/article.php?story=20031117142051675#comments
http://forums.macosxhints.com/showthread.php?t=30635

http://sourceforge.net/docman/display_doc.php?docid=7738&group_id=39827
http://gnupoc.sourceforge.net/HOWTO/
http://cvs.sourceforge.net/viewcvs.py/gnupoc/Docs/gnupoc_ppc.txt

notes for installing gcc-3.0-psion-98r2-9-src on mac osx host

gcc improvement project by uni of Szeged
download page
gcc-3.0-psion-98r2-9-src.tar.gz

[andres-Computer:~/sos/src/gcc-3.0] andre% tar -zxvf gcc-3.0-psion-98r2-9-src.tar.gz
[andres-Computer:~/sos/src/gcc-3.0] andre% mkdir _parallel
[andres-Computer:~/sos/src/gcc-3.0] andre% cd _parallel
[andres-Computer:~/sos/src/gcc-3.0] andre% ../src/configure --prefix=/usr/local/er7 --exec-prefix=/usr/local/er7 --target=arm-epoc-pe
[andres-Computer:~/sos/src/gcc-3.0] andre% make
[andres-Computer:~/sos/src/gcc-3.0] andre% sudo make install

installation times
processor 867MHz PowerPC G4
memory    640MB 
compiling gcc
started  8:58
finished 
plus download time
installing binaries

notes on the patch needed

checking for wctype in -lw... no
configure: error: *** Gdb does not support host powerpc-apple-darwin7.5.0
Configure in /Users/andre/sos/src/gcc-3.0/_parallel/gdb failed, exiting.
[andres-Computer:src/gcc-3.0/_parallel] andre% 

./src/gdb/configure.host
ase "${host}" in
...
+ powerpc-apple-darwin*)                gdb_host=macos ;;

gcc -g -O2 -I../../../../src/dejagnu/example/calc -I. -c ../../../../src/dejagnu/example/calc/calc.c
gcc  -g -O2 -o calc calc.o  
Making all in testsuite...
make[3]: Nothing to be done for `all'.
gcc -c  -DHAVE_CONFIG_H -I. -I../../src/diff -g -O2 -DNULL_DEVICE=\"/dev/null\" ../../src/diff/cmp.c
../../src/diff/cmp.c: In function `main':
../../src/diff/cmp.c:211: error: `O_BINARY' undeclared (first use in this function)
../../src/diff/cmp.c:211: error: (Each undeclared identifier is reported only once
../../src/diff/cmp.c:211: error: for each function it appears in.)
../../src/diff/cmp.c:211: warning: passing arg 1 of `setmode' makes pointer from integer without a cast
../../src/diff/cmp.c:211: error: too many arguments to function `setmode'
make[1]: *** [cmp.o] Error 1
make: *** [all-diff] Error 2

[andres-Computer:src/gcc-3.0/_parallel] andre% make

./diff/system.h
#if HAVE_FCNTL_H
#include 
+ #ifdef HAVE_SETMODE
+ #undef HAVE_SETMODE
+ #endif
+ #ifndef _O_BINARY
+ #define _O_BINARY 0
+ #endif
+ #ifndef O_BINARY
+ #define O_BINARY _O_BINARY
+ #endif
#else
#if HAVE_SYS_FILE_H
#include 
#endif
#endif

GDB problems

1) xm.h 
   ./gdb/xm.h
   
#define HOST_BYTE_ORDER BIG_ENDIAN  
#ifndef __unix
#define __unix
#endif

created myself but lots of warning now

rm -f libtix4.1.8.0.a
ar cr libtix4.1.8.0.a tixClass.o tixCmds.o tixCompat.o tixError.o tixGeometry.o tixInit.o tixItcl.o tixList.o tixMethod.o tixOption.o tixScroll.o tixSmpLs.o tixUtils.o tixWidget.o tixDItem.o tixDiITxt.o tixDiImg.o tixDiStyle.o tixDiText.o tixDiWin.o tixForm.o tixFormMisc.o tixImgCmp.o tixImgXpm.o tixMwm.o tixGrid.o tixGrData.o tixGrFmt.o tixGrRC.o tixGrSel.o tixGrSort.o tixGrUtl.o tixHList.o tixHLCol.o tixHLInd.o tixHLHdr.o tixInputO.o tixNBFrame.o tixTList.o tixUnixDraw.o tixUnixXpm.o tixUnixWm.o
ranlib libtix4.1.8.0.a
gcc -c -g -O2 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DUCHAR_SUPPORTED=1   -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1   -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DNO_VALUES_H=1 -DHAVE_UNISTD_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1  -I/Users/andre/sos/src/gcc-3.0/src/tcl/generic -I/Users/andre/sos/src/gcc-3.0/src/tcl/unix -I/Users/andre/sos/src/gcc-3.0/src/tk/generic -I/Users/andre/sos/src/gcc-3.0/src/tk/unix  -I/Users/andre/sos/src/gcc-3.0/src/tix/generic -I/Users/andre/sos/src/gcc-3.0/src/tix/unix -I/usr/X11R6/include  ../../../../src/tix/unix/tk8.0/tixAppInit.c
gcc  tixAppInit.o -L/Users/andre/sos/src/gcc-3.0/_parallel/tix/unix/tk8.0 -ltix4.1.8.0 -L/Users/andre/sos/src/gcc-3.0/_parallel/tk/unix -ltk8.0 -L/Users/andre/sos/src/gcc-3.0/_parallel/tcl/unix -ltcl8.0 -L/usr/X11R6/lib -lX11    \
         -o tixwish
echo 'char *version = "4.17-psion-98r2";' >version.c
echo 'char *host_name = "powerpc-apple-darwin7.5.0";' >> version.c
echo 'char *target_name = "arm-epoc-pe";' >> version.c
gcc -c -g -O2    -I. -I../../src/gdb -I../../src/gdb/config -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode -I../../src/gdb/../readline -I../bfd -I../../src/gdb/../bfd  -I../../src/gdb/../include -I../intl -I../../src/gdb/../intl -DGDBTK version.c
make[1]: *** No rule to make target `xm.h', needed by `blockframe.o'.  Stop.
make: *** [all-gdb] Error 2
[andres-Computer:src/gcc-3.0/_parallel] andre% 

[andres-Computer:src/gcc-3.0/_parallel] andre% make

gcc -c -g -O2    -I. -I../../src/gdb -I../../src/gdb/config -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode -I../../src/gdb/../readline -I../bfd -I../../src/gdb/../bfd  -I../../src/gdb/../include -I../intl -I../../src/gdb/../intl -DGDBTK ../../src/gdb/ax-gdb.c
In file included from ../../src/gdb/ax-gdb.c:22:
../../src/gdb/defs.h:954: warning: use of `long double' type; its size may change in a future release
../../src/gdb/defs.h:954: warning: (Long double usage is reported only once for each file.
../../src/gdb/defs.h:954: warning: To disable this warning, use -Wno-long-double.)
gcc -c -g -O2    -I. -I../../src/gdb -I../../src/gdb/config -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode -I../../src/gdb/../readline -I../bfd -I../../src/gdb/../bfd  -I../../src/gdb/../include -I../intl -I../../src/gdb/../intl -DGDBTK ../../src/gdb/remote-sim.c
In file included from ../../src/gdb/remote-sim.c:22:
../../src/gdb/defs.h:954: warning: use of `long double' type; its size may change in a future release
../../src/gdb/defs.h:954: warning: (Long double usage is reported only once for each file.
../../src/gdb/defs.h:954: warning: To disable this warning, use -Wno-long-double.)
gcc -c -g -O2    -I. -I../../src/gdb -I../../src/gdb/config -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode -I../../src/gdb/../readline -I../bfd -I../../src/gdb/../bfd  -I../../src/gdb/../include -I../intl -I../../src/gdb/../intl -DGDBTK ../../src/gdb/remote-rdi.c
In file included from ../../src/gdb/remote-rdi.c:21:
../../src/gdb/defs.h:954: warning: use of `long double' type; its size may change in a future release
../../src/gdb/defs.h:954: warning: (Long double usage is reported only once for each file.
../../src/gdb/defs.h:954: warning: To disable this warning, use -Wno-long-double.)
gcc -DPACKAGE=\"rdi-share\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_FILIO_H=1 -DTIME_WITH_SYS_TIME=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_SELECT=1 -DHAVE_SOCKET=1 -DHAVE_STRTOD=1 -DHAVE_STRTOUL=1 -DHAVE_MEMCPY=1 -DHAVE_MEMMOVE=1  -I. -I../../../src/gdb/rdi-share  -DRETRANS -DARM_RELEASE='"Berkeley Licence for Cygnus"'    -g -O2 -c ../../../src/gdb/rdi-share/ardi.c
In file included from ../../../src/gdb/rdi-share/ardi.c:34:
../../../src/gdb/rdi-share/hostchan.h:22:23: winsock.h: No such file or directory
make[2]: *** [ardi.o] Error 1
make[1]: *** [rdi-share/libangsd.a] Error 2
make: *** [all-gdb] Error 2

2) hostchan.h

[andres-Computer:src/gcc-3.0/_parallel] andre% vim ../src/gdb/rdi-share/hostchan.h

+ #ifndef __unix
+ #define __unix
+ #endif

[andres-Computer:src/gcc-3.0/_parallel] andre% make
gcc -DPACKAGE=\"rdi-share\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_FILIO_H=1 -DTIME_WITH_SYS_TIME=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_SELECT=1 -DHAVE_SOCKET=1 -DHAVE_STRTOD=1 -DHAVE_STRTOUL=1 -DHAVE_MEMCPY=1 -DHAVE_MEMMOVE=1  -I. -I../../../src/gdb/rdi-share  -DRETRANS -DARM_RELEASE='"Berkeley Licence for Cygnus"'    -g -O2 -c ../../../src/gdb/rdi-share/unixcomm.c
../../../src/gdb/rdi-share/unixcomm.c: In function `Unix_MatchValidSerialDevice':
../../../src/gdb/rdi-share/unixcomm.c:119: error: `SERPORT1' undeclared (first use in this function)
../../../src/gdb/rdi-share/unixcomm.c:119: error: (Each undeclared identifier is reported only once
../../../src/gdb/rdi-share/unixcomm.c:119: error: for each function it appears in.)
../../../src/gdb/rdi-share/unixcomm.c:138: error: `SERPORT2' undeclared (first use in this function)
../../../src/gdb/rdi-share/unixcomm.c: In function `Unix_IsValidParallelDevice':
../../../src/gdb/rdi-share/unixcomm.c:375: error: `SERPORT1' undeclared (first use in this function)
../../../src/gdb/rdi-share/unixcomm.c:376: error: `PARPORT1' undeclared (first use in this function)
../../../src/gdb/rdi-share/unixcomm.c:398: error: `SERPORT2' undeclared (first use in this function)
../../../src/gdb/rdi-share/unixcomm.c:412: error: `PARPORT2' undeclared (first use in this function)
make[2]: *** [unixcomm.o] Error 1
make[1]: *** [rdi-share/libangsd.a] Error 2
make: *** [all-gdb] Error 2
[andres-Computer:src/gcc-3.0/_parallel] andre% 

3) ./gdb/rdi-share/unixcomm.c
[andres-Computer:src/gcc-3.0/_parallel] andre% vim ../src/gdb/rdi-share/unixcomm.c 

// @todo ah - something to consider
// #ifndef SERPORT1 -> be replaced with #ifdef MACOS
// /dev/ttya -> macosx representation of /dev/xxx 
#ifndef SERPORT1
#define SERPORT1   "/dev/ttya"
#define SERPORT2   "/dev/ttyb"
#define PARPORT1   "/dev/bpp0"
#define PARPORT2   "/dev/bpp1"
#endif

[andres-Computer:src/gcc-3.0/_parallel] andre% make


try to remove gdb from build script

... don't know yet :-)


notes for installing gcc 3.4.3 on mac osx host

download gcc from http://gcc.gnu.org from release page

quick install guide
[andres-Computer:src/gcc-3.4.3] andre% tar -zxvf gcc-3.4.3.tar.gz
[andres-Computer:src/gcc-3.4.3] andre% mkdir _parallel
[andres-Computer:src/gcc-3.4.3] andre% cd _parallel
[andres-Computer:src/gcc-3.4.3/_parallel] andre% ../gcc-3.4.3/configure --prefix=/usr/local/er6 --exec-prefix=/usr/local/er6 --target=arm-epoc-pe
[andres-Computer:src/gcc-3.4.3/_parallel] andre% make

installation times
processor 867MHz PowerPC G4
memory    640MB 
compiling gcc
started  8:08
finished 8:34 failed - see below - more installation logs
plus download time
installing binaries

more installation logs
[andres-Computer:src/gcc-3.4.3] andre% tar -zxvf gcc-3.4.3.tar.gz
[andres-Computer:src/gcc-3.4.3] andre% mkdir _parallel
[andres-Computer:src/gcc-3.4.3] andre% cd _parallel
[andres-Computer:src/gcc-3.4.3/_parallel] andre% ../gcc-3.4.3/configure --prefix=/usr/local/er6 --exec-prefix=/usr/local/er6 --target=arm-epoc-pe
loading cache ./config.cache
checking host system type... powerpc-apple-darwin7.5.0
checking target system type... arm-epoc-pe
checking build system type... powerpc-apple-darwin7.5.0
checking for a BSD compatible install... /usr/bin/install -c
*** This configuration is not supported in the following subdirectories:
     target-libffi target-boehm-gc target-zlib target-libjava
    (Any other directories should still work fine.)
checking for powerpc-apple-darwin7.5.0-ar... no
checking for ar... ar
checking for powerpc-apple-darwin7.5.0-as... no
checking for as... as
checking for powerpc-apple-darwin7.5.0-dlltool... no
checking for dlltool... dlltool
checking for powerpc-apple-darwin7.5.0-ld... no
checking for ld... ld
checking for powerpc-apple-darwin7.5.0-nm... no
checking for nm... nm
checking for powerpc-apple-darwin7.5.0-ranlib... no
checking for ranlib... ranlib
checking for powerpc-apple-darwin7.5.0-windres... no
checking for windres... windres
checking for powerpc-apple-darwin7.5.0-objcopy... no
checking for objcopy... objcopy
checking for powerpc-apple-darwin7.5.0-objdump... no
checking for objdump... objdump
checking for arm-epoc-pe-ar... no
checking for arm-epoc-pe-as... no
checking for arm-epoc-pe-dlltool... no
checking for arm-epoc-pe-ld... no
checking for arm-epoc-pe-nm... no
checking for arm-epoc-pe-ranlib... no
checking for arm-epoc-pe-windres... no
checking whether to enable maintainer-specific portions of Makefiles... no
updating cache ./config.cache
creating ./config.status
creating Makefile
[andres-Computer:src/gcc-3.4.3/_parallel] andre% make
[andres-Computer:src/gcc-3.4.3/_parallel] andre% make
make[2]: Nothing to be done for `all'.
make[1]: Nothing to be done for `all'.
: make ; exec true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2" "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=-O2 -g -O2" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-O2 -g -O2" "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/usr/local/er6" "infodir=/usr/local/er6/info" "libdir=/usr/local/er6/lib" "prefix=/usr/local/er6" "tooldir=/usr/local/er6/arm-epoc-pe" "AR=ar" "AS=as" "CC=gcc" "CXX=c++" "LD=ld" "LIBCFLAGS=-g -O2" "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do
make \
  CFLAGS="-g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  " \
  CONFIG_H="config.h  auto-host.h ../../gcc-3.4.3/gcc/../include/ansidecl.h" \
  MAKEOVERRIDES= \
  -f libgcc.mk all
for d in libgcc fpu libgcc/fpu thumb libgcc/thumb apcs32 libgcc/apcs32 thumb/apcs32 libgcc/thumb/apcs32 fpu/thumb libgcc/fpu/thumb fpu/apcs32 libgcc/fpu/apcs32 fpu/thumb/apcs32 libgcc/fpu/thumb/apcs32; do \
  if [ -d $d ]; then true; else /bin/sh ../../gcc-3.4.3/gcc/mkinstalldirs $d; fi; \
done
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
rm -rf ./libgcc.a
arm-epoc-pe-ar  rc ./libgcc.a libgcc/./_udivsi3.o libgcc/./_divsi3.o libgcc/./_umodsi3.o libgcc/./_modsi3.o libgcc/./_dvmd_tls.o libgcc/./_call_via_rX.o libgcc/./_interwork_call_via_rX.o libgcc/./_muldi3.o libgcc/./_negdi2.o libgcc/./_lshrdi3.o libgcc/./_ashldi3.o libgcc/./_ashrdi3.o libgcc/./_cmpdi2.o libgcc/./_ucmpdi2.o libgcc/./_floatdidf.o libgcc/./_floatdisf.o libgcc/./_fixunsdfsi.o libgcc/./_fixunssfsi.o libgcc/./_fixunsdfdi.o libgcc/./_fixdfdi.o libgcc/./_fixunssfdi.o libgcc/./_fixsfdi.o libgcc/./_fixxfdi.o libgcc/./_fixunsxfdi.o libgcc/./_floatdixf.o libgcc/./_fixunsxfsi.o libgcc/./_fixtfdi.o libgcc/./_fixunstfdi.o libgcc/./_floatditf.o libgcc/./_clear_cache.o libgcc/./_enable_execute_stack.o libgcc/./_trampoline.o libgcc/./__main.o libgcc/./_absvsi2.o libgcc/./_absvdi2.o libgcc/./_addvsi3.o libgcc/./_addvdi3.o libgcc/./_subvsi3.o libgcc/./_subvdi3.o libgcc/./_mulvsi3.o libgcc/./_mulvdi3.o libgcc/./_negvsi2.o libgcc/./_negvdi2.o libgcc/./_ctors.o libgcc/./_ffssi2.o libgcc/./_ffsdi2.o libgcc/./_clz.o libgcc/./_clzsi2.o libgcc/./_clzdi2.o libgcc/./_ctzsi2.o libgcc/./_ctzdi2.o libgcc/./_popcount_tab.o libgcc/./_popcountsi2.o libgcc/./_popcountdi2.o libgcc/./_paritysi2.o libgcc/./_paritydi2.o libgcc/./_divdi3.o libgcc/./_moddi3.o libgcc/./_udivdi3.o libgcc/./_umoddi3.o libgcc/./_udiv_w_sdiv.o libgcc/./_udivmoddi4.o libgcc/./_pack_sf.o libgcc/./_unpack_sf.o libgcc/./_addsub_sf.o libgcc/./_mul_sf.o libgcc/./_div_sf.o libgcc/./_fpcmp_parts_sf.o libgcc/./_compare_sf.o libgcc/./_eq_sf.o libgcc/./_ne_sf.o libgcc/./_gt_sf.o libgcc/./_ge_sf.o libgcc/./_lt_sf.o libgcc/./_le_sf.o libgcc/./_unord_sf.o libgcc/./_si_to_sf.o libgcc/./_sf_to_si.o libgcc/./_negate_sf.o libgcc/./_make_sf.o libgcc/./_sf_to_df.o libgcc/./_sf_to_tf.o libgcc/./_thenan_sf.o libgcc/./_sf_to_usi.o libgcc/./_usi_to_sf.o libgcc/./_pack_df.o libgcc/./_unpack_df.o libgcc/./_addsub_df.o libgcc/./_mul_df.o libgcc/./_div_df.o libgcc/./_fpcmp_parts_df.o libgcc/./_compare_df.o libgcc/./_eq_df.o libgcc/./_ne_df.o libgcc/./_gt_df.o libgcc/./_ge_df.o libgcc/./_lt_df.o libgcc/./_le_df.o libgcc/./_unord_df.o libgcc/./_si_to_df.o libgcc/./_df_to_si.o libgcc/./_negate_df.o libgcc/./_make_df.o libgcc/./_df_to_sf.o libgcc/./_df_to_tf.o libgcc/./_thenan_df.o libgcc/./_df_to_usi.o libgcc/./_usi_to_df.o libgcc/./unwind-dw2.o libgcc/./unwind-dw2-fde.o libgcc/./unwind-sjlj.o libgcc/./gthr-gnat.o libgcc/./unwind-c.o libgcc/./_eprintf.o libgcc/./__gcc_bcmp.o
make[2]: arm-epoc-pe-ar: Command not found
make[2]: *** [libgcc.a] Error 127
make[1]: *** [stmp-multilib] Error 2
make: *** [all-gcc] Error 2
[andres-Computer:src/gcc-3.4.3/_parallel] andre% ls


notes for patching gcc 539 to big endian on mac osx host

http://sourceforge.net/docman/display_doc.php?docid=7738&group_id=39827
http://gnupoc.sourceforge.net/HOWTO/
original gnupoc_ppc.txt from Alfred E. Heggestad:
http://cvs.sourceforge.net/viewcvs.py/gnupoc/Docs/gnupoc_ppc.txt

source for gcc cross compiler 539

diff539 patch

[andres-Computer:~/sos/src/_parallel] andre% ../src/configure --prefix=/usr/local/er6 --exec-prefix=/usr/local/er6 --target=arm-epoc-pe
Config.guess failed to determine the host type.  You need to specify one.

$ uname -m
$ uname -s

./config.guess
+   Power*Macintosh:Darwin:*:*)
+	echo powerpc-apple-darwin${UNAME_RELEASE}
+	exit 0 ;;
    powerpc:machten:*:*)
	echo powerpc-apple-machten${UNAME_RELEASE}
	exit 0 ;;

[andres-Computer:~/sos/src/_parallel] andre% /bin/sh ../src/config.sub powerpc-apple-darwin7.5.0
Invalid configuration `powerpc-apple-darwin7.5.0': system `darwin7.5.0' not recognized
 
./config.sub
+	-darwin*)
+		;;
	-mac*)
		os=`echo $os | sed -e 's|mac|macos|'`
		;;

[andres-Computer:~/sos/src/_parallel] andre% /bin/sh ../src/config.sub powerpc-apple-darwin7.5.0
powerpc-apple-darwin7.5.0

./gcc/configure|configure.in  
	romp-*-mach*)
		xmake_file=romp/x-mach
		use_collect2=yes
		;;
+	powerpc-apple-darwin*)
+       xmake_file=rs6000/x-darwin
+       ;;
	powerpc-*-beos*)
		cpu_type=rs6000
		tm_file=rs6000/beos.h
		xm_file=rs6000/xm-beos.h
		tmake_file=rs6000/t-beos
		xmake_file=rs6000/x-beos
		;;

[andres-Computer:src/src/gdb] andre% ./configure --target=arm-epoc-pe
checking for wctype in -lw... no
configure: error: *** Gdb does not support host powerpc-apple-darwin7.5.0

./gdb/configure.host
case "${host}" in

+ powerpc-apple-darwin*)		gdb_host=macos ;;

[andres-Computer:~/sos/src/_parallel] andre% ../src/configure --prefix=/usr/local/er6 --exec-prefix=/usr/local/er6 --target=arm-epoc-pe
...
configuring in rdi-share
running /bin/sh ../../../src/gdb/rdi-share/configure  --host=powerpc-apple-darwin7.5.0 --target=arm-epoc-pe --prefix=/usr/local/er6 --exec-prefix=/usr/local/er6 --with-gnu-as --with-gnu-ld --with-newlib --cache-file=../../config.cache --srcdir=../../../src/gdb/rdi-share
loading cache ../../config.cache
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
configure: error: source directory already configured; run make distclean there first
configure: error: ../../../src/gdb/rdi-share/configure failed for rdi-share
Configure in /Users/andre/sos/src/_parallel/gdb failed, exiting.

[andres-Computer:_parallel/gdb/rdi-share] andre% /bin/sh ../../../src/gdb/rdi-share/configure --host=powerpc-apple-darwin7.5.0 --target=arm-epoc-pe --prefix=/usr/local/er6 --exec-prefix=/usr/local/er6 --with-gnu-as --with-gnu-ld --with-newlib --cache-file=../../config.cache --srcdir=../../../src/gdb/rdi-share

./gdb/rdi-share/configure
+ rm -f $srcdir/config.status
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
  { echo "configure: dir: [$srcdir] pwd: [`pwd`] error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
fi

[andres-Computer:~/sos/src/_parallel] andre% ../src/configure --prefix=/usr/local/er6 --exec-prefix=/usr/local/er6 --target=arm-epoc-pe

./_parallel/Makefile
AR_FLAGS = rc
- CC = gcc
+ CC = gcc2

[andres-Computer:~/sos/src/_parallel] andre%  make

... some problems in binutils
cd binutils
[andres-Computer:~/sos/src/_parallel/binutils] andre%  make
cd ..
[andres-Computer:~/sos/src/_parallel] andre%  make

./diff/system.h
#if HAVE_FCNTL_H
#include 
+ #ifdef HAVE_SETMODE
+ #undef HAVE_SETMODE
+ #endif
+ #ifndef _O_BINARY
+ #define _O_BINARY 0
+ #endif
+ #ifndef O_BINARY
+ #define O_BINARY _O_BINARY
+ #endif
#else
#if HAVE_SYS_FILE_H
#include 
#endif
#endif

// here is the problem
// O_BINARY wasn't defined ??!!
// But if defined then setmode function has only one arg ??!!
./diff/cmp.c
#if HAVE_SETMODE
      setmode (file_desc[i1], O_BINARY);
#endif

GDB problems

1) xm.h 
   ./gdb/xm.h
   
#define HOST_BYTE_ORDER BIG_ENDIAN  
#ifndef __unix
#define __unix
#endif
   
   created myself, but get lots of warnings now.

./gdb/rdi-share/hostchan.h
/* struct timeval */
+ #ifndef __unix
+ #define __unix
+ #endif
#if defined(__unix) || defined(__CYGWIN32__)
      
2) ./gdb/remote_rdp.c

send_rdp ...
...
-  va_end (args);
+  va_end (alist);

3) ./gdb/rdi-share/unixcomm.c

// @todo ah - something to consider
// #ifndef SERPORT1 -> be replaced with #ifdef MACOS
// /dev/ttya -> macosx representation of /dev/xxx 
#ifndef SERPORT1
#define SERPORT1   "/dev/ttya"
#define SERPORT2   "/dev/ttyb"
#define PARPORT1   "/dev/bpp0"
#define PARPORT2   "/dev/bpp1"
#endif

Problems with make in libstdc++ !!!

[andres-Computer:_parallel] andre% make
..
../../../src/libstdc++/stdexcepti.cc: In function `void __out_of_range(const char *)':
../../../src/libstdc++/stdexcepti.cc:15: exception handling disabled, use -fexceptions to enable
 
[andres-Computer:_parallel] andre% cd arm-epoc-pe/newlib 
[andres-Computer:_parallel/arm-epoc-pe/newlib] andre% /Users/andre/sos/src/_parallel/gcc/xgcc -B/Users/andre/sos/src/_parallel/gcc/ -idirafter /Users/andre/sos/src/_parallel/arm-epoc-pe/newlib/targ-include -idirafter /Users/andre/sos/src/src/newlib/libc/include -nostdinc -c -g -O2 -fno-implicit-templates -I../../../src/libstdc++ -I../../../src/libstdc++/stl -I../libio -I../../../src/libstdc++/../libio -nostdinc++  ../../../src/libstdc++/stdexcepti.cc
../../../src/libstdc++/stdexcepti.cc: In function `void __out_of_range(const char *)':
../../../src/libstdc++/stdexcepti.cc:15: exception handling disabled, use -fexceptions to enable

./src/libstdc++/stdexcepti.cc
void
__out_of_range (const char *s)
{
+ // throw out_of_range (s);
_ throw out_of_range (s);
}

void __length_error (const char *s)
{
+  //throw length_error (s);
_  throw length_error (s);
}

[andres-Computer:_parallel/arm-epoc-pe/newlib] andre% cd ../../
[andres-Computer:_parallel] andre% make

OK

[andres-Computer:_parallel] andre% sudo make install
  
o some problems with diff tools 
  got to check later notes higher up
  might be caused due to building diff from src tree
    instead from _parallel tree !!!
      
Making install in example...
make[3]: Nothing to be done for `install'.
Making install in testsuite...
make[3]: Nothing to be done for `install'.
/bin/sh ../../src/diff/mkinstalldirs /usr/local/er6/bin /usr/local/er6/info
for p in cmp diff diff3 sdiff; do \
  /bin/sh /Users/andre/sos/src/src/install-sh -c  $p /usr/local/er6/bin/`echo $p | sed 's,x,x,'`; \
done
install:  cmp does not exist
install:  diff does not exist
install:  diff3 does not exist
install:  sdiff does not exist
make[1]: *** [install] Error 1
make: *** [install-diff] Error 2
[andres-Computer:~/sos/src/_parallel] andre% sudo make install

[andres-Computer:src/src/diff] andre% bash
andres-Computer:~/sos/src/src/diff andre$   for p in cmp diff diff3 sdiff ; do /bin/sh /Users/andre/sos/src/src/install-sh -c $p /usr/local/er6/bin/`echo $p | sed 's,x,x,'` ; done
cp: /usr/local/er6/bin/#inst.3764#: Permission denied
cp: /usr/local/er6/bin/#inst.3773#: Permission denied
cp: /usr/local/er6/bin/#inst.3782#: Permission denied
cp: /usr/local/er6/bin/#inst.3791#: Permission denied

andres-Computer:~/sos/src/src/diff andre$ cp cmp ../../_parallel/diff/.
andres-Computer:~/sos/src/src/diff andre$ cp diff ../../_parallel/diff/.
andres-Computer:~/sos/src/src/diff andre$ cp diff3 ../../_parallel/diff/.
andres-Computer:~/sos/src/src/diff andre$ cp sdiff ../../_parallel/diff/.

[andres-Computer:_parallel] andre% sudo make install
        
./arm-epoc-pe-gcc -nostdinc -c -g -O2 -fno-implicit-templates -I../../../src/libstdc++ ../../../src/libstdc++/cinst.cc -o pic/ldcomio.o;
./arm-epoc-pe-gcc -I/User/andre/sos/petran petran.c -o petran.o

[andres-Computer:local/er6/bin] andre% sudo ./arm-epoc-pe-gcc -Wall -gstabs+ -I/Users/andre/sos/petran-1.1.0/inc -c /Users/andre/sos/petran-1.1.0/e32uid/uidcrc.cpp -o uidcrc.o
[andres-Computer:local/er6/bin] andre% ./arm-epoc-pe-objdump --disassemble-all uidcrc.o
[andres-Computer:local/er6/bin] andre% ./arm-epoc-pe-objdump -h uidcrc.o