Thread overview
How to cross build a RISC-V target betterC code using LDC on x86-64 machine
Jun 06, 2021
lili
Jun 06, 2021
Alain De Vos
Jun 07, 2021
Kagamin
June 06, 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
June 06, 2021

I see the same error.

June 07, 2021

https://forum.dlang.org/post/koxqrqqzadfefbgkdgqn@forum.dlang.org