Skip to content

Instantly share code, notes, and snippets.

@boomshroom
Created January 25, 2018 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boomshroom/047acd239c0d9412d1c90516940ed722 to your computer and use it in GitHub Desktop.
Save boomshroom/047acd239c0d9412d1c90516940ed722 to your computer and use it in GitHub Desktop.
Old GCC cross compiler overlay
self: super:
let target-gcc = arch:
let target = {
config = arch;
libc = null;
isDarwin = false;
};
binutils = self.pkgs.binutils.override {
targetPlatform = target;
};
in self.pkgs.wrapCCCross {
name = "gcc-" + arch;
cc = self.pkgs.gcc7.cc.override {
targetPlatform = target;
crossStageStatic = true;
langCC = false;
langC = true;
libcCross = null;
enableShared = false;
binutils = binutils;
};
binutils = binutils;
libc = null;
};
in
{
gcc-cross = {
i686 = target-gcc "i686-elf";
riscv = target-gcc "riscv64-elf";
arm = target-gcc "arm-none-eabi";
redox = target-gcc "x86_64-elf-redox";
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment