YosysHQ / yosys

Yosys Open SYnthesis Suite
https://yosyshq.net/yosys/
ISC License
3.42k stars 874 forks source link

Apply patch for Makefile and begin supporting nix flakes build system #4233

Closed RCoeurjoly closed 7 months ago

RCoeurjoly commented 7 months ago

To build yosys in nixpkgs (https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/development/compilers/yosys/default.nix), a patch is applied to Makefile. I applied that same patch to the Makefile and was surprised that all the pipelines pass (https://github.com/RCoeurjoly/yosys/actions).

This PR would fix https://github.com/YosysHQ/yosys/issues/2011.

whitequark commented 7 months ago

This PR would fix #2011.

No it wouldn't, because of https://github.com/YosysHQ/yosys/pull/4233/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52L241.

(There are also other problems in #2011, such as the misuse of LDFLAGS, but even if we're talking about CXX alone, there are more branches of the Makefile that remain broken.)

povik commented 7 months ago

Hah, I happen to have written that patch quite some time ago.

whitequark commented 7 months ago

I would also suggest splitting the PR in two: one patching the Makefile, and another introducing Nix files. The former shouldn't be too controversial nowadays (I hope) while the latter will definitely need a discussion on the next dev meeting, mainly because it should be verified on CI that the flake still builds, and it's unclear who's going to be responsible for that in YosysHQ.

RCoeurjoly commented 7 months ago

Sounds reasonable. Let me close this PR and open two separate PR.