You need to build with the -fno-strict-aliasing option.  I don't know
a good way to get scons to autodetect gcc-4.4.x and switch it on by
default.  There's something in the SConstruct file to detect gcc-4.4
but either it doesn't work or it doesn't trigger for gcc-4.4.1.  I'm
not good enough with scons to understand this.  Prepending it to your
scons command line like so

CCFLAGS=-fno-strict-aliasing scons

should work.  Alternatively you can edit V8's scons file to add it
along with -O3 as a gcc option.

I realize we need a real solution to this.

2009/11/22 slowpoison <[email protected]>:
>
> On Nov 21, 5:15 pm, Erik Corry <[email protected]> wrote:
>> It would be interesting to run
>>
>> gdb --args chromium/chromium/src/out/Debug/mksnapshot"
>> "/home/vish/work/chromium/
>> chromium/src/out/Debug/obj.target/geni/snapshot.cc"
>
> src> gdb --args out/Debug/mksnapshot "/home/vish/work/chromium/
> chromium/src/out/Debug/obj.target/geni/snapshot.cc"
> GNU gdb (GDB) 7.0-ubuntu
> Copyright (C) 2009 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/
> gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show
> copying"
> and "show warranty" for details.
> This GDB was configured as "i486-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from /home/vish/work/chromium/chromium/src/out/Debug/
> mksnapshot...done.
> (gdb) r
> Starting program: /home/vish/work/chromium/chromium/src/out/Debug/
> mksnapshot /home/vish/work/chromium/chromium/src/out/Debug/obj.target/
> geni/snapshot.cc
> [Thread debugging using libthread_db enabled]
>
> Program received signal SIGILL, Illegal instruction.
> 0x081bfc35 in v8::internal::OS::TimeCurrentMillis ()
>    at v8/src/platform-posix.cc:82
> 82               (static_cast<double>(tv.tv_usec) / 1000);
> (gdb) wher
> #0  0x081bfc35 in v8::internal::OS::TimeCurrentMillis ()
>    at v8/src/platform-posix.cc:82
> #1  0x081bdf5d in v8::internal::OS::Setup () at v8/src/platform-
> linux.cc:82
> #2  0x081655d7 in v8::internal::V8::Initialize (des=0x0) at v8/src/
> v8.cc:64
> #3  0x080560f9 in v8::V8::Initialize () at v8/src/api.cc:2640
> #4  0x0804cb99 in EnsureInitialized (location=0x8224e9d
> "v8::Context::New()")
>    at v8/src/api.cc:219
> #5  0x08056353 in v8::Context::New (extensions=0x0,
> global_template=...,
>    global_object=...) at v8/src/api.cc:2696
> #6  0x0804ada1 in main (argc=2, argv=0xbffffc14) at v8/src/
> mksnapshot.cc:153
>
>>
>> and find out what the illegal instruction was.  This could be a
>> compiler issue (are you on gcc-4.4?) or it could be a genuine illegal
>> instruction issue.  I don't think V8 gets much testing on such old
>> CPUs.
>
> Yes.
>
> src> gcc --version
> gcc (Ubuntu 4.4.1-4ubuntu8) 4.4.1
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to