ELF Format
Ace uses ELF object format. ELF is chosen over PE format because lot of gnu tools supports ELF well over PE. So to compile Ace, the gcc compiler should be configured to output elf objects. Linux is by default supports elf format. But in Windows host environment(cygwin), a cross gcc has to be created.
[edit] Cross Compiler
To create gcc cross compiler in cygwin the following guide is used
http://wiki.osdev.org/GCC_Cross-Compiler
The following commands are copied from osdev website.
export PREFIX=/usr/cross
export TARGET=i586-elf
cd /usr/src
mkdir build-binutils build-gcc
cd /usr/src/build-binutils
../binutils-2.98/configure --target=$TARGET --prefix=$PREFIX --disable-nls
make all install
cd /usr/src/build-gcc
export PATH=$PATH: $PREFIX/bin
../gcc-4.2.x/configure --target=$TARGET --prefix=$PREFIX --disable-nls --enable-languages=c --without-headers //--with-newlib//
make all-gcc install-gcc
Download binutils and gcc source from
ftp://ftp.gnu.org/gnu/binutils/ or
ftp://ftp.gnu.org/gnu/gcc/ ( gcc core compiler version 4 or later ).
cygwin port gcc sources will result in error.
Also use only tar and bunzip utilities in cygwin to unzip the sources.
[edit] Compile
Ace make files are written such way that it requires a environment variable (ACE_ROOT) to be set to the source root directory. After setting and exporting ACE_ROOT variable go to src directory and type "make all".
Example setting in /etc/profile for cygwin environment.
export ACE_ROOT="`cygpath -u -a e:/Ace3`"
export PATH=/usr/cross/i586-elf/bin/: $
ACE_ROOT/img: $
PATH:
cd $ACE_ROOT
[
本帖最后由 peter 于 2009-6-10 14:06 编辑 ]