| 55 | |
| 56 | === Cross-compilation tools === |
| 57 | |
| 58 | By default, platform examples expect cross-toolchains compiled as described in CrossCompiler. |
| 59 | I.e. it expects `mipsel-unknown-elf-gcc`, `powerpc-unknown-elf-gcc` and `mb-gcc` (Xilinx ships a Microblaze compiler named it this way). |
| 60 | |
| 61 | If you already have cross-toolchains compiled on your host, you can declare them in `~/.soclib/soft_compilers.conf`. |
| 62 | For each architecture in `mipsel`, `powerpc` and `microblaze`, you may define: |
| 63 | {{{ |
| 64 | <arch>_CC_PREFIX = ... |
| 65 | <arch>_CFLAGS = ... |
| 66 | <arch>_LDFLAGS = ... |
| 67 | }}} |
| 68 | |
| 69 | For instance, if you want to use a mips cross-compiler configured for Linux (GNU+Glibc), you can declare: |
| 70 | {{{ |
| 71 | mipsel_CC_PREFIX = mipsel-linux-elf- |
| 72 | mipsel_CFLAGS = -nostdinc |
| 73 | mipsel_LDFLAGS = -nostdlib |
| 74 | }}} |
| 75 | `nostdinc` and `nostdlib` disable default libraries (Glibc) from compilation and linking. |