How to cross build a RISC-V target betterC code using LDC on x86-64 machine

lili akozhao at tencent.com
Sun Jun 6 06:26:38 UTC 2021


I have used to ldc2(1.20.1) on x86-64 laptop with `ldc2  -c  
-betterC -mtriple=riscv64   betterC.d -v ` but comiple is failed.

output:
```
binary    /usr/bin/ldc2
version   1.20.1 (DMD v2.090.1, LLVM 10.0.0)
config    /etc/ldc2.conf (riscv64)
'generic' is not a recognized processor for this target (ignoring 
processor)
'generic' is not a recognized processor for this target (ignoring 
processor)
...
import    core.stdc.time        
(/usr/lib/ldc/x86_64-linux-gnu/include/d/core/stdc/time.d)
semantic  betterC
/usr/lib/ldc/x86_64-linux-gnu/include/d/core/stdc/time.d(151): 
Error: undefined identifier time_t, did you mean function time?
/usr/lib/ldc/x86_64-linux-gnu/include/d/core/stdc/time.d(151): 
Error: undefined identifier time_t, did you mean function time?
/usr/lib/ldc/x86_64-linux-gnu/include/d/core/stdc/time.d(153): 
Error: undefined identifier time_t, did you mean function time?
/usr/lib/ldc/x86_64-linux-gnu/include/d/core/stdc/time.d(153): 
Error: undefined identifier tm
```



More information about the Digitalmars-d-learn mailing list