riscv-software-src / riscv-isa-sim

Spike, a RISC-V ISA Simulator
Other
2.28k stars 813 forks source link

Fix build of softfloat.h when threads.h is not available. #1703

Closed dybv-sc closed 2 weeks ago

dybv-sc commented 2 weeks ago

softfloat.h happens to be included both in C and C++ modules and these languages have different keywords for thread local attribute.

aswaterman commented 2 weeks ago

I agree this approach seems cleanest, but it does not work in Mac OS, which does not support linkage between _Thread_local and thread_local.

But I agree it should work on Mac OS, and so maybe the right fix is to special-case the broken OS, and use the cleaner approach for Linux etc.

aswaterman commented 2 weeks ago

I've created an alternate PR #1704, so I'll close this one. Thanks for raising the issue, though.