GCC 4.3 build

8 views
Skip to first unread message

Seo Sanghyeon

unread,
Sep 2, 2008, 4:25:50 PM9/2/08
to v8-dev
Hello, everybody,

I had to do the following to build V8 on Debian unstable, with GCC
4.3.

$ scons -j2 sample=shell

Resulting shell calculated 1+1. That's all for now.

Index: src/objects-inl.h
===================================================================
--- src/objects-inl.h (revision 110)
+++ src/objects-inl.h (working copy)
@@ -246,7 +246,7 @@
}


-template <> static inline bool Is<JSFunction>(Object* obj) {
+template <> inline bool Is<JSFunction>(Object* obj) {
return obj->IsJSFunction();
}

@@ -293,7 +293,7 @@
}


-template <> static inline bool Is<JSArray>(Object* obj) {
+template <> inline bool Is<JSArray>(Object* obj) {
return obj->IsJSArray();
}

Index: SConstruct
===================================================================
--- SConstruct (revision 110)
+++ SConstruct (working copy)
@@ -89,7 +89,7 @@
'gcc': {
'all': {
'CXXFLAGS': [], #['-fvisibility=hidden'],
- 'WARNINGFLAGS': ['-pedantic', '-Wall', '-Werror', '-W',
+ 'WARNINGFLAGS': ['-pedantic', '-Wall', '-W',
'-Wno-unused-parameter']
},
'arch:arm': {

kodand...@gmail.com

unread,
Sep 2, 2008, 5:49:25 PM9/2/08
to v8-dev
The warning is:
src/platform-linux.cc:304: error: array subscript is above array
bounds

kodand...@gmail.com

unread,
Sep 2, 2008, 6:15:30 PM9/2/08
to v8-dev
To get rid of the warning, I suggest:

Index: src/platform-linux.cc
===================================================================
--- src/platform-linux.cc (revision 110)
+++ src/platform-linux.cc (working copy)
@@ -295,7 +295,7 @@
int bytes_read = -1;
do {
bytes_read++;
- if (bytes_read > MAP_LENGTH - 1)
+ if (bytes_read >= MAP_LENGTH - 1)
break;
int result = read(fd, buffer + bytes_read, 1);
// A read error means that -1 is returned.
Reply all
Reply to author
Forward
0 new messages