rts: fix build failure on OpenBSD (_DYNAMIC symbol collision)
ClosedPublic

Authored by trofi on Dec 18 2018, 5:19 PM.

Details

Summary

Build failure on OpenBSD-6.4 the the following:

rts/RtsSymbols.c:994:1: error:
     error: redefinition of '_DYNAMIC' as different kind of symbol
    |
994 | RTS_OPENBSD_ONLY_SYMBOLS
    | ^
RTS_OPENBSD_ONLY_SYMBOLS
^

On OpenBSD _DYNAMIC was always defined in <elf.h> headers
but used not to be included.

The change explicitly includes <elf.h> as a source of symbol definition.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

Test Plan

build-tested on OpenBSD-6.4

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
trofi created this revision.Dec 18 2018, 5:19 PM
This revision was not accepted when it landed; it landed in state Needs Review.Dec 29 2018, 4:26 PM
This revision was automatically updated to reflect the committed changes.