RFC: JamVM force -marm -g -O2 on ARM Linux.
rob.lougher at gmail.com
Fri Mar 11 04:46:12 PST 2011
On 11 March 2011 12:27, Xerxes Rånby <xerxes at zafena.se> wrote:
> On 2011-03-11 12:56, Matthias Klose wrote:
>> On 11.03.2011 12:52, Xerxes Rånby wrote:
>>> JamVM currently fail to run on ARM Linux systems where gcc by default optimize for Thumb2.
>>> This can be fixed by overriding the JamVM CFLAGS to skip thumb by enforcing the use of -marm -g -O2 .
>> would CFLAGS="$CFLAGS -marm" work too?
> The idea are good!
> But it will not work because running with optimization -O2 are required for the inlining JIT to operate see:
> In my patch I had to explicitly add -O2 to the CFLAGS as well because -O2 are normally only implicit added by configure when CFLAGS are undefined.
> CFLAGS="$CFLAGS -marm -g -O2"
> do work
I've been unwell for a few days, so apologies for my recent silence.
I believe it's only the interpreter which needs to be built as ARM.
There is already a need to set a flag for the interpreter
(interp_cflags) so this might work:
arm*-*-linux*) host_cpu=arm host_os=linux interp_cflags=-marm ;;
The place where interp_cflags is currently set (line 180,
enable_int_inlining) will also need to be changed to:
Assuming it is only the interpreter that needs ARM, this should work.
However, I'm unable to test this until tonight at the earliest.
More information about the distro-pkg-dev