+ifeq "$(LdIsGNULd)" "YES"
+# If ld is GNU ld, we can use a linker script to pass the names of the
+# input files. This avoids problems with limits on the length of the
+# ld command line, which we run into for large Haskell modules.
+HC_SPLIT_POST = \
+ ( cd $(basename $@)_split; \
+ $(RM) ld.script; \
+ touch ld.script; \
+ echo "INPUT(" *.$(way_)o ")" >>ld.script; \
+ $(LD) -r $(LD_X) -o ../$(notdir $@) ld.script; \
+ )
+else
+HC_SPLIT_POST = \
+ ( cd $(basename $@)_split; \
+ $(LD) -r $(LD_X) -o ../$(notdir $@) *.$(way_)o; \
+ )
+endif # LdIsGNULd == YES