-SRC_HC_OPTS = $(shell if (test $(GhcCanonVersion) -ge 603); then echo "-ignore-package $(PACKAGE)"; fi)
-else
-SRC_HC_OPTS += -ignore-package $(PACKAGE)
-endif
-endif
+IGNORE_PACKAGE_FLAG = $(shell if (test $(GhcCanonVersion) -ge 603); then echo "-ignore-package"; else echo "-package-name"; fi)
+endif
+endif # STANDALONE_PACKAGE
+
+ifeq "$(NON_HS_PACKAGE)" ""
+SRC_HC_OPTS += $(IGNORE_PACKAGE_FLAG) $(PACKAGE)