Building for ARM 32-bit embedded
Bonsaipanda
jukka.korhonen at gmail.com
Fri Oct 11 23:38:37 UTC 2024
As a quick example, this is the output when building for armhf
from Ubuntu >>
```
$ ldc2 -mtriple=armv6-linux-gnueabihf
-gcc=arm-linux-gnueabihf-gcc -betterC test.d
/usr/lib/ldc/x86_64-linux-gnu/include/d/std/stdio.d(4362): Error:
none of the overloads of template
`std.stdio.File.LockingTextWriter.put` are callable using
argument types `!()(string)`
/usr/lib/ldc/x86_64-linux-gnu/include/d/std/stdio.d(3287):
Candidates are: `put(A)(scope A writeme)`
with `A = string`
must satisfy one of the following constraints:
` isSomeChar!(ElementType!A)
is(ElementType!A : const(ubyte))`
/usr/lib/ldc/x86_64-linux-gnu/include/d/std/stdio.d(3317):
`put(C)(scope C c)`
with `C = string`
must satisfy one of the following constraints:
` isSomeChar!C
is(C : const(ubyte))`
/usr/lib/ldc/x86_64-linux-gnu/include/d/std/stdio.d(3338): Error:
none of the overloads of template `std.utf.decodeFront` are
callable using argument types `!()(char[])`
/usr/lib/ldc/x86_64-linux-gnu/include/d/std/utf.d(1245):
Candidates are: `decodeFront(Flag useReplacementDchar =
No.useReplacementDchar, S)(ref S str, out size_t numCodeUnits)`
/usr/lib/ldc/x86_64-linux-gnu/include/d/std/utf.d(1285):
`decodeFront(Flag useReplacementDchar =
No.useReplacementDchar, S)(ref scope S str, out size_t
numCodeUnits)`
/usr/lib/ldc/x86_64-linux-gnu/include/d/std/utf.d(1314):
`decodeFront(Flag useReplacementDchar =
No.useReplacementDchar, S)(ref S str)`
with `useReplacementDchar = Flag.no,
S = char[]`
must satisfy the following constraint:
` isInputRange!S`
/usr/lib/ldc/x86_64-linux-gnu/include/d/std/utf.d(2311): Error:
cannot use `throw` statements with -betterC
/usr/lib/ldc/x86_64-linux-gnu/include/d/std/utf.d(2514): Error:
template instance `std.utf._utfException!Flag.no` error
instantiating
/usr/lib/ldc/x86_64-linux-gnu/include/d/std/stdio.d(3340):
instantiated from here: `encode!Flag.no`
/usr/lib/ldc/x86_64-linux-gnu/include/d/std/stdio.d(4364):
instantiated from here: `put!char`
test.d(3): instantiated from here: `writeln!string`
```
If I didn't have CG to ask from, I wouldn't have had any idea
what was happening and why are x86-64 components being called. I
would even argue that it's LDC's job to make sure stuff, that the
program is dependent on, gets built at the same time for the
target. And I still don't understand why (core components?) like
D runtime and Phobos are external libraries. But, such is life.
More information about the digitalmars-d-ldc
mailing list