Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove hsc2hs monkey-patching #84

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions EHC/ehclib/files2.mk
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,7 @@ $(EHCLIB_CHS_ALL_DRV_HS): $(EHCLIB_BLD_VARIANT_ASPECTS_PREFIX)%.hs: $(EHCLIB_SRC
# we only apply the patch on platforms where HSC2HS_EXTRA is specified, otherwise we use the original method
$(EHCLIB_HSC_ALL_DRV_HS): $(EHCLIB_BLD_VARIANT_ASPECTS_PREFIX)%.hs: $(EHCLIB_SRC_PREFIX)%.hsc
mkdir -p $(@D) && \
if grep -q 'HSC2HS_EXTRA' $(HSC2HS) ;\
then \
sed -e 's/^HSC2HS_EXTRA=.*$$/HSC2HS_EXTRA=/' < $(HSC2HS) > $(EHCLIB_BLD_VARIANT_ASPECTS_PREFIX)hsc2hs && chmod +x $(EHCLIB_BLD_VARIANT_ASPECTS_PREFIX)hsc2hs && \
$(EHCLIB_BLD_VARIANT_ASPECTS_PREFIX)hsc2hs -v --output=$@ \
hsc2hs -v --output=$@ \
--include=HsFFI.h \
--cc=$(GCC) \
-D__UHC__=$(EH_VERSION_ASNUMBER) \
Expand All @@ -372,20 +369,7 @@ $(EHCLIB_HSC_ALL_DRV_HS): $(EHCLIB_BLD_VARIANT_ASPECTS_PREFIX)%.hs: $(EHCLIB_SRC
-I$(call FUN_INSTALLABS_VARIANT_INC_SHARED_PREFIX,$(EHC_VARIANT)) \
$(foreach pkg,$(EHC_PACKAGES_ASSUMED),-I$(EHCLIB_SRC_PREFIX)$(pkg)/include/) \
$(foreach pkg,$(EHC_PACKAGES_ASSUMED),-I$(call FUN_MK_PKG_INC_DIR,$(call FUN_INSTALL_PKG_PREFIX,$(call FUN_PKG_VERSIONED,$(pkg))))) \
$< ; \
else \
$(HSC2HS) -v --output=$@ --no-compile --include=HsFFI.h $< && \
$(GCC) -D__UHC__=$(EH_VERSION_ASNUMBER) \
$(RTS_GCC_CC_OPTS_VARIANT_TARGET) \
-I$(call FUN_INSTALLABS_VARIANT_INC_TARGET_PREFIX,$(EHC_VARIANT),$(EHC_VARIANT_TARGET)) \
-I$(call FUN_INSTALLABS_VARIANT_INC_SHARED_PREFIX,$(EHC_VARIANT)) \
$(foreach pkg,$(EHC_PACKAGES_ASSUMED),-I$(EHCLIB_SRC_PREFIX)$(pkg)/include/) \
$(foreach pkg,$(EHC_PACKAGES_ASSUMED),-I$(call FUN_MK_PKG_INC_DIR,$(call FUN_INSTALL_PKG_PREFIX,$(call FUN_PKG_VERSIONED,$(pkg))))) \
-o $(@:.hs=_hsc_make) \
$(@:.hs=_hsc_make.c) \
&& $(@:.hs=_hsc_make) > $@ \
&& rm -f $(@:.hs=_hsc_make.c) ; \
fi \
$< \
&& touch $@

# generate shell script for mapping package names
Expand Down