pulp-platform / snitch_cluster

An energy-efficient RISC-V floating-point compute cluster.
https://pulp-platform.github.io/snitch_cluster/
Apache License 2.0
51 stars 51 forks source link

sw: Add missing `extern` declarations #133

Closed zero9178 closed 6 months ago

zero9178 commented 6 months ago

Without these extern declarations, the final object file will not contain functions marked inline as LLVM discards them prior to code generation.

This has so far not been problematic as these methods usually get inlined. Downstream projects as well as consumers of the api/ headers may, however, be using different compiler flags or not have inline definitions available within the same translation unit. This would then cause an "undefined reference" linker error in any such project.

colluca commented 6 months ago

Thanks for your contribution @zero9178!

I'm closing this PR in favour of https://github.com/pulp-platform/snitch_cluster/pull/136 where I included your changes.