Major Tools
Other Tools
General Info

Issue #1265

Fix status code of generated Makefile

Added by Stefan Wallentowitz over 1 year ago. Updated over 1 year ago.

% Done:



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

c++filt-example.tgz (308 Bytes) Stefan Wallentowitz, 01/17/2018 10:07 AM

c++filt-status-code.patch View (1.34 KB) Stefan Wallentowitz, 01/17/2018 10:08 AM

remove-c++filt.patch View (1.14 KB) Stefan Wallentowitz, 01/18/2018 06:33 PM


#1 Updated by Wilson Snyder over 1 year ago

  • Category set to Configure/Make/Compiling
  • Status changed from New to Confirmed

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?

#2 Updated by Stefan Wallentowitz over 1 year ago

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 :)

#3 Updated by Wilson Snyder over 1 year ago

  • Status changed from Confirmed to Resolved

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

Fixed in git towards 3.920.

#4 Updated by Wilson Snyder over 1 year ago

  • Status changed from Resolved to Closed

In 3.920.

Also available in: Atom