# Hack up ldmain compile.
/^"{o}"ldmain.c.o \\Option-f .* config.status$/,/^$/c\
"{o}"ldmain.c.o \\Option-f "{s}"ldmain.c\
- {CC} -d DEFAULT_EMULATION='"'{EMUL}'"' -d SCRIPTDIR='"'{scriptdir}'"' {ALL_CFLAGS} "{s}"ldmain.c -o "{o}"ldmain.c.o\
+ {CC} @DASH_C_FLAG@ -d DEFAULT_EMULATION={dq}{EMUL}{dq} -d SCRIPTDIR={dq}{scriptdir}{dq} {ALL_CFLAGS} "{s}"ldmain.c -o "{o}"ldmain.c.o\
# Remove ldemul-list.h build, rely on configure to make one.
# We can't run genscripts, so don't try.
/{GENSCRIPTS}/s/{GENSCRIPTS}/null-command/
+# Comment out the TDIRS bits.
+/^TDIRS@/s/^/#/
+
+# Point at the BFD library directly.
+/@BFDLIB@/s/@BFDLIB@/::bfd:libbfd.o/
+
+# Don't need this.
+/@HLDFLAGS@/s/@HLDFLAGS@//
+
#/sed.*free/,/> "{o}"ldlex.c.new/c\
# \ Catenate "{o}"lex.yy.c >"{o}"ldlex.c.new
install \\Option-f all install-only\
\
install-only \\Option-f\
- If "`Exists "{prefix}"`" == ""\
- Echo "{prefix}" does not exist, cannot install anything\
- Exit 1\
- End If\
- If "`Exists "{bindir}"`" == ""\
- NewFolder "{bindir}"\
- End If\
+ NewFolderRecursive "{bindir}"\
Duplicate -y :ld.new "{bindir}"ld\