Commit 8d1990f4 authored by Ian Lynagh's avatar Ian Lynagh

Link programs that have no Haskell objects with gcc rather than ghc

parent 8e0dcfd8
......@@ -118,7 +118,15 @@ $$(foreach dir,$$($1_$2_HS_SRC_DIRS),\
$(call c-objs,$1,$2,v)
$(call hs-objs,$1,$2,v)
ifeq "$$(BootingFromHc)" "NO"
$1_$2_LINK_WITH_GCC = NO
ifeq "$$(BootingFromHc)" "YES"
$1_$2_LINK_WITH_GCC = YES
endif
ifeq "$$($1_$2_v_HS_OBJS)" ""
$1_$2_LINK_WITH_GCC = YES
endif
ifeq "$$($1_$2_LINK_WITH_GCC)" "NO"
$1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) | $$$$(dir $$$$@)/.
"$$($1_$2_HC)" -o $$@ $$($1_$2_v_ALL_HC_OPTS) $$(LD_OPTS) $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS)
else
......
......@@ -19,6 +19,7 @@ utils/hp2ps_dist_PROG = hp2ps$(exeext)
utils/hp2ps_dist_INSTALL = YES
utils/hp2ps_CC_OPTS += -Iincludes
utils/hp2ps_CC_OPTS += -lm
$(eval $(call build-prog,utils/hp2ps,dist,0))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment