silence/fix -Wabsolute-value warnings

This commit is contained in:
Thomas Pöchtrager 2015-02-23 21:07:29 +01:00
parent aa49d95066
commit 736d20921d
2 changed files with 39 additions and 0 deletions

View File

@ -180,6 +180,7 @@ patch -p0 < $PATCH_DIR/cctools-ld64-1.patch
patch -p0 < $PATCH_DIR/cctools-ld64-2.patch
patch -p1 < $PATCH_DIR/cctools-ld64-strnlen.patch
patch -p0 < $PATCH_DIR/cctools-ld64-llvm-3.7.patch
patch -p0 < $PATCH_DIR/cctools-ld64-abs-warning.patch
echo ""
CONFFLAGS="--prefix=$TARGET_DIR --target=x86_64-apple-$TARGET"
[ -n "$DISABLE_LTO_SUPPORT" ] && CONFFLAGS+=" --enable-lto=no"

View File

@ -0,0 +1,38 @@
--- as/arm.c
+++ as/arm.c
@@ -17839,7 +17839,7 @@
{
bfd_vma insn;
bfd_vma encoded_addend;
- bfd_vma addend_abs = abs (value);
+ bfd_vma addend_abs = abs ((int)value);
/* Check that the absolute value of the addend can be
expressed as an 8-bit constant plus a rotation. */
@@ -17884,7 +17884,7 @@
#endif
{
bfd_vma insn;
- bfd_vma addend_abs = abs (value);
+ bfd_vma addend_abs = abs ((int)value);
/* Check that the absolute value of the addend can be
encoded in 12 bits. */
@@ -17927,7 +17927,7 @@
#endif
{
bfd_vma insn;
- bfd_vma addend_abs = abs (value);
+ bfd_vma addend_abs = abs ((int)value);
/* Check that the absolute value of the addend can be
encoded in 8 bits. */
@@ -17971,7 +17971,7 @@
#endif
{
bfd_vma insn;
- bfd_vma addend_abs = abs (value);
+ bfd_vma addend_abs = abs ((int)value);
/* Check that the absolute value of the addend is a multiple of
four and, when divided by four, fits in 8 bits. */