diff --git a/build.sh b/build.sh index 5e42408..e0dfd70 100755 --- a/build.sh +++ b/build.sh @@ -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" diff --git a/patches/cctools-ld64-abs-warning.patch b/patches/cctools-ld64-abs-warning.patch new file mode 100644 index 0000000..4ebf025 --- /dev/null +++ b/patches/cctools-ld64-abs-warning.patch @@ -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. */