Skip to content

nss: set -DNS_PTR_LE_32=1 if isILP32#208698

Merged
mweinelt merged 2 commits intomasterfrom
unknown repository
Jan 3, 2023
Merged

nss: set -DNS_PTR_LE_32=1 if isILP32#208698
mweinelt merged 2 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jan 2, 2023

Description of changes

A comment in RNG_RandomUpdate() (drdbg.c) says to add the -DNS_PTR_LE_32=1 flag on ILP32 platforms.

Without this PR, pkgsCross.mips64el-linux-gnuabin32.nss fails to build. With this PR, it succeeds.

This PR includes the commit found in #208697

Things done
  • Built on platform(s)
    • mips64el-linux-gnuabin32
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

I've run into a few packages that need an extra flag on platforms
where `int` has more bits than `void*` does.  I know of three such
platforms:

* [aarch64ilp32], used on both Linux and also on the [Apple Watch]
* [x32], the x86 ILP32 ABI
* [mips64n32], used on [Longsoon] and Cavium Octeon routers.

This PR introduces a predicate so the package flags can be added in
a generic way.

[Apple Watch]: https://gist.github.com/woachk/943828f37c14563a607a26116435bf27#watch
[mips64n32]: https://en.wikipedia.org/wiki/MIPS_architecture#Calling_conventions
[Longsoon]: https://en.wikipedia.org/wiki/Loongson
[x32]: https://en.wikipedia.org/wiki/X32_ABI
@ofborg ofborg bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. labels Jan 2, 2023
@ghost ghost marked this pull request as draft January 2, 2023 01:41
@ghost
Copy link
Copy Markdown
Author

ghost commented Jan 2, 2023

Hang on, this shouldn't be causing so many rebuilds.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. and removed 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. labels Jan 2, 2023
@ghost ghost mentioned this pull request Jan 2, 2023
13 tasks
@ghost
Copy link
Copy Markdown
Author

ghost commented Jan 2, 2023

The string-pasting whitespace situation to avoid rebuilds is kind of hacky. #208704 cleans that up, but causes a mass-rebuild, so it targets staging. If this merges to master I will undraftify #208704.

@ghost ghost marked this pull request as ready for review January 2, 2023 02:40
@mweinelt
Copy link
Copy Markdown
Member

mweinelt commented Jan 2, 2023

Can you squash the two latest commits?

A comment in RNG_RandomUpdate() (drdbg.c) says to add the
-DNS_PTR_LE_32=1 flag on ILP32 platforms.

Without this PR, pkgsCross.mips64el-linux-gnuabin32.nss fails to
build.  With this PR, it succeeds.
@ghost ghost marked this pull request as draft January 3, 2023 04:57
@ghost ghost marked this pull request as ready for review January 3, 2023 04:57
@ghost
Copy link
Copy Markdown
Author

ghost commented Jan 3, 2023

Can you squash the two latest commits?

Done. Oh, I see, squash the last two into the third-to-last. Done.

@ghost ghost marked this pull request as draft January 3, 2023 04:58
@ghost ghost marked this pull request as ready for review January 3, 2023 04:59
@mweinelt mweinelt merged commit b38111a into NixOS:master Jan 3, 2023
@ghost ghost deleted the pr/nss/ilp32 branch January 3, 2023 22:59
ajs124 pushed a commit to helsinki-systems/nixpkgs that referenced this pull request Jan 11, 2023
Nss has a lot of dependers, so subtle whitespace changes can cause
mass rebuilds, like I did here:

  NixOS#208698 (comment)

Let's use a list instead of concatenating individual strings in
order to be more robust.  This will cause a lot of rebuilds, but
will prevent rebuilds in the future.  Sending it this cleanup to
staging because of that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant