www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Build for i586

reply Alexander Zhirov <azhirov1991 gmail.com> writes:
Colleagues, I ask you to help in finding a solution. More details 
[here](https://forum.dlang.org/thread/hqvzhixzwjeiylzmnvcf forum.dlang.org) and
[here](https://github.com/ldc-developers/ldc/issues/4013).

In short: I have a PC based on the `Geode LX800` processor 
(`i586`). Everything I'm trying to compile (`dmd`/`ldc`) is all 
going under `i686` and when I start, **Illegal instruction** 
crashes. The problem is that I need to build a program 
specifically for `i586`. No variations of the `-mcpu` flag help. 
I have already tried to build compilers on the target machine - 
they are going, but everything they compile also gives **Illegal 
instruction**.

On 
[github](https://github.com/ldc-developers/ldc/issues/4013#issue
omment-1197990755), I was offered to use `ldc-build-runtime`, but I have no
idea how to build with it.

Ideally, you need to build a `ldc` compiler on the target machine 
in order to use it to compile programs for the same machine.

I have already compiled `ldc` and `dmd` on the target machine, 
they compile, but everything I collect through them gives me 
**Illegal instruction**. I ask for help.
Jul 28 2022
next sibling parent max haughton <maxhaton gmail.com> writes:
On Thursday, 28 July 2022 at 12:40:50 UTC, Alexander Zhirov wrote:
 Colleagues, I ask you to help in finding a solution. More 
 details 
 [here](https://forum.dlang.org/thread/hqvzhixzwjeiylzmnvcf forum.dlang.org)
and [here](https://github.com/ldc-developers/ldc/issues/4013).

 [...]
Which instruction?
Jul 28 2022
prev sibling parent Alexander Zhirov <azhirov1991 gmail.com> writes:
On Thursday, 28 July 2022 at 12:40:50 UTC, Alexander Zhirov wrote:
 Colleagues, I ask you to help in finding a solution. More 
 details 
 [here](https://forum.dlang.org/thread/hqvzhixzwjeiylzmnvcf forum.dlang.org)
and [here](https://github.com/ldc-developers/ldc/issues/4013).
**[SOLVED](https://forum.dlang.org/post/nzbvirnbjxzvjcqdxpnd forum.dlang.org)**
Jul 29 2022