Skip to content

Conversation

@PedroHLC
Copy link
Member

@PedroHLC PedroHLC commented Jul 8, 2025

Blocked by NixOS/nixpkgs#402198

🐟 What?

Simplifies the entire build setup by relying on Nixpkgs changes.

🎣 Why?

Hopefully fixes kernel modules.

@PedroHLC PedroHLC self-assigned this Jul 8, 2025
@PedroHLC PedroHLC added the wip work in progress label Jul 8, 2025
@ccicnce113424
Copy link

NixOS/nixpkgs#402198 has been merged. Is this PR ready?

@PedroHLC
Copy link
Member Author

NixOS/nixpkgs#402198 has been merged. Is this PR ready?

Merged to staging, it still needs to hit master and deploy to nixos-unstable before we can use it.

But I already tested it, and as it is now, it doesn't mass-fix the modules. I'll have to override them with fixes, but it opens the door to fixing them in Nixpkgs. E.g., we can open PRs to fix pkgsLLVM.linuxPackages_latest.xpadone and that would fix it here too.

@ccicnce113424
Copy link

I tried to build pkgsLLVM.linuxPackages_latest.xpad-noone and failed.
Blocked by NixOS/nixpkgs#429009.
https://github.com/ccicnce113424/nixpkgs-review-gha/actions/runs/16577172341/job/46884218620

@ccicnce113424
Copy link

Blocked by NixOS/nixpkgs#429745 now.

@ccicnce113424
Copy link

Link related issue here: NixOS/nixpkgs#321667

@ccicnce113424
Copy link

ccicnce113424 commented Jul 31, 2025

But I already tested it, and as it is now, it doesn't mass-fix the modules. I'll have to override them with fixes, but it opens the door to fixing them in Nixpkgs.

The compiler is configured using makeFlags in NixOS/nixpkgs#402198. The fix is pretty simple, what we need to do is set makeFlags = kernelModuleMakeFlags;. See NixOS/nixpkgs#430035.

@PedroHLC
Copy link
Member Author

Next nixos-unstable release, which will include NixOS/nixpkgs#402198, I might move us to a fork with NixOS/nixpkgs#429745 and NixOS/nixpkgs#430035 applied.

CachyOS already defaults for LTO, and I really need to catch up. -lto will be the new mainline and I'll introduce -gcc for the old folks yelling at clouds.

@PedroHLC
Copy link
Member Author

PedroHLC commented Sep 1, 2025

image

This testing is with nixos-unstable-small.

@PedroHLC PedroHLC marked this pull request as ready for review September 3, 2025 10:47
@PedroHLC PedroHLC requested a review from a team as a code owner September 3, 2025 10:47
@PedroHLC PedroHLC changed the title linux_cachyos-lto: adopt nixpkgs#402198 (wip) linux_cachyos-lto: adopt nixpkgs#402198 Sep 3, 2025
@PedroHLC PedroHLC merged commit 6b547e5 into main Sep 3, 2025
2 checks passed
@PedroHLC PedroHLC deleted the cachyos-pkgs-llvm branch September 3, 2025 10:52
@PedroHLC
Copy link
Member Author

PedroHLC commented Sep 3, 2025

What built successfully:

acer-wmi-battery
acpi_call
ajantv2
akvcam
amneziawg
asus-ec-sensors
batman_adv
bbswitch
cpupower
cryptodev
ddcci-driver
dpdk-kmods
facetimehd
fanout
framework-laptop-kmod
gasket
gcadapter-oc-kmod
hid-t150
hid-tmff2
hpuefi-mod
hyperv-daemons
iio-utils
ipu6-drivers
it87
jool
kvmfr
lenovo-legion-module
liquidtux
msi-ec
mstflint_access
nct6687d
new-lg4ff
nullfs
nxp-pn5xx
ply
qc71_laptop
r8125
rtl8821ce
rtw88
sheep-net
system76-io
system76-io
system76-power
tmon
trelay
tsme-test
tt-kmd
tuxedo-drivers
universal-pidff
usbip
v4l2loopback
veikk-linux-driver
vendor-reset
vhba
virtio_vmmci
xone
xpad-noone

From these, 16 built for the first time in this repo's history. Thanks for the help RossComputerGuy, alyssais, and @ccicnce113424!

Now the ones failing (but not failing on GCC 6.16 kernel as well) are:

amdgpu-i2c
bcc
bpftrace
ch9344
corefreq
dpdk
ecapture
ena
mm-tools
nvidia_dc
nvidia_x11
nvidia_x11_beta
nvidia_x11_beta_open
nvidia_x11_latest
nvidia_x11_latest_open
nvidia_x11_legacy535
nvidia_x11_production_open
oci-seccomp-bpf-hook
odp-dpdk
openafs
openrazer
opensnitch-ebpf
perf
pktgen
ryzen-smu
system76-acpi
system76-scheduler
systemtap
tp_smapi
turbostat
v86d
virtualbox
virtualboxGuestAdditions
vmware
x86_energy_perf_policy
xpadneo
zenpower
zfs_*

But now, these should be fixed in Nixpkgs.

@ccicnce113424
Copy link

Test NVIDIA with this PR: NixOS/nixpkgs#440075

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wip work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants