YosysHQ / yosys

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

fix bug of check-git-abc #4450

Open nlwmode opened 2 weeks ago

nlwmode commented 2 weeks ago

This project distinguishes the yosyshq/abc and berkeley-abc by .gitcommit file that checked in check-git-abc function in Makefile.

However, the second and third "elif" branches' judgment conditions are reversed. And "grep -q '\$$Format:%h\$$' "$(YOSYS_SRC)/abc/.gitcommit" can check that there is a .gitcommit file in yosys/abc with the text "Format:%h".

This pull request aims to ensure that the second and third "elif" conditions produce the expected compilation results for using yosyshq/abc.

nlwmode commented 2 weeks ago

This PR is to solve the issue: https://github.com/YosysHQ/yosys/issues/4449

widlarizer commented 4 days ago

As others have pointed out on the linked issue, I'm confirming that the problem can't be reproduced. Furthermore, the functionality you're changing the logic for in this PR actually works for me the way I'd expect at yosys main branch commit 1288166f:

emil@fridge /t/a/yosys (main)> git submodule deinit abc
Cleared directory 'abc'
Submodule 'abc' (https://github.com/YosysHQ/abc) unregistered for path 'abc'
emil@fridge /t/a/yosys (main)> make
Initialize the submodule: Run 'git submodule update --init' to set up 'abc' as a submodule.
make: *** [Makefile:770: check-git-abc] Error 1
emil@fridge /t/a/yosys (main) [2]> rm -rf abc
emil@fridge /t/a/yosys (main)> cp -r ../abc/abc-yosys-0.42/ ./abc
emil@fridge /t/a/yosys (main)> cat abc/.gitcommit
237d81397f
emil@fridge /t/a/yosys (main)> make
'abc' comes from a tarball. Continuing.

Without more context we'll probably close the PR and issue fairly soon