> @Karel Gardas and anyone else who is playing with the newest upstream
> ghc (8.x): If you have some time, could you please try to build
> some hs-programs or libraries for which naddy@ reported w^x violations
> recently with ghc-8 (and probably cabal-install, because I don't
> think this will work with the hs-libraries we currently have in the
> ports tree)? I'd owe you unlimited amounts of beer for such a test,
> of course ;-)

:-) Beer is nothing for me, but anyway test done. First of all what
Martijn is seeing here is not ghc failure perse, but ghci failure. I
smell TH usage here probably. Anyway, GHC head is still buildable by
GHC 7.10.3, the obvious problem is that GHCi fails:

$ ./inplace/bin/ghc-stage2 --interactive
GHCi, version 8.1.20160812: http://www.haskell.org/ghc/  :? for help
Abort trap (core dumped)

if I try to build it with -Wl,-zwxneeded, then I get strange binary:

$ readelf -l ./ghc/stage2/build/tmp/ghc-stage2

Elf file type is DYN (Shared object file)
Entry point 0x440
There are 11 program headers, starting at offset 64

Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  PHDR           0x0000000000000040 0x0000000000000040 0x0000000000000040
                 0x0000000000000348 0x0000000000000348  R E    8
  INTERP         0x00000000000c325e 0x00000000001c325e 0x00000000001c325e
                 0x0000000000000013 0x0000000000000013  R      1
      [Requesting program interpreter: /usr/libexec/ld.so]
  LOAD           0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x00000000000c325e 0x00000000000c325e  R E    100000
  LOAD           0x00000000000c325e 0x00000000001c325e 0x00000000001c325e
                 0x000000000003e0ae 0x000000000003e0ae  R      100000
  LOAD           0x0000000000102180 0x0000000000302180 0x0000000000302180
                 0x0000000000036998 0x00000000000369e0  RW     100000
  DYNAMIC        0x0000000000132bf0 0x0000000000332bf0 0x0000000000332bf0
                 0x0000000000000360 0x0000000000000360  RW     8
  NOTE           0x00000000000c3274 0x00000000001c3274 0x00000000001c3274
                 0x0000000000000018 0x0000000000000018  R      4
  GNU_EH_FRAME   0x000000000010114c 0x000000000020114c 0x000000000020114c
                 0x000000000000005c 0x000000000000005c  R      4
  GNU_STACK      0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000000000 0x0000000000000000  RWE    8
  OPENBSD_WXNEED 0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000000000 0x0000000000000000    E    8
  GNU_RELRO      0x0000000000102180 0x0000000000302180 0x0000000000302180
                 0x0000000000032e80 0x0000000000032e80  R      1

 Section to Segment mapping:
  Segment Sections...
   00
   01     .interp
   02     .init .plt .text .fini
   03     .interp .note.openbsd.ident .hash .dynsym .dynstr .rela.dyn
.rela.plt .rodata .eh_frame_hdr .eh_frame
   04     .jcr .data.rel.ro .dynamic .ctors .dtors .got .data .bss
   05     .dynamic
   06     .note.openbsd.ident
   07     .eh_frame_hdr
   08
   09
   10     .jcr .data.rel.ro .dynamic .ctors .dtors .got
$ ./ghc/stage2/build/tmp/ghc-stage2
./ghc/stage2/build/tmp/ghc-stage2[1]: syntax error: `)' unexpected
$ file ./ghc/stage2/build/tmp/ghc-sa   tage2
./ghc/stage2/build/tmp/ghc-stage2: ELF 64-bit LSB shared object,
x86-64, version 1


Have anybody here seen this already? The system is:

OpenBSD 6.0-current (GENERIC.MP) #0: Fri Aug 12 22:41:37 CEST 2016

Cheers,
Karel

Reply via email to