On Wed, Apr 28, 2010 at 11:19:27PM +0200, Matthias Kilian wrote: > On Wed, Apr 28, 2010 at 09:16:33AM -0700, Ian Lynagh wrote: > > Wed Apr 28 08:07:00 PDT 2010 Ian Lynagh <[email protected]> > > * Fix some cpp warnings when building on FreeBSD; patch from Gabor PALI > > > > M ./rts/Linker.c +8 > > WHat exactly does this fix? I've some similar patch around for some > time, but it #ifdef's the whole ELF stuff out (for OpenBSD). > > Can you show me the warnings you get without it?
http://darcs.haskell.org/ghcBuilder/builders/pgj2/13/8.html says "inplace/bin/ghc-stage1" -optc-Wall -optc-Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs -optc-Wredundant-decls -optc-Iincludes -optc-Irts -optc-DCOMPILING_RTS -optc-fno-strict-aliasing -optc-fno-common -optc-DBE_CONSERVATIVE -optc-Ilibffi/build/include -optc-fomit-frame-pointer -optc-DRtsWay=\"rts_v\" -H32m -O -Iincludes -Irts -DCOMPILING_RTS -package-name rts -dcmm-lint -Ilibffi/build/include -i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen -optc-O2 -c rts/Linker.c -o rts/dist/build/Linker.o rts/Linker.c: In function 'internal_dlopen': rts/Linker.c:1256:0: warning: assignment discards qualifiers from pointer target type rts/Linker.c:2956:1: warning: "ELF_ST_TYPE" redefined In file included from /usr/include/machine/elf.h:42, from /usr/include/elf.h:37, from rts/Linker.c:2927:0: /usr/include/sys/elf_generic.h:85:1: warning: this is the location of the previous definition rts/Linker.c:2957:1: warning: "ELF_ST_BIND" redefined /usr/include/sys/elf_generic.h:84:1: warning: this is the location of the previous definition rts/Linker.c:2958:1: warning: "ELF_R_TYPE" redefined /usr/include/sys/elf_generic.h:82:1: warning: this is the location of the previous definition rts/Linker.c:2959:1: warning: "ELF_R_SYM" redefined /usr/include/sys/elf_generic.h:81:1: warning: this is the location of the previous definition > And could you try to > wrap the whole ELF stuff within something like an #ifdef Elf_Addr? That > would be much more sane, IMHO. If there's a better way to do this, let's change. > Just #ifdef'ing out some lines that produce warnings (and not > mentioning any details in the log message) sounds like removing > warnings for the sake of removing warnings. If warnings are the norm, then warnings don't help you find bugs. Thanks Ian _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
