From: Kai R. <kai...@lu...> - 2001-01-18 11:11:44
|
Mumit Khan wrote: > > On Tue, 16 Jan 2001, David Feustel wrote: > > > I just found this list and wonder if mingw could be used to facilitate porting > > gnu console mode software to WinCE, given that *most* C stdio functions are > > already supported. > > There is a GCC and binutils port to WinCE, but it links directly with MS > startup code and doesn't need to use Mingw. Mingw doesn't really add > anything, rather provides hooks into the system runtime, so you may not > really gain anything. Unfortunately, I don't have a CE device, and don't > really know the status of the GNU tools on WinCE. The WinCE tools include DLLs for the 'WinCE emulator' running under WinNT. If linking against these, the resulted program should run under the emulator, it behaving like a WinCE-program on a real WinCE-hardware. A separate 'i386-wince' target compiler could be used with the WinCE import libs: e:\usr\local\samples>gcc-i386-wince -v Reading specs from e:\usr\local\lib\gcc-lib\i386-wince-pe\2_95.2\specs gcc version 2.95.2 19991024 (release) Then it wouldn't have much to do with Mingw, just the object format and binutils would be identical, the programs for the emulator are just Win32- programs talking with the emulator-DLLs instead of CRTDLL or MSVCRT and the Win32 API ones. Or a '-mwince' option could be added to the multilibs for Mingw. Currently the 'crtdll' and 'msvcrt' targets are handled with separate compilers, but AFAIK the '-mcrtdll' addition has been discussed, so why not '-mwince' for the WinCE emulator. Then the 'mcrtdll' and 'mwince' specific libs would be in their 'crtdll' and 'wince' subdirs. I would also like to add the '-mwin32s' to the variations. As the matter of fact my edk-000221-based Mingw-compiler has the '-mcrtdll' and '-mwin32s' options for producing CRTDLL/USER32/KERNEL32/... and CRTDLL/W32SCOMB/W32SKRNL/... based executables with the '-mmsvcrt'-defaulted compiler. The '_environ' is one thing which is different between the msvcrt/crtdll/win32s, causing at least the 'setenv.o' in 'libiberty.a' to differ... Perhaps there is some other solution than generating the separate 'libgcc.a/libiberty.a/libstdc++.a's for msvcrt/crtdll/win32s, the couple of routines could perhaps be handled with a SVR4-like startup, 'values-Xa.o', telling the system (in a global flag) for which variation the executable was compiled for... For producing the ARM, MIPS or SH programs for the real hardware, Mingw-hosted and XYZ/WinCE-targeted cross-compilers could be used. e:\usr\local\samples>gcc-arm-wince -v Reading specs from e:\usr\local\lib\gcc-lib\arm-wince-pe\2_9-edk1.0-2\specs gcc version 2.9-edk1.0-2 (RedHat edk-20000221, fixed by Kai Ruottu) e:\usr\local\samples>gcc-mips-wince -v Reading specs from e:\usr\local\lib\gcc-lib\mips-wince-pe\2_9-edk1.0-2\specs gcc version 2.9-edk1.0-2 (RedHat edk-20000221, fixed by Kai Ruottu) e:\usr\local\samples>gcc-sh-wince -v Reading specs from e:\usr\local\lib\gcc-lib\sh-wince-pe\2_9-edk1.0-2\specs gcc version 2.9-edk1.0-2 (RedHat edk-20000221, fixed by Kai Ruottu) For debugging the WinCE programs running on the ARM, MIPS or SH hardware, Mingw- hosted Insight/GDBs could be used. e:\usr\local\samples>gdb-arm-wince_mw -v GNU gdb 5.0-2 (Dec.10, 2000) Copyright 2000 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as: "--host=i386-mingw32 --target=arm-wince" by Kai Ruottu. e:\usr\local\samples>gdb-mips-wince_mw -v GNU gdb 20000926 Copyright 2000 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as: "--host=i386-mingw32 --target=mips-wince-pe" by Kai Ruottu. e:\usr\local\samples>gdb-sh-wince_mw -v GNU gdb 20000905 Copyright 2000 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as: "--host=i386-mingw32 --target=sh-wince-pe" by Kai Ruottu. Everything is of course possible, but volunteers to make these things to work and to maintain them may be hard to find... At least real WinCE HW should be available for the work -- I haven't... So Fucking What, if I have already built them... Ok, I could try the 'i386-wince' target compiler, its problems are in patching the 'WinCE API' headers to work with GCC, where else... Later I could glue the WinCE-emulator support with the '-mwince' option into my Mingw-target compiler (if that name could any more be used, 'Maxgw' could perhaps be better... quite many has wished there being only the msvcrt- support, nothing else in 'Mingw') Cheers, Kai PS. Doing something equal for the EPOC could be motivated... Currently the C++ based EPOC-emulator libs and DLLs were compiled with VC++5.0 (Haven't checked their EPOC 6.0 tools). How to get Symbian to use Mingw and build the import libs and DLLs using the G++ name mangling is the problem... The final tools for ARM ('arm-epoc-pe') are GCC-based, so having the tools for the Win32-hosted EPOC emulator as GCC-based sounds natural... Very odd that no GCC-alternative exists to the VC++ based tools. |