Even though it's lame, I'll follow up to my own mail.

I just did the minimal test :
  copy src/scripts/build-mingw32ce.sh to src/scripts/build-x86.sh
  changed "arm" to "i386" in it, and also the installation directory
    so my arm directory remains clean
  mkdir src/build-x86
  cd src/build-x86
  sh ../scripts/build-x86.sh

Binutils gets built and installed.
The gcc bootstrap build mostly, it creates the xgcc executable but fails
to build the libgcc library, see below.

Also I forgot to tell I only have Linux host experience and you mention
Windows. Pedro has done Windows, not too many others have.

        Danny

gmake[2]: Entering directory
`/home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/build-x86-mingw32ce/gcc-bootstrap/gcc'
/home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/build-x86-mingw32ce/gcc-bootstrap/./gcc/xgcc
 
-B/home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/build-x86-mingw32ce/gcc-bootstrap/./gcc/
 -B/opt/x86mingw32ce/i386-mingw32ce/bin/ 
-B/opt/x86mingw32ce/i386-mingw32ce/lib/ -isystem 
/opt/x86mingw32ce/i386-mingw32ce/include -isystem 
/opt/x86mingw32ce/i386-mingw32ce/sys-include -O2 
-I/home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/gcc/gcc/../winsup/w32api/include
 -O2 -g -O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings 
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem 
./include   -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. 
-I/home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/gcc/gcc 
-I/home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/gcc/gcc/. 
-I/home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/gcc/gcc/../include 
-I/home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/gcc/gcc/../libcpp/include
  -DL_muldi3 -c 
/home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/gcc/gcc/libgcc2.c -o 
libgcc/./_muldi3.o
In file included from ./tm.h:10,

from 
/home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/gcc/gcc/libgcc2.c:35:
/home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/gcc/gcc/config/i386/cygming.h:52:19:
 error: stdio.h: No such file or directory
In file included from ./tm.h:10,

from 
/home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/gcc/gcc/libgcc2.c:35:
/home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/gcc/gcc/config/i386/cygming.h:333:
 error: expected ')' before '*' token
gmake[2]: *** [libgcc/./_muldi3.o] Error 1
gmake[2]: Leaving directory
`/home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/build-x86-mingw32ce/gcc-bootstrap/gcc'
gmake[1]: *** [libgcc.a] Error 2
gmake[1]: Leaving directory
`/home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/build-x86-mingw32ce/gcc-bootstrap/gcc'
gmake: *** [all-gcc] Error 2



On Sun, 2009-03-01 at 15:01 +0100, Danny Backx wrote:
> On Mon, 2009-02-23 at 10:35 -0600, Tory Bjorklund wrote:
> > I am looking to use a different compiler. I have the latest x86 mingw
> > compiler and am building standard x86 windows executables but I am not sure
> > what steps are necessary to build the CE code for my x86 target. Do I need
> > to rebuild the target platform SDK (generated from platform builder) using
> > mingw? Do I need to link to a mingw - w32api library rebuilt to target CE?
> 
> I'm not seeing any answers so I'll bite the bullet.
> 
> Two fair warnings though :
> - I'm speculating a bit here
> - I'm taking you up on the word "simple" (actually in Eneko's question)
> 
> My experience :
> - gcc and its friends are in very good shape
>       * one aspect is good separation between build process and actual
>         "business" logic
>       * another aspect is portability (I mean the number of targets
>         that just work)
> - picking up a new version of the compiler requires some hacking
>       * this is not trivial, see recent exchanges on the mailing list
>       * you may not need this though, just start with e.g. our current
>         work and retarget it for x86-ce.
> - stay away from creating DLLs, exception handling, .. at least
>   initially
> 
> Direct answers to direct questions :
> - Do you need to rebuild the platform SDK ?
>       * You may get away with DLL stubs like the ones we're using.
>         This would be simpler than all other options.
> - Do you need to link a w32api library ?
>       * If you mean e.g. a port of newlib, then the answer to my
>         previous question is basically : I hope/think you can get
>         by without that.
> 
> In my opinion, there are three basic steps :
> 1. Grab our binutils, get them to work for x86-mingw32ce in addition to
>    arm-mingw32ce.
> 2. Grab our gcc, get it to work for x86-mingw32ce (and use binutils from
>    step 1).
> 3. Build a library (hope it's just the stubs).
> 
> The issue with steps 2 and 3 is that they depend on each other, so the
> real process actually has four steps :
> 1. Grab our binutils, get them to work for x86-mingw32ce.
> 2. Grab our gcc, get the bootstrap build to work for x86-mingw32ce.
> 3. Build a library (hope it's just the stubs).
> 4. Get gcc to work fully.
> 
> How to get started ?
>   Grab our sources from current SVN.
>   cd src/scripts
>   edit build-mingw32ce.sh to change "arm-mingw32ce" to "x86-mingw32ce"
>   run the script, fix problems
>   send us mail when you have a problem
>   send us mail if you don't :-)
> 
> The first type of problem I expect you to find is that files like
>   src/binutils/binutils/configure.in
> contain stuff like
>         arm-wince-* | arm-*-wince | arm*-*-cegcc* | arm*-*-mingw32ce*)
>           BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
> but maybe not for the architecture you're trying. Or maybe there is such
> a set of lines, but they contain the wrong settings.
> 
> Then that's where the fun begins.
> 
> Some of the architecture specific stuff in gcc is hidden in directories
> like src/gcc/gcc/config/arm . The latter part of the directory would
> obviously be different for you.
> 
> There's a src/gcc/gcc/config/i386 directory. Which directory to use, and
> which files in it, is configured in src/gcc/gcc/config.gcc .
> 
> Also both that file and src/gcc/gcc/configure.ac mentions 
>       i?86*-*-* 
> or    i[34567]86-*-*
> which suggests that you could be making life easier by naming your
> target i686-mingw32ce (or so) instead of x86-mingw32ce .
> 
> Please ask questions (via the list) at any time.
> 
>       Danny
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to