-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
WIP: z80: add cross-compile support #101993
Conversation
Fork of GCC 4.8 that targets Z80. https://github.com/AHelper/gcc/tree/z80-target However I think it's better to try to get cross-compilation support using z88dk's compiler. |
@@ -304,6 +305,12 @@ stdenv.mkDerivation { | |||
done | |||
'' | |||
|
|||
+ optionalString (libc != null && targetPlatform.isZ80) '' | |||
for isa in z80; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this supposed to grow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. I'll fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not even sure it makes sense to modify bintools-wrapper
like this, at least until the Z80 libc
issue is resolved.
Current difficulty seems to be two things;
|
@siraben I don't think z88dk is using cc-wrapper? If this isn't working try doing |
I seem to get infinite loop error; z88dk = wrapCC {
cc = z88dk-unwrapped;
extraBuildCommands = ''
wrap zcc $wrapper $ccPath/zcc
export named_cc=zcc
'';
};
z88dk-unwrapped = callPackage ../development/compilers/z88dk { }; |
@cleverca22 if you're available I'd greatly appreciate your help in this PR |
pkgs/stdenv/cross/default.nix
Outdated
@@ -68,7 +68,7 @@ in lib.init bootStages ++ [ | |||
else if crossSystem.useLLVM or false | |||
then buildPackages.llvmPackages_8.lldClang | |||
else if crossSystem.isZ80 | |||
then buildPackages.z88dk | |||
then buildPackages.z88dk-unwrapped |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be buildPackages.z88dk
so I guess we'll need to figure out a different way to break the cycle.
Here's an example of cross-compilation to the reMarkable tablet, looks like we would use |
Closed due to infeasibility.
Motivation for this change
#101990
Current difficulty seems to be two things;
z88dk
to work in place ofgcc
newlib
C library which is inz88dk
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)