Make `derivedConstants` more crosscompile-friendly
authorHerbert Valerio Riedel <hvr@gnu.org>
Thu, 19 Nov 2015 11:54:54 +0000 (12:54 +0100)
committerBen Gamari <ben@smart-cactus.org>
Thu, 19 Nov 2015 12:24:33 +0000 (13:24 +0100)
commit65d7ff06573f8c55ec98b43059f7abffae79d8c3
tree03081a264ec491d1127845186193515554a87195
parent3e2a4eefbed7002437c3f3ee340832a42f0b37f8
Make `derivedConstants` more crosscompile-friendly

`derivedConstants` currently uses `System.Info.os` for decisions (which
doesn't necessarily reflect the build-target), as well as hardcoding
"/usr/bin/objdump" for openbsd.

This patch auto-detects `objdump` similiar to how `nm` is detected via
Autoconf as well as passing the target-os into `derivedConstants` via
commandline.

Reviewers: austin, kgardas, erikd, bgamari

Reviewed By: kgardas, erikd, bgamari

Subscribers: kgardas, thomie, erikd

Differential Revision: https://phabricator.haskell.org/D1499
configure.ac
includes/ghc.mk
utils/deriveConstants/Main.hs