1. Building an x86_64 compiler
If you're building an x86_64 compiler on a 32-bit pc, make sure you pass the option '--enable-64-bit-bfd' to the configure scripts for both binutils and the gcc
2. Removing the program prefixes
- Export variables for all of your host tools (the ones being used to compile your toolchain) like so
This is to prevent the build process from confusing the host toolchain with the target toolchain. If you don't do this, your build process will probably halt with a linking error; probably something about libiberty or libiconv.
Code: Select all
export SDK_PATH=/C/MinGW export CPP=$SDK_PATH/bin/cpp export CC=$SDK_PATH/bin/gcc export CXX=$SDK_PATH/bin/g++ export AS=$SDK_PATH/bin/as export LD=$SDK_PATH/bin/ld export NM=$SDK_PATH/bin/nm export READELF=$SDK_PAth/bin/readelf export OBJCOPY=$SDK_PATH/bin/objcopy export OBJDUMP=$SDK_PATH/bin/objdump export DLLTOOL=$SDK_PATH/bin/dlltool export AR=$SDK_PATH/bin/ar export RANLIB=$SDK_PATH/bin/ranlib export STRIP=$SDK_PATH/bin/strip export WINDMC=$SDK_PATH/bin/windmc export WINDRES=$SDK_PATH/bin/windres
- Pass the option '--program-prefix=""' to the configuration scripts for both binutils and gcc
3. How to change the architecture path.
When you build your toolchain, you'll notice that the architecture dependent files are stored in a subdirectory that has the same name as the target. Like:
Code: Select all
cross
+- bin
+- i686-pc-elf
+- include
+- lib
'- share
Code: Select all
arch)
basic_machine=i686-pc
os=-elf
;;