Hi all,

I'm porting v8 to a custom OS running on ARM hardware. My general
strategy for this is to stub out all the OS calls, and then implement
them as needed. Luckily for v8, it looks like you already have the
platform-nullos.cc for this exact purpose. Unfortunately is seems to
have fallen into some disrepair, so I'm working on getting it fixed.
This is relatively straight forward, I hope to have finished patches
available soon.

The point of this email is that in doing so I hit some compile errors
which I'm not sure how best to fix. I'm compiling like so:

nirvana:v8% CXX=arm-none-eabi-g++ CC=arm-none-eabi-gcc scons os=nullos
arch=arm

The compiler version is G++ form codesourcery:

nirvana:v8% arm-none-eabi-gcc --version
arm-none-eabi-gcc (Sourcery G++ Lite 2008q3-66) 4.3.2

The error I get is:

arm-none-eabi-g++ -o obj/release/accessors.o -c -Wall -Werror -W -Wno-
unused-parameter \
  -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -
DNULLOS -fno-rtti \
  -fno-exceptions -DNULLOS -Wall -Werror -W -Wno-unused-parameter -O3
  -fomit-frame-pointer -fdata-sections -ffunction-sections \
  -DNULLOS -DV8_TARGET_ARCH_ARM -DENABLE_LOGGING_AND_PROFILING \
  -Isrc src/accessors.cc
cc1plus: warnings being treated as errors

In file included from src/v8.h:71,
                 from src/accessors.cc:28:
src/objects-inl.h: In member function 'bool
v8::internal::Code::is_inline_cache_stub()':
src/objects-inl.h:1947: error: comparison is always true due to
limited range of data type


So, strictly I just get a warning, but as warnings are treated as
errors (a good thing!) it aborts the build. (My current workaround is
to disable -Werror, but that isn't a good idea for the long term).


The line of code in question is this:

bool Code::is_inline_cache_stub() {
  Kind kind = this->kind();
  return kind >= FIRST_IC_KIND && kind <= LAST_IC_KIND;    <--- This
is the error
}

Has anyone seen this before? I had originally thought that this was
acceptable but redundant code, but now to be honest, it appears like
it could be a compiler error. In any case, if anyone has seen this
before, I'd appreciate any insight.

Cheers,

Benno
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to