On Wed, Apr 28, 2010 at 10:50:39PM +0100, Ian Lynagh wrote:
> > 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.

Give me some days, please. I think it's possible to get all the ELF
#defines from system headers (which differ slightly between operating
systems but should be available anyway).

I can test on OpenBSD and from a `borrowed' Debian Lenny, and I can
at least check the header from FreeBSD, NetBSD and MacOS X (well,
the latter one rather outdated). But I don't have any access to a
solaris machine, so I'll need a little bit help here.

> > 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.

Fair bet.

Ciao,
        Kili

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to