Skip to content

Fix build for Jenkins and GCC 4.7. #347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 9, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions build/configs/toolchain_linux_armv7l-el.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ set(CMAKE_SYSTEM_PROCESSOR armv7l-el)

set(CMAKE_C_COMPILER arm-linux-gnueabi-gcc)
set(CMAKE_CXX_COMPILER arm-linux-gnueabi-g++)
# FIXME: This could break cross compilation, when the strip is not for the target architecture
find_program(CMAKE_STRIP NAMES arm-linux-gnueabi-strip strip)

set(FLAGS_COMMON_ARCH -mlittle-endian -mthumb)
3 changes: 2 additions & 1 deletion build/configs/toolchain_linux_armv7l-hf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ set(CMAKE_SYSTEM_PROCESSOR armv7l-hf)

set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)

# FIXME: This could break cross compilation, when the strip is not for the target architecture
find_program(CMAKE_STRIP NAMES arm-linux-gnueabihf-strip strip)
#
# Limit fpu to VFPv3 with d0-d15 registers
#
Expand Down
14 changes: 7 additions & 7 deletions jerry-core/lit/lit-strings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,10 +555,10 @@ lit_read_code_point_from_utf8 (const lit_utf8_byte_t *buf_p, /**< buffer with ch
{
JERRY_ASSERT (buf_p && buf_size);

lit_utf8_byte_t c = (uint8_t) buf_p[0];
lit_utf8_byte_t c = buf_p[0];
if ((c & LIT_UTF8_1_BYTE_MASK) == LIT_UTF8_1_BYTE_MARKER)
{
*code_point = (uint32_t) (c & LIT_UTF8_LAST_7_BITS_MASK);
*code_point = (lit_code_point_t) (c & LIT_UTF8_LAST_7_BITS_MASK);
return 1;
}

Expand All @@ -567,17 +567,17 @@ lit_read_code_point_from_utf8 (const lit_utf8_byte_t *buf_p, /**< buffer with ch
if ((c & LIT_UTF8_2_BYTE_MASK) == LIT_UTF8_2_BYTE_MARKER)
{
bytes_count = 2;
ret = ((uint32_t) (c & LIT_UTF8_LAST_5_BITS_MASK));
ret = ((lit_code_point_t) (c & LIT_UTF8_LAST_5_BITS_MASK));
}
else if ((c & LIT_UTF8_3_BYTE_MASK) == LIT_UTF8_3_BYTE_MARKER)
{
bytes_count = 3;
ret = ((uint32_t) (c & LIT_UTF8_LAST_4_BITS_MASK));
ret = ((lit_code_point_t) (c & LIT_UTF8_LAST_4_BITS_MASK));
}
else if ((c & LIT_UTF8_4_BYTE_MASK) == LIT_UTF8_4_BYTE_MARKER)
{
bytes_count = 4;
ret = ((uint32_t) (c & LIT_UTF8_LAST_3_BITS_MASK));
ret = ((lit_code_point_t) (c & LIT_UTF8_LAST_3_BITS_MASK));
}
else
{
Expand Down Expand Up @@ -608,8 +608,8 @@ lit_utf8_string_calc_hash_last_bytes (const lit_utf8_byte_t *utf8_buf_p, /**< ch
{
JERRY_ASSERT (utf8_buf_p != NULL);

lit_utf8_byte_t byte1 = (utf8_buf_size > 0) ? utf8_buf_p[utf8_buf_size - 1] : 0;
lit_utf8_byte_t byte2 = (utf8_buf_size > 1) ? utf8_buf_p[utf8_buf_size - 2] : 0;
lit_utf8_byte_t byte1 = (utf8_buf_size > 0) ? utf8_buf_p[utf8_buf_size - 1] : (lit_utf8_byte_t) 0;
lit_utf8_byte_t byte2 = (utf8_buf_size > 1) ? utf8_buf_p[utf8_buf_size - 2] : (lit_utf8_byte_t) 0;

uint32_t t1 = (uint32_t) byte1 + (uint32_t) byte2;
uint32_t t2 = t1 * 0x24418b66;
Expand Down