https://github.com/8dcc/i686-cross-compiler
Automated build and installation of an i686 GCC cross-compiler
https://github.com/8dcc/i686-cross-compiler
cross-compiler i686 i686-elf-gcc
Last synced: 5 months ago
JSON representation
Automated build and installation of an i686 GCC cross-compiler
- Host: GitHub
- URL: https://github.com/8dcc/i686-cross-compiler
- Owner: 8dcc
- License: gpl-3.0
- Created: 2022-12-19T09:12:50.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-09-14T19:16:07.000Z (10 months ago)
- Last Synced: 2025-11-11T22:30:58.912Z (8 months ago)
- Topics: cross-compiler, i686, i686-elf-gcc
- Language: Makefile
- Homepage:
- Size: 62.5 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# i686 cross-compiler
**Automated build and installation of an i686 GCC cross-compiler.**
## Installing the dependencies
In order to build the cross-compiler, you will need to have some packages
installed in your host machine.
If you are using Arch Linux, you can run:
```console
$ sudo ./install-deps-arch.sh
```
If you are using Gentoo, you can run:
```console
$ sudo ./install-deps-gentoo.sh
```
If you are using Debian or Ubuntu, you can run:
```console
$ sudo ./install-deps-debian.sh
```
In other systems, you will need to install the following packages to build the
cross-compiler:
- gcc
- make
- bison
- flex
- gmp
- mpc
- mpfr
- texinfo
## Building and installing the cross-compiler
Clone this repository, and run `make`.
```console
$ git clone https://github.com/fs-os/cross-compiler
$ cd cross-compiler
$ make # Build Binutils 2.39 and GCC 12.2.0
...
```
Or invoke the individual make targets.
```console
$ make deps-binutils # Download and extract the Binutils 2.39 source
...
$ make build-binutils # Build Binutils 2.39
...
$ make deps-gcc # Download and extract the GCC 12.2.0 source
...
$ make build-gcc # Build GCC 12.2.0
...
```
After you have built the cross compiler, you can install it with the `install`
target. Remember to use `sudo` or a similar command for installing them as
root. By default, the cross-compiler will be installed in
`/usr/local/cross/bin/`, but this path can be overwritten with the `PREFIX`
Makefile variable.
```console
$ sudo make install # Install Binutils 2.39 and GCC 12.2.0
...
```
## Building and installing the i686 debugger
Optionally, you can compile the GNU debugger with a custom patch with the
`build-gdb` target, and install it (to `/usr/local/cross/bin/i686-elf-gdb`) with
the `install-gdb` target. By default, this is not build when invoking the `all`
target.
```console
$ make build-gdb # For building GDB 12.1
...
$ sudo make install-gdb # For installing it into '$PREFIX'
...
```