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

Fix status code of generated Makefile #1265

Closed
veripoolbot opened this issue Jan 17, 2018 · 4 comments
Closed

Fix status code of generated Makefile #1265

veripoolbot opened this issue Jan 17, 2018 · 4 comments

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented Jan 17, 2018


Author Name: Stefan Wallentowitz (@wallento)
Original Redmine Issue: 1265 from https://www.veripool.org

Original Assignee: Stefan Wallentowitz (@wallento)


Hi Wilson,

we use verilator in a larger build process that is driven by a script. It aborts on any error, but the build of the verilated simulation does not return a non-zero status code on linker errors. The reason is that the output of the linker is piped through c++filt. The status code is then the status code of c++filt which is 0 on a linker error too apparently.

Hence I prepared a simple fix to this by generating a different linker command in the Makefile in the attached patch. I know this is not nice, but in my opinion the nicest solution among the options to solve it (except maybe removing c++filt..). I am open to change it to a different way of handling it.

I also attach a minimal example.

Cheers,
Stefan

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Jan 18, 2018


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2018-01-18T12:50:13Z


I can't find a definitive reference, but believe c++filt isn't required for any modern linker, so could be removed. Do you know?

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Jan 18, 2018


Original Redmine Comment
Author Name: Stefan Wallentowitz (@wallento)
Original Date: 2018-01-18T18:33:08Z


I also think that all recent linkers do the demangling themselves pretty well. For the sake of simplicity I also think it can better be removed. If someone has an older linker, they can still take the output and push it through c++-filt I suppose.

Probably the shortest patch for Verilator ever written can be found attached :)

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Jan 19, 2018


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2018-01-19T02:26:35Z


Thanks for the patch. I added removing it from the test_regress makefile too.

Fixed in git towards 3.920.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Feb 2, 2018


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2018-02-02T01:17:31Z


In 3.920.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.