+$1_$2_LINK_WITH_GCC = NO
+ifeq "$$(BootingFromHc)" "YES"
+$1_$2_LINK_WITH_GCC = YES
+endif
+
+ifeq "$$($1_$2_v_HS_OBJS)" ""
+# We don't want to link the GHC RTS into C-only programs. There's no
+# point, and it confuses the test that all GHC-compiled programs
+# were compiled with the right GHC.
+$1_$2_GHC_LD_OPTS = -no-auto-link-packages -no-hs-main
+endif
+
+ifeq "$$($1_$2_LINK_WITH_GCC)" "NO"