On 26/05/2020 05:34, David Taylor wrote:
> On 26/05/2020 00:34, druck wrote:
>> On 25/05/2020 11:50, David Taylor wrote:
>>> What happens if, on a Raspberry Pi 1B, I try to run a program with
>>> ARM7 code? Anything specific like it refuses to run it or segfaults
>>> or???
>>
>> Most compilers targetting ARMv7 produce Thumb2 code, which is a mix of
>> 16bit Thumb and 32bit ARM instructions. ARMv6 only has 32 bit ARM and
>> Thumb 1, so will probably segfault straight away.
>
> Thanks. I keep getting "illegal instruction" even when I try different
> compiler options. Compiling on the RPi 1B for running on the RPI 1B.
> Sigh!
The code you are compiling will be ARMv6 unless you explicitly tell the
compiler to do something else with -march or mcpu. What is probably
happening is you are trying to link again a pre-built ARMv7 library.
You either build everything on that machine, and make sure you have not
brought across any static or shared libraries from an ARMv7 machine.
I had the same problem when once when I copied some stuff from a Pi 2B
(ARMv7) to a Pi Zero (ARMv6).
---druck
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|