generic-poky/meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch
Hongxu Jia 2e13f27e38 elfutils: upgrade to 0.160
- Upgrade elfutils to 0.160

- Move 0.148 patches from elfutils to elfutils-0.148

- Drop 0.158 patches that got from debain, so far debian
  doesn't provide patches for 0.160 (the latest is 0.159)

- Move fixheadercheck.patch from 0.159 to 0.160

- We choose to use 0.159 patches from debian for the current 0.160
  which located in elfutils-0.160
  1) Rebase the following patches from 0.159 to 0.160
     hppa_backend.diff
     arm_backend.diff
     mips_backend.diff
     m68k_backend.diff
     arm_func_value.patch
     arm_unwind_ret_mask.patch

  2) Rebase redhat-portability.diff according to
     commit 52a6d20519
     Author: Roxana Ciobanu <roxana.ciobanu@intel.com>
     Date:   Tue Jul 1 17:17:00 2014 +0300
       elfutils/elfutils-native: Fix patching generated files

  3) Drop the following patches which have already beem merged to 0.160
     arm_unsupported.patch
     arm_syscall.patch
     unaligned.patch
     aarch64-run-native-test-fix.patch

(From OE-Core rev: 74b191022494fc1d357c1f05dbce38c986bed365)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-25 13:03:28 +00:00

74 lines
3 KiB
Diff

Upstream-Status: pending
gcc 4.7 does not like pointer conversion, so have a void * tmp var to work
around following compilation issue.
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
2011/07/07
| md5.c: In function 'md5_finish_ctx':
| md5.c:108:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| md5.c:109:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| cc1: all warnings being treated as errors
|
| make[2]: *** [md5.o] Error 1
| make[2]: *** Waiting for unfinished jobs....
| sha1.c: In function 'sha1_finish_ctx':
| sha1.c:109:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| sha1.c:111:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| cc1: all warnings being treated as errors
|
| make[2]: *** [sha1.o] Error 1
Index: elfutils-0.148/lib/md5.c
===================================================================
--- elfutils-0.148.orig/lib/md5.c
+++ elfutils-0.148/lib/md5.c
@@ -95,6 +95,7 @@ md5_finish_ctx (ctx, resbuf)
/* Take yet unprocessed bytes into account. */
md5_uint32 bytes = ctx->buflen;
size_t pad;
+ void * tmp;
/* Now count remaining bytes. */
ctx->total[0] += bytes;
@@ -105,9 +106,10 @@ md5_finish_ctx (ctx, resbuf)
memcpy (&ctx->buffer[bytes], fillbuf, pad);
/* Put the 64-bit file length in *bits* at the end of the buffer. */
- *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3);
- *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) |
- (ctx->total[0] >> 29));
+ tmp = &ctx->buffer[bytes + pad];
+ *(md5_uint32 *) tmp = SWAP (ctx->total[0] << 3);
+ tmp = &ctx->buffer[bytes + pad + 4];
+ *(md5_uint32 *) tmp = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29));
/* Process last bytes. */
md5_process_block (ctx->buffer, bytes + pad + 8, ctx);
Index: elfutils-0.148/lib/sha1.c
===================================================================
--- elfutils-0.148.orig/lib/sha1.c
+++ elfutils-0.148/lib/sha1.c
@@ -96,6 +96,7 @@ sha1_finish_ctx (ctx, resbuf)
/* Take yet unprocessed bytes into account. */
sha1_uint32 bytes = ctx->buflen;
size_t pad;
+ void * tmp;
/* Now count remaining bytes. */
ctx->total[0] += bytes;
@@ -106,9 +107,10 @@ sha1_finish_ctx (ctx, resbuf)
memcpy (&ctx->buffer[bytes], fillbuf, pad);
/* Put the 64-bit file length in *bits* at the end of the buffer. */
- *(sha1_uint32 *) &ctx->buffer[bytes + pad] = SWAP ((ctx->total[1] << 3) |
- (ctx->total[0] >> 29));
- *(sha1_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP (ctx->total[0] << 3);
+ tmp = &ctx->buffer[bytes + pad];
+ *(sha1_uint32 *) tmp = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29));
+ tmp = &ctx->buffer[bytes + pad + 4];
+ *(sha1_uint32 *) tmp = SWAP (ctx->total[0] << 3);
/* Process last bytes. */
sha1_process_block (ctx->buffer, bytes + pad + 8, ctx);