On Mon, 2007-02-12 at 18:05 +0100, Aldo Calpini wrote: > please help :-)
Attached is a first adaptation. Does this help ? Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.infoTitle: How to build the toolchain
This document describes how to build CeGCC. We have a set of scripts that can be used to build the toolchain on GNU/Linux as well as on Cygwin (Windows + the Cygnus layer). These scripts are in the src/ directory, they're called src/build-cegcc.sh and src/build-mingw32ce.sh. They can be used to build the toolchain for the arm-wince-cegcc and arm-wince-mingw32ce target platforms, respectively.
We used to have a separate set of scripts in the scripts/linux directory. These have been removed. The only thing still left there is support for building RPM files, these are distribution packages that can be used on many Linux platforms.
1. Building on Linux
This chapter describes building the toolchain on Linux. I would guess that this is similar on Cygwin, but the details on that are in the next chapter. A third chapter in this document describes some common elements, you probably want to look into that.
The basic steps are very simple :
- Put yourself in the right directory
- Clean up old installations
- Build it
1.1 The right directory
All of the commands and context below rely on the fact that you're in the src directory of the CeGCC distribution.
1.2 Clean up old installations
Cleanup is recommended :
rm -rf /opt/cegcc/* rm -rf build-cegcc
When building for the arm-wince-mingw32ce target, replace cegcc by mingw32ce everywhere, e.g. :
rm -rf /opt/mingw32ce/* rm -rf build-mingw32ce
1.3 Build cegcc completely
sh build-cegcc.sh
This command will rebuild and install all of cegcc. The directory in which everything is installed is /opt/cegcc, which means that you'll need to put /opt/cegcc/bin in your PATH to make use of the new tools.
1.4 More complicated stuff : partial builds, etc
The build scripts have a couple of paramters. In this chapter, we'll explain how to use them.
When you pass the --help parameter to the build script, it'll display a summary of its usage :
dannypc: {55} sh build-cegcc.sh --help Using defaults: Building cegcc: source: /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src build: /home/danny/src/cegcc/svn.sf.net/cegcc/trunk/cegcc/src/build-cegcc prefix: /opt/cegcc usage: build-cegcc.sh [source dir] [build directory] [prefix dir] [build_opt] Valid build options : binutils importlibs w32api dummy_cegccdll bootstrapgcc newlib gcc cegccdll cegccthrd libstdc++ gdb gdbstub docs profile all Done. --------------------------
1.4.1 Partial builds
You can rebuild part of CeGCC by saying e.g.
sh build-cegcc.sh gccThe script will then only build and install the requested module.
1.4.2 Non-standard prefix
1.4.3
2. Building on Cygwin
To be written by someone who knows about Cygwin...
3 Platform independent information
3.1 How the scripts interact
3.2 Installation directory
3.3 The quick overview : how to build a cross compiler
The tools need to be built in a sequence because they rely on each other. The text below is an overview to make you understand the issues involved, the real scripts (src/build-*.sh) are the most (the only?) reliable source of information on this topic.
- binutils
- includes
- gcc bootstrap
- newlib
- dll preliminary, not thread-capable
- CE libraries
- gcc, g++ complete build
- dll complete
- additional libraries (threads support, C++ DLLs)
- gdb
- the debugging stub
In this sequence, we always (configure and) build the tools, then immediately install them in $PREFIX. This is uncommon, but is the easiest way for us to deal with this sequence.
4. Requirements
There is nothing out of the ordinary in the tools you need to build cegcc, most free software packages require the same :
- a working C and C++ compiler for your platform, only tested with gcc
- make
- (if you're building an RPM) the rpmbuild tool
You don't need automake, autoconf or such tools : the cegcc sources, even the ones in SVN, already contain the files generated by these tools. Note that we need to do this as some of the software that is part of cegcc requires different revisions of the auto tools than other parts of cegcc.
5. A tour of the directory structure
how to download
src The master source directory, contains the master build scripts src/newlib src/cegcc/cegccdll src/cegcc/importlibs/defs Definition files to create libraries to match WinCE DLL's src/cegcc/importlibs src/cegcc/cegccthrd src/cegcc/libstdc++ src/cegcc/fixincludes src/cegcc src/gcc The gcc sources src/gdb The gdb sources src/binutils The binutils sources (gas, ld, ..) src/w32api/include The target system include files src/w32api/lib an unused part of w32api src/w32api src/build-cegcc This directory is created from the source tree src/build-mingw32ce This directory is created from the source tree website Our website contents are also managed via the source repository website/images docs The CeGCC project's documentation
6 Known problems
6.1 C++ compiler won't build
For some reason, the build process for the C++ compiler chokes.
The only explanation - and workaround - that we know of is the one found in
this old message
saying
Configure creates a softlink in gcc object directory to the new
version of the cross assembler. Problem is that the native compiler
get confused and use the cross assembler instead of the native one.
We found that this only happens if you have the current directory in your PATH, usually in the beginning of the list (before /bin and such). A workaround is to remove . from your path, or to put it at the end.
We've adapted the build scripts so they can cope with this, but this is really a gcc bug.
6.2 Build sometimes fails
I recommend cleaning up the installation directory and all of the build directories prior to using the build scripts. The build tends to be less reliable if part of an old build is still present.6.3
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel