Skip to content

Instantly share code, notes, and snippets.

@ba0f3
Last active November 21, 2025 03:24
Show Gist options
  • Select an option

  • Save ba0f3/b36276d4481396a4007aeb5c261cd084 to your computer and use it in GitHub Desktop.

Select an option

Save ba0f3/b36276d4481396a4007aeb5c261cd084 to your computer and use it in GitHub Desktop.
Build toolchain for Ubuntu 16.04 i686 using crosstool-ng
#!/bin/sh
sudo apt install build-essential autoconf bison flex texinfo help2man gawk libtool libtool-bin libtool-doc libncurses5-dev python3-dev git
wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.28.0.tar.xz
tar xf crosstool-ng-1.28.0.tar.xz && cd crosstool-ng-1.28.0
./bootstrap
./configure
make
sudo make install
ct-ng i686-ubuntu16.04-linux-gnu
ct-ng build
$ ~/x-tools/i686-ubuntu16.04-linux-gnu/bin/i686-ubuntu16.04-linux-gnu-gcc --version
i686-ubuntu16.04-linux-gnu-gcc (crosstool-NG UNKNOWN) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment