[Vm-dev] Compiling squeak.cog.spur on Pi

Eliot Miranda eliot.miranda at gmail.com
Fri Jun 24 18:09:39 UTC 2016


Here are useful extracts of messages from Ryan Macnak on the topic.  They imply to me the need for separate v6/Pi and v7/Android builds.

On Feb 11, 2016, at 7:43 PM, Ryan Macnak <rmacnak at gmail.com> wrote:

4) The build is broken on Linux ARMv7 (i.e., everyone but Raspbian). The build fails in the configure step because it includes "-march=armv6 -mfpu=vfp -mfloat-abi=hard" in the compiler flags. This is not a valid configuration for a gcc built to target ARMv7. Removing this from mvm fixes the build. I don't have commit access to the Subversion repository, but someone who does should revert r3410.

On Feb 13, 2016, at 11:21 AM, Ryan Macnak <rmacnak at gmail.com> wrote:

(Eliot: What is a valid base architecture for Linux ARMv7?)

Rasbian:
  gcc -march=armv6 -mfpu=vfp -mfloat-abi=hard a.c OK
  gcc -march=armv7 -mfpu=vfp -mfloat-abi=hard a.c ERROR
  gcc a.c OK

Debian armhf:
  gcc -march=armv6 -mfpu=vfp -mfloat-abi=hard a.c ERROR
  gcc -march=armv7 -mfpu=vfp -mfloat-abi=hard a.c OK
  gcc a.c OK

An annoying property of ARM toolchains, which probably comes from ARM being used for embedded systems instead of desktops, is they come with a lot the options already backed in. They aren't like the x86 toolchains, where one can compile to support the latest systems and systems before SSE just by setting some flags. With ARM one has to rely on using an appropriate toolchain.

ARM doesn't have great backwards compatibility either. I've tried running an ARMv6 compiled Cog on an ARMv8 board, and it crashes because the VM includes a memory fence instruction that is deprecated and has a replacement in ARMv7 and optionally (and in practice) disabled in ARMv8. So it doesn't look like one can provide a single binary that supports ARMv6-8. Again the embedded systems mentality that one builds for a specific device.



More information about the Vm-dev mailing list