diff options
author | Ian Lynagh <igloo@earth.li> | 2011-06-24 20:51:13 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-06-25 19:16:32 +0100 |
commit | 0a6f26f6d29c8762b254e2f1040fce5c3571feea (patch) | |
tree | 6706444dab64cb0c2d6143ecb17db0e9ca2fc0cd /rts/Linker.c | |
parent | 12b93887fd8b6a185b1bff994c865c897d22a6a6 (diff) | |
download | haskell-0a6f26f6d29c8762b254e2f1040fce5c3571feea.tar.gz |
Fix gcc 4.6 warnings; fixes #5176
Based on a patch from David Terei.
Some parts are a little ugly (e.g. defining things that only ASSERTs
use only when DEBUG is defined), so we might want to tweak things a
little.
I've also turned off -Werror for didn't-inline warnings, as we now
get a few such warnings.
Diffstat (limited to 'rts/Linker.c')
-rw-r--r-- | rts/Linker.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/rts/Linker.c b/rts/Linker.c index b60898eb4e..6d29ce7409 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -1190,11 +1190,15 @@ initLinker( void ) compileResult = regcomp(&re_invalid, "(([^ \t()])+\\.so([^ \t:()])*):([ \t])*(invalid ELF header|file too short)", REG_EXTENDED); - ASSERT( compileResult == 0 ); + if (compileResult != 0) { + barf("Compiling re_invalid failed"); + } compileResult = regcomp(&re_realso, "(GROUP|INPUT) *\\( *(([^ )])+)", REG_EXTENDED); - ASSERT( compileResult == 0 ); + if (compileResult != 0) { + barf("Compiling re_realso failed"); + } # endif #if !defined(ALWAYS_PIC) && defined(x86_64_HOST_ARCH) @@ -4124,10 +4128,14 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, Elf_Addr P = ((Elf_Addr)targ) + offset; Elf_Word* pP = (Elf_Word*)P; +#if defined(i386_HOST_ARCH) || defined(DEBUG) Elf_Addr A = *pP; +#endif Elf_Addr S; void* S_tmp; +#ifdef i386_HOST_ARCH Elf_Addr value; +#endif StgStablePtr stablePtr; StgPtr stableVal; @@ -4171,7 +4179,9 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC, (void*)P, (void*)S, (void*)A )); checkProddableBlock ( oc, pP ); +#ifdef i386_HOST_ARCH value = S + A; +#endif switch (ELF_R_TYPE(info)) { # ifdef i386_HOST_ARCH |