Ticket #7705: ios-patch-4b-hsc2hs-correct-options-by-stage.patch

File ios-patch-4b-hsc2hs-correct-options-by-stage.patch, 1.9 KB (added by StephenBlackheath, 2 years ago)

Bring this patch up-to-date with latest changes in master

  • mk/config.mk.in

    diff --git a/mk/config.mk.in b/mk/config.mk.in
    index 4831a7c..5e71647 100644
    a b endif 
    614620# The .hsc files aren't currently safe for cross-compilation on Windows: 
    615621#     libraries\haskeline\.\System\Console\Haskeline\Backend\Win32.hsc:160 
    616622#     directive "let" is not safe for cross-compilation 
    617 ifneq "$(Windows)" "YES" 
    618 SRC_HSC2HS_OPTS += --cross-safe 
    619 endif 
    620 SRC_HSC2HS_OPTS += $(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS) $(CONF_CC_OPTS_STAGE0))) 
    621 SRC_HSC2HS_OPTS += $(foreach d,$(GMP_INCLUDE_DIRS),-I$(d)) 
    622 ifeq "$(CrossCompiling)" "YES" 
    623 SRC_HSC2HS_OPTS += --cross-compile 
    624 endif 
     623set_hsc2hs_opts=\ 
     624      $(if $(filter $(Windows),NO),--cross-safe) \ 
     625      $(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS) $(CONF_CC_OPTS_STAGE$1))) \ 
     626      $(addprefix --lflag=,$(CONF_GCC_LINKER_OPTS_STAGE$1)) \ 
     627      $(addprefix --cflag=,$(CONF_CPP_OPTS_STAGE$1)) \ 
     628      $(foreach d,$(GMP_INCLUDE_DIRS),-I$(d)) \ 
     629      $(if $(filter $(CrossCompiling),YES),--cross-compile) 
     630SRC_HSC2HS_OPTS_STAGE0=$(call set_hsc2hs_opts,0) 
     631SRC_HSC2HS_OPTS_STAGE1=$(call set_hsc2hs_opts,1) 
     632SRC_HSC2HS_OPTS_STAGE2=$(call set_hsc2hs_opts,2) 
    625633 
    626634ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" 
    627635WINDRES = $(INPLACE_MINGW)/bin/windres 
  • rules/distdir-opts.mk

    diff --git a/rules/distdir-opts.mk b/rules/distdir-opts.mk
    index 748e27e..50e2ce7 100644
    a b $1_$2_HSC2HS_LD_OPTS:=$$(shell for i in $$($1_$2_DIST_LD_OPTS); do echo \'--lfla 
    7979endif 
    8080 
    8181$1_$2_ALL_HSC2HS_OPTS = \ 
    82  --cc=$$(WhatGccIsCalled) \ 
    83  --ld=$$(WhatGccIsCalled) \ 
     82 --cc=$$(CC_STAGE$3) \ 
     83 --ld=$$(CC_STAGE$3) \ 
    8484 $$(CONF_HSC2HS_OPTS) \ 
    85  $$(SRC_HSC2HS_OPTS) \ 
     85 $$(SRC_HSC2HS_OPTS_STAGE$3) \ 
    8686 --cflag=-D__GLASGOW_HASKELL__=$$(if $$(filter 0,$3),$$(GhcCanonVersion),$$(ProjectVersionInt)) \ 
    8787 --cflag=-D$$(HostArch_CPP)_HOST_ARCH=1 \ 
    8888 --cflag=-D$$(HostOS_CPP)_HOST_OS=1 \