Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build powerpc-eabi-* from source #30

Open
r-burns opened this issue Dec 7, 2022 · 1 comment
Open

Build powerpc-eabi-* from source #30

r-burns opened this issue Dec 7, 2022 · 1 comment

Comments

@r-burns
Copy link

r-burns commented Dec 7, 2022

Instead of pulling devkitppc binaries, it's easy to build these from source using native nixpkgs infra + devkitpro's patchset. When I need powerpc-eabi-as for gamecube targets, I use this:

{
  devkitppc = pkgs.pkgsCross.ppc-embedded.buildPackages.binutils.bintools.overrideAttrs (oa: {
    patches = oa.patches ++ [ (pkgs.fetchpatch {
      url = "https://raw.githubusercontent.com/devkitPro/buildscripts/devkitPPC_r41/dkppc/patches/binutils-2.37.patch";
      excludes = [ "libiberty/rust-demangle.c" ];
      sha256 = "04whdk0m01rcqcxx0ia9k5w85l90jqlmamg9xfxcxmf7yx0d4w4s";
    }) ];
    configureFlags = oa.configureFlags ++ [
      "--program-prefix=powerpc-eabi-"
    ];  
  });
}

This has the benefit of providing other useful tools such as powerpc-eabi-objdump, powerpc-eabi-readelf, etc.

@djanatyn
Copy link
Owner

djanatyn commented Dec 12, 2022

Thanks! Yeah, this looks like a better approach, I'll try to get this merged in soon. If I take too long, feel free to submit a PR. I appreciate the info - I'll add you as co-author on any commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants