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

mesa: fix build for armv5tel #213635

Merged
merged 3 commits into from
Jan 30, 2023
Merged

mesa: fix build for armv5tel #213635

merged 3 commits into from
Jan 30, 2023

Conversation

alyssais
Copy link
Member

Description of changes

I went a bit overboard and decided to test cross builds of #213158 for every non-Darwin entry in lib.platforms.mesaPlatforms. Everything was fine apart from a regression on armv5tel with a simple fix, but then the final commit was pushed adding a systemd dependency, so then I had to fix the build of systemd for armv5tel as well.

The particular ARMv5 quirks we have to take into account for systemd and mesa are:

  • ARMv5 does not have hardware floating point, which is required by the BPF bits of systemd.
  • GNU EFI does not support ARMv5, so we can't have EFI support in systemd.
  • ARMv5 does not have guaranteed lock-free atomic ints, which are required by mesa's virtio-experimental Vulkan driver.
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

I'm not aware of any ARMv5 EFI implementation.  gnu-efi doesn't
support it, so the build of systemd for armv5tel-linux is broken if
it's isEfi.
ARMv5 does not have hardware floating point, so can't build systemd's
BPF code.
Fixes: e7a2c65 ("mesa: reorganize default driver list")
@alyssais alyssais requested a review from K900 January 30, 2023 20:01
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Jan 30, 2023
Copy link
Contributor

@flokli flokli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@K900
Copy link
Contributor

K900 commented Jan 30, 2023

I wonder why ofborg is seeing a rebuild here.

@alyssais
Copy link
Member Author

I wonder why ofborg is seeing a rebuild here.

IIRC nixos-install-tools pulls in a verbatim copy of lib, so any change to lib now causes a rebuild. :/

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Jan 30, 2023

It pulls in nixos-manpages which get rebuild with every module change and the diff is:

...drum sticks playing....

 ➜ diffoscope result*
--- result
+++ result-before
├── stat {}
│ @@ -1,7 +1,7 @@

│    Size: 76           Blocks: 2          IO Block: 131072 symbolic link
│  Device: 0,31 Access: (0777/lrwxrwxrwx)  Uid: ( 1000/  sandro)   Gid: (  100/   users)

│ -Modify: 2023-01-30 21:24:49.196166901 +0000
│ +Modify: 2023-01-30 21:23:10.292482912 +0000
│   --- result/share
├── +++ result-before/share
│┄ symlink
│ @@ -1 +1 @@
│ -destination: /nix/store/mr95w917i81bwq17p5gcayvj5i1330wh-nixos-manpages/share
│ +destination: /nix/store/jk09zfw9v0if7kc0jvf8wiiksfk3bkns-nixos-manpages/share
 ➜ diffoscope /nix/store/jk09zfw9v0if7kc0jvf8wiiksfk3bkns-nixos-manpages/share /nix/store/mr95w917i81bwq17p5gcayvj5i1330wh-nixos-manpages/share

@K900 K900 merged commit 7b0719b into NixOS:staging-next Jan 30, 2023
@alyssais alyssais deleted the mesa-armv5tel branch January 30, 2023 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: systemd 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants