-
-
Save boomshroom/93b524ab8786299de76eca89ea156d50 to your computer and use it in GitHub Desktop.
bintuils working, nothing else
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self: super: | |
let target-gcc = arch: | |
let target = { | |
config = arch; | |
libc = null; | |
isDarwin = false; | |
}; | |
#binutils = self.pkgs.binutils.override { | |
# targetPlatform = target; | |
#}; | |
binutils = self.pkgs.wrapBintoolsWith { | |
libc = null; | |
bintools = | |
self.pkgs.binutils-unwrapped.overrideAttrs (old: rec { | |
configurePlatforms = ["build" "host"]; | |
targetPrefix = "${arch}-"; | |
name = targetPrefix + "binutils-${old.passthru.version}"; | |
passthru = old.passthru // { | |
inherit targetPrefix; | |
}; | |
configureFlags = old.configureFlags ++ ["--target=${arch}"]; | |
}); | |
}; | |
in self.pkgs.wrapCCWith { | |
name = "gcc-" + arch; | |
cc = self.pkgs.gcc7.cc.override { | |
targetPlatform = target; | |
crossStageStatic = true; | |
langCC = false; | |
langC = true; | |
libcCross = null; | |
enableShared = false; | |
targetPackages.stdenv.cc.bintools = binutils; | |
}; | |
bintools = 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