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
bc: fix for cross #33478
bc: fix for cross #33478
Conversation
Fixes Tested with:
|
Please base this on staging :) |
@globin: oops, good call. Done. |
cc @Ericson2314 |
pkgs/tools/misc/bc/default.nix
Outdated
configureFlags = [ "--with-readline" ]; | ||
configureFlags = [ | ||
"--with-readline" | ||
"CC_FOR_BUILD=${buildPackages.stdenv.cc.targetPrefix}gcc" |
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.
Should be done by stdenv and by default.
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.
Agreed, although actually I think we can omit this for now unless someone has a config where buildPackages' targetPrefix is not empty?
(pushed variant that drops this for now)
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.
Hmm ideally we submit this patch somehow, and then pull it from bug tracker or whatever with fetchpatch
.
Readline fix submitted as #33576 , so as to not block on upstreaming the bc patch. |
Pushed with small fix for non-cross :). |
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.
Thanks! Just a few things
pkgs/tools/misc/bc/default.nix
Outdated
doCheck = true; | ||
makeFlags = ''HOST_READLINE=${buildPackages.readline.out.outPath}/lib HOST_NCURSES=${buildPackages.ncurses.out.outPath}/lib''; | ||
|
||
doCheck = stdenv.hostPlatform == stdenv.buildPlatform; |
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.
Can still be true now.
pkgs/tools/misc/bc/default.nix
Outdated
patches = [ ./cross-bc.patch ]; | ||
nativeBuildInputs = [autoreconfHook flex ed.out texinfo] ++ | ||
stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) | ||
[buildPackages.stdenv.cc buildPackages.readline.out buildPackages.ncurses.out]; |
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.
BuildPackages.stdenv.cc should be a depsBuildBuild, can be unconditional too.
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.
The other two can be made unconditional too, based on the env vars below. Maybe add a comment saying for cross too since people might be confused without the conditional and remove it.
Eep, that lasted commit isn't looking so good in testing. One sec. |
Weird, thanks for changing though! I'll take a look tomorrow or Monday. My only guess off hand is that turning the makeFlags into env var exports in preConfigure might help. |
rebased onto latest staging, dropped previous attempt to make use of I think this is finally good to go! Builds for me natively and cross (tested with aarch64). |
@dtzWill I think we don't need the |
@Ericson2314 in the patch, you mean? I already dropped them from the expression FWIW. |
@Ericson2314 guess don't need them in either place, pushed commit removing from patch. |
@dtzWill last thing is the native libraries really should be |
9102814
to
03dfc38
Compare
03dfc38
to
8b21391
Compare
OK, fixed the deps, and made the patch a bit more readable than what the diff algorithm did. Thanks! |
Yay! Thanks! |
Motivation for this change
Significant rebuild, isolated change from #30882
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)