YosysHQ / yosys

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

Fix `editline` Makefile #4754

Closed akashlevy closed 4 days ago

akashlevy commented 5 days ago

What are the reasons/motivation for this change?

There are three issues with editline in the Makefile:

  1. It includes libbsd and ncurses libraries, which are no longer needed
  2. It needs ENABLE_READLINE := 1 in the Makefile to do anything
  3. It does not properly set ABC_USE_NO_READLINE=1, so readline still gets used for abc

Explain how this is achieved.

Fully decouple editline from readline in the Makefile and reduce LIBS flags down to just -ledit

If applicable, please suggest to reviewers how they can test the change.

Test on a machine/container/VM with editline installed but no readline. Run make ENABLE_READLINE=0 ENABLE_EDITLINE=1 before and after the change

akashlevy commented 4 days ago

Ah got it. Didn't realize that the merged blocks were supposed to enforce mutual exclusion. Will fix this right now

mmicko commented 4 days ago

Thanks. So when testing you actually must set ENABLE_READLINE to 0 and ENABLE_EDITLINE to 1, since readline is default set option