summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2015-11-19 12:54:54 +0100
committerBen Gamari <ben@smart-cactus.org>2015-11-19 13:24:33 +0100
commit65d7ff06573f8c55ec98b43059f7abffae79d8c3 (patch)
tree03081a264ec491d1127845186193515554a87195 /includes
parent3e2a4eefbed7002437c3f3ee340832a42f0b37f8 (diff)
downloadhaskell-65d7ff06573f8c55ec98b43059f7abffae79d8c3.tar.gz
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
Diffstat (limited to 'includes')
-rw-r--r--includes/ghc.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/ghc.mk b/includes/ghc.mk
index 06f4912cf4..e87a4874cf 100644
--- a/includes/ghc.mk
+++ b/includes/ghc.mk
@@ -187,6 +187,10 @@ INSTALL_LIBS += $(includes_GHCCONSTANTS_HASKELL_VALUE)
DERIVE_CONSTANTS_FLAGS += --gcc-program "$(WhatGccIsCalled)"
DERIVE_CONSTANTS_FLAGS += $(addprefix --gcc-flag$(space),$(includes_CC_OPTS) -fcommon)
DERIVE_CONSTANTS_FLAGS += --nm-program "$(NM)"
+ifneq "$(OBJDUMP)" ""
+DERIVE_CONSTANTS_FLAGS += --objdump-program "$(OBJDUMP)"
+endif
+DERIVE_CONSTANTS_FLAGS += --target-os "$(TargetOS_CPP)"
ifneq "$(BINDIST)" "YES"
$(includes_DERIVEDCONSTANTS): $$(includes_H_CONFIG) $$(includes_H_PLATFORM) $$(includes_H_VERSION) $$(includes_H_FILES) $$(rts_H_FILES)