aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ld/.Sanitize13
-rw-r--r--ld/Makefile.in137
-rw-r--r--ld/acconfig.h2
-rw-r--r--ld/config.h31
-rw-r--r--ld/config.h.in19
-rw-r--r--ld/config/.Sanitize140
-rw-r--r--ld/config/alpha.mt1
-rw-r--r--ld/config/alphaosf.mh2
-rw-r--r--ld/config/arc-elf.mt1
-rw-r--r--ld/config/arm-pe.mt1
-rw-r--r--ld/config/armb-aout.mt1
-rw-r--r--ld/config/arml-aout.mt1
-rw-r--r--ld/config/coff-a29k.mt1
-rw-r--r--ld/config/coff-h8300.mt7
-rw-r--r--ld/config/coff-h8500.mt5
-rw-r--r--ld/config/coff-sh.mt2
-rw-r--r--ld/config/coff-sparc.mt1
-rwxr-xr-xld/config/coff-w65.mt3
-rw-r--r--ld/config/delta88.mh6
-rw-r--r--ld/config/dgux.mh5
-rw-r--r--ld/config/ebmon29k.mt1
-rw-r--r--ld/config/go32.mh4
-rw-r--r--ld/config/go32.mt1
-rw-r--r--ld/config/hp300.mh4
-rw-r--r--ld/config/hp300bsd.mt2
-rw-r--r--ld/config/hp300hpux.mt1
-rw-r--r--ld/config/hppaelf.mh3
-rw-r--r--ld/config/hppaelf.mt1
-rw-r--r--ld/config/i386-aout.mt1
-rw-r--r--ld/config/i386-bsd.mt1
-rw-r--r--ld/config/i386-coff.mt1
-rw-r--r--ld/config/i386-elf.mt1
-rw-r--r--ld/config/i386-gelf.mt2
-rw-r--r--ld/config/i386-gnu.mt2
-rw-r--r--ld/config/i386-go32.mt1
-rw-r--r--ld/config/i386-laout.mt2
-rw-r--r--ld/config/i386-linux.mt2
-rw-r--r--ld/config/i386-lynx.mt1
-rw-r--r--ld/config/i386-mach.mt1
-rw-r--r--ld/config/i386-moss.mt2
-rw-r--r--ld/config/i386-msdos.mt2
-rw-r--r--ld/config/i386-nbsd.mt1
-rw-r--r--ld/config/i386-nw.mt1
-rw-r--r--ld/config/i386-pe.mt1
-rw-r--r--ld/config/i386bsd.mh5
-rw-r--r--ld/config/i386linux.mh2
-rw-r--r--ld/config/i386lynx.mh2
-rw-r--r--ld/config/i386pe.mh5
-rw-r--r--ld/config/i386sco.mh4
-rw-r--r--ld/config/i386v.mh4
-rw-r--r--ld/config/i386v.mt2
-rw-r--r--ld/config/i386v4.mh3
-rw-r--r--ld/config/i960.mt1
-rw-r--r--ld/config/i960coff.mt1
-rw-r--r--ld/config/ieee-h8300.mt1
-rw-r--r--ld/config/irix4.mh3
-rw-r--r--ld/config/m68k-coff.mt1
-rw-r--r--ld/config/m68k-elf.mt1
-rw-r--r--ld/config/m68k-lynx.mt1
-rw-r--r--ld/config/m68k-nbsd.mt1
-rw-r--r--ld/config/m68k.mt1
-rw-r--r--ld/config/m68klynx.mh2
-rw-r--r--ld/config/m68kv.mt2
-rw-r--r--ld/config/m88k-bcs.mt1
-rw-r--r--ld/config/mips-big.mt1
-rw-r--r--ld/config/mips-idt.mt1
-rw-r--r--ld/config/mips-lit.mt1
-rw-r--r--ld/config/mips-vr4300.mt1
-rw-r--r--ld/config/mips-vr4300el.mt1
-rw-r--r--ld/config/mipsb-elf32.mt1
-rw-r--r--ld/config/mipsbsd.mh2
-rw-r--r--ld/config/mipsbsd.mt1
-rw-r--r--ld/config/mipsl-elf32.mt1
-rw-r--r--ld/config/mipsl-idt.mt1
-rw-r--r--ld/config/news.mt1
-rw-r--r--ld/config/ns32k-nbsd.mt1
-rw-r--r--ld/config/ose68.mt1
-rw-r--r--ld/config/pc532mach.mt2
-rw-r--r--ld/config/ppc-elf32.mt1
-rw-r--r--ld/config/ppc-nw.mt1
-rw-r--r--ld/config/ppcle-elf32.mt1
-rw-r--r--ld/config/rce-aout.mt1
-rw-r--r--ld/config/riscix.mt1
-rw-r--r--ld/config/rtbsd.mh6
-rw-r--r--ld/config/sa29200.mt1
-rw-r--r--ld/config/solaris2.mh4
-rw-r--r--ld/config/sparc-ll.mh1
-rw-r--r--ld/config/sparc-lynx.mt1
-rw-r--r--ld/config/sparc-nbsd.mt1
-rw-r--r--ld/config/sparc64-elf.mt1
-rw-r--r--ld/config/st2000.mt2
-rw-r--r--ld/config/sun3.mh1
-rw-r--r--ld/config/sun3.mt2
-rw-r--r--ld/config/sun4.mt1
-rw-r--r--ld/config/sun4sol2.mt1
-rw-r--r--ld/config/vax.mt1
-rw-r--r--ld/config/vsta.mt1
-rw-r--r--ld/config/vxworks68.mt1
-rw-r--r--ld/config/z8k-coff.mt5
-rw-r--r--ld/emultempl/m88kbcs.em1
-rw-r--r--ld/mpw-emipsidt.c1
-rw-r--r--ld/mpw-esh.c1
-rw-r--r--ld/sysdep.h56
103 files changed, 156 insertions, 415 deletions
diff --git a/ld/.Sanitize b/ld/.Sanitize
index cbb142b..72457cd 100644
--- a/ld/.Sanitize
+++ b/ld/.Sanitize
@@ -28,10 +28,14 @@ Makefile.in
NEWS
README
TODO
-config
-config.h
+acconfig.h
+aclocal.m4
+config.h.in
+configure
configure.bat
+configure.host
configure.in
+configure.tgt
dep-in.sed
emulparams
emultempl
@@ -71,13 +75,14 @@ mpw-make.in
mri.c
mri.h
scripttempl
+sysdep.h
testsuite
Things-to-lose:
Do-last:
-rce_files="configure.in Makefile.in"
+rce_files="configure.in configure.tgt Makefile.in"
if ( echo $* | grep keep\-rce > /dev/null ) ; then
for i in $rce_files ; do
@@ -106,7 +111,7 @@ else
done
fi
-arc_files="ChangeLog configure.in Makefile.in"
+arc_files="ChangeLog configure.in configure.tgt Makefile.in"
if ( echo $* | grep keep\-arc > /dev/null ) ; then
for i in $arc_files ; do
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 4076594..2d42565 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -18,13 +18,15 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-srcdir = .
+VPATH = @srcdir@
+srcdir = @srcdir@
objdir = .
-prefix = /usr/local
+target_alias = @target_alias@
+prefix = @prefix@
-program_transform_name =
-exec_prefix = $(prefix)
+program_transform_name = @program_transform_name@
+exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
tooldir = $(exec_prefix)/$(target_alias)
@@ -57,15 +59,17 @@ INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1
AR = ar
AR_FLAGS = qv
-CC = cc
-CFLAGS = -g
+CC = @CC@
+CFLAGS = @CFLAGS@
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
RANLIB = ranlib
-CC_FOR_BUILD=$(CC)
BISON = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
+EMUL = @EMUL@
+EMULATION_OFILES = @EMULATION_OFILES@
+
# Seach path to override the default search path for -lfoo libraries.
# If LIB_PATH is empty, the ones in the script (if any) are left alone.
# (The default is usually /lib:usr/lib:/usr/local/lib, unless building
@@ -74,10 +78,6 @@ LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
# which may have the form: LIB_PATH=/lib:/usr/local/lib
LIB_PATH =
-# Additional libraries which are used when ld is built native. This
-# is set by some host makefile fragments.
-NATIVE_LIB_DIRS =
-
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
@@ -104,8 +104,8 @@ TEXI2ROFF=texi2roff
ROFF = groff
#stuff for self hosting (can be overridden in config file).
-HOSTING_CRT0 = /lib/crt0.o
-HOSTING_LIBS = `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc
+HOSTING_CRT0 = @HOSTING_CRT0@
+HOSTING_LIBS = @HOSTING_LIBS@
HOSTING_EMU = -m $(EMUL)
# These were used by `make check-cdtest'
@@ -169,9 +169,6 @@ LD_PROG = ld.new
all: $(LD_PROG)
.PHONY: all
-### Host, target, and site specific Makefile fragments come in here.
-####
-
LINTFLAGS = $(INCLUDES) $(EXTRA_DEF)
# The .cc suffix was used by `make check-cdtest'.
@@ -185,7 +182,7 @@ LINTFLAGS = $(INCLUDES) $(EXTRA_DEF)
#.cc.o:
# $(CXX) -c -I$(srcdir) $(CXXFLAGS) $(CFLAGS) $<
-ALL_CFLAGS = $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $(CFLAGS)
+ALL_CFLAGS = $(INCLUDES) @HDEFINES@ $(CFLAGS)
.c.o:
$(CC) -c $(ALL_CFLAGS) $<
@@ -193,7 +190,6 @@ ALL_CFLAGS = $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $(CFLAGS)
BFDLIB = ../bfd/libbfd.a
LIBIBERTY = ../libiberty/libiberty.a
-
ALL_EMULATIONS = ea29k.o ealpha.o earmaoutl.o earmaoutb.o \
ecoff_sparc.o eebmon29k.o \
eelf32_sparc.o eelf32bmip.o eelf32lmip.o eelf32ppc.o eelf32lppc.o \
@@ -206,7 +202,7 @@ ALL_EMULATIONS = ea29k.o ealpha.o earmaoutl.o earmaoutb.o \
emipsidt.o emipsidtl.o emipslit.o enews.o ens32knbsd.o eppcnw.o \
eriscix.o esa29200.o eshl.o esh.o esparclynx.o esparcnbsd.o \
est2000.o esun3.o esun4.o evanilla.o evax.o evsta.o \
- ez8001.o ez8002.o ei386pe.o earmpe.o
+ ez8001.o ez8002.o ei386pe.o earmpe.o eelf32vr4300.o eelf32vr4300el.o
CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
@@ -217,7 +213,7 @@ HFILES = config.h ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
ldwrite.h mri.h
GENERATED_CFILES = ldgram.c ldlex.c
-GENERATED_HFILES = ldgram.h ldemul-list.h
+GENERATED_HFILES = ldgram.h ldemul-list.h config.h
OFILES = ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o \
ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o \
@@ -239,14 +235,8 @@ ldgram.c: ldgram.y
# both ldgram.c and ldgram.h simultaneously.
ldgram.h: ldgram.c
-# EMUL is the name of a file in the emulparams subdir, without the .sh.
ldmain.o: ldmain.c config.status
- if [ -z "$(EMUL)" ] ; then \
- echo "you must set a default emulation" 1>&2 ; \
- exit 1 ; \
- else \
- $(CC) -c $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' $(CFLAGS) $< ; \
- fi
+ $(CC) -c -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' $(ALL_CFLAGS) $<
ldemul-list.h: Makefile
(echo "/* This file is automatically generated. DO NOT EDIT! */";\
@@ -274,7 +264,7 @@ ldlex.c: ldlex.l
# These all start with e so 'make clean' can find them.
-GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} ${host_alias} ${target_alias} ${EMUL} "$(NATIVE_LIB_DIRS)"
+GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host_alias@ @target_alias@ ${EMUL} "@NATIVE_LIB_DIRS@"
GEN_DEPENDS = $(srcdir)/genscripts.sh $(srcdir)/emultempl/stringify.sed
esun4.c: $(srcdir)/emulparams/sun4.sh \
@@ -284,7 +274,7 @@ esun3.c: $(srcdir)/emulparams/sun3.sh \
$(srcdir)/emultempl/sunos.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} sun3
earmpe.c: $(srcdir)/emulparams/armpe.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armpe.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} armpe
evsta.c: $(srcdir)/emulparams/vsta.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
@@ -305,7 +295,7 @@ ehp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} hp3hpux
ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
- $(srcdir)/emultempl/i386pe.em $(srcdir)/scripttempl/i386pe.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386pe
ehppaelf.c: $(srcdir)/emulparams/hppaelf.sh \
$(srcdir)/emultempl/hppaelf.em $(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS}
@@ -421,6 +411,12 @@ eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lmip
+eelf32vr4300.c: $(srcdir)/emulparams/elf32vr4300.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32vr4300
+eelf32vr4300el.c: $(srcdir)/emulparams/elf32vr4300el.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32vr4300el
ealpha.c: $(srcdir)/emulparams/alpha.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/alpha.sc ${GEN_DEPENDS}
${GENSCRIPTS} alpha
@@ -506,8 +502,8 @@ $(LD_PROG): $(OFILES) $(BFDLIB) $(LIBIBERTY)
$(CC) $(CFLAGS) $(LDFLAGS) -o $(LD_PROG) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(EXTRALIBS)
# The generated emulation files mostly have the same dependencies.
-$(EMULATION_OFILES): ../bfd/bfd.h ../bfd/sysdep.h $(INCDIR)/bfdlink.h \
- ld.h ldmain.h ldemul.h ldfile.h ldmisc.h ldexp.h ldlang.h config.h \
+$(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
+ ld.h ldmain.h ldemul.h ldfile.h ldmisc.h ldexp.h ldlang.h \
ldctor.h ldexp.h ldlang.h
# These targets are for the dejagnu testsuites. The file site.exp
@@ -522,16 +518,16 @@ site.exp: ./config.status Makefile
@echo "# Do not edit here. If you wish to override these" >> ./tmp0
@echo "# values, add them to the last section" >> ./tmp0
@echo "# HOST AND TARGET INFO" >> ./tmp0
- @echo "set host_os $(host_os)" >> ./tmp0
- @echo "set host_alias $(host_alias)" >> ./tmp0
- @echo "set host_cpu $(host_cpu)" >> ./tmp0
- @echo "set host_vendor $(host_vendor)" >> ./tmp0
- @echo "set target_os $(target_os)" >> ./tmp0
- @echo "set target_alias $(target_alias)" >> ./tmp0
- @echo "set target_cpu $(target_cpu)" >> ./tmp0
- @echo "set target_vendor $(target_vendor)" >> ./tmp0
- @echo "set host_triplet $(host_canonical)" >> ./tmp0
- @echo "set target_triplet $(target_canonical)" >> ./tmp0
+ @echo "set host_os @host_os@" >> ./tmp0
+ @echo "set host_alias @host_alias@" >> ./tmp0
+ @echo "set host_cpu @host_cpu@" >> ./tmp0
+ @echo "set host_vendor @host_vendor@" >> ./tmp0
+ @echo "set target_os @target_os@" >> ./tmp0
+ @echo "set target_alias @target_alias@" >> ./tmp0
+ @echo "set target_cpu @target_cpu@" >> ./tmp0
+ @echo "set target_vendor @target_vendor@" >> ./tmp0
+ @echo "set host_triplet @host@" >> ./tmp0
+ @echo "set target_triplet @target@" >> ./tmp0
@echo "# DIRECTORY INFO" >> ./tmp0
@echo "set objdir `pwd`" >> ./tmp0
@echo "" >> ./tmp0
@@ -834,7 +830,7 @@ clean-info:
dep.sed: dep-in.sed config.status
sed <$(srcdir)/dep-in.sed >dep.sed \
-e 's!@INCDIR@!$(INCDIR)!' \
- -e 's!@srcdir@!$(srcdir)!'
+ -e 's!@SRCDIR@!$(srcdir)!'
dep: .dep
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
@@ -854,8 +850,15 @@ force:
.PHONY: force
-Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
- $(SHELL) ./config.status
+Makefile: Makefile.in config.status
+ CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
+
+config.h: stamp-h ; @true
+stamp-h: config.h.in config.status
+ CONFIG_FILES= CONFIG_HEADERS=config.h $(SHELL) ./config.status
+
+config.status: configure configure.host
+ $(SHELL) ./config.status --recheck
# What appears below is generated by a hacked mkdep using gcc -MM.
@@ -863,56 +866,56 @@ Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
ldctor.o: ldctor.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/bfdlink.h ld.h ldexp.h ldlang.h ldmisc.h \
ldgram.h ldmain.h ldctor.h
ldemul.o: ldemul.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
- config.h ld.h ldemul.h ldmisc.h ldexp.h ldlang.h ldfile.h \
- ldmain.h ldemul-list.h
+ $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ld.h ldemul.h ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h \
+ ldemul-list.h
ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/bfdlink.h ld.h ldmain.h ldmisc.h ldexp.h \
ldgram.h ldlang.h
ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/bfdlink.h ld.h ldmisc.h ldexp.h ldlang.h \
ldfile.h ldmain.h ldgram.h ldlex.h ldemul.h
ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
ldgram.h ldexp.h ldlang.h ldemul.h ldlex.h ldmisc.h \
ldctor.h ldfile.h
ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/libiberty.h $(INCDIR)/progress.h $(INCDIR)/bfdlink.h \
- config.h ld.h ldmain.h ldmisc.h ldwrite.h ldgram.h \
- ldexp.h ldlang.h ldemul.h ldlex.h ldfile.h ldctor.h
+ ld.h ldmain.h ldmisc.h ldwrite.h ldgram.h ldexp.h ldlang.h \
+ ldemul.h ldlex.h ldfile.h ldctor.h
ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
ld.h ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h \
ldfile.h
ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
ld.h ldver.h ldemul.h ldmain.h
ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/bfdlink.h ld.h ldexp.h ldlang.h ldwrite.h \
ldmisc.h ldgram.h ldmain.h
lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/getopt.h $(INCDIR)/bfdlink.h config.h ld.h \
- ldmain.h ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h \
- ldfile.h ldver.h
+ $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/getopt.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
+ ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \
+ ldver.h ldemul.h
mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/obstack.h \
- ../bfd/sysdep.h $(INCDIR)/fopen-same.h ld.h ldexp.h \
+ sysdep.h config.h $(INCDIR)/fopen-same.h ld.h ldexp.h \
ldlang.h ldmisc.h mri.h ldgram.h
ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/obstack.h ../bfd/sysdep.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/obstack.h sysdep.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/bfdlink.h ld.h ldexp.h ldver.h ldlang.h ldemul.h \
ldfile.h ldmisc.h ldmain.h mri.h ldlex.h
-ldlex.o: ldlex.c ../bfd/bfd.h $(INCDIR)/obstack.h ../bfd/sysdep.h \
- $(INCDIR)/fopen-same.h ld.h ldgram.h ldmisc.h ldexp.h \
- ldlang.h ldfile.h ldlex.h ldmain.h
+ldlex.o: ldlex.c ../bfd/bfd.h $(INCDIR)/obstack.h sysdep.h \
+ config.h $(INCDIR)/fopen-same.h ld.h ldgram.h ldmisc.h \
+ ldexp.h ldlang.h ldfile.h ldlex.h ldmain.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/ld/acconfig.h b/ld/acconfig.h
new file mode 100644
index 0000000..a56a897
--- /dev/null
+++ b/ld/acconfig.h
@@ -0,0 +1,2 @@
+/* Do we need to use the b modifier when opening binary files? */
+#undef USE_BINARY_FOPEN
diff --git a/ld/config.h b/ld/config.h
deleted file mode 100644
index ae16e88..0000000
--- a/ld/config.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* config.h -
-
- Copyright (C) 1991 Free Software Foundation, Inc.
-
- This file is part of GLD, the Gnu Linker.
-
- GLD is free software; you can redistribute it and/or modify
- it under the terms of the GNU Genexral Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GLD is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GLD; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* Look in this environment name for the linker to pretend to be */
-#define EMULATION_ENVIRON "LDEMULATION"
-/* If in there look for the strings: */
-
-/* Look in this variable for a target format */
-#define TARGET_ENVIRON "GNUTARGET"
-
-
-
-
-
diff --git a/ld/config.h.in b/ld/config.h.in
new file mode 100644
index 0000000..8340f53
--- /dev/null
+++ b/ld/config.h.in
@@ -0,0 +1,19 @@
+/* config.h.in. Generated automatically from configure.in by autoheader. */
+
+/* Do we need to use the b modifier when opening binary files? */
+#undef USE_BINARY_FOPEN
+
+/* Define if you have the sbrk function. */
+#undef HAVE_SBRK
+
+/* Define if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
diff --git a/ld/config/.Sanitize b/ld/config/.Sanitize
deleted file mode 100644
index 9efc726..0000000
--- a/ld/config/.Sanitize
+++ /dev/null
@@ -1,140 +0,0 @@
-# .Sanitize for devo/ld/config
-
-# Each directory to survive its way into a release will need a file
-# like this one called "./.Sanitize". All keyword lines must exist,
-# and must exist in the order specified by this file. Each directory
-# in the tree will be processed, top down, in the following order.
-
-# Hash started lines like this one are comments and will be deleted
-# before anything else is done. Blank lines will also be squashed
-# out.
-
-# The lines between the "Do-first:" line and the "Things-to-keep:"
-# line are executed as a /bin/sh shell script before anything else is
-# done in this directory.
-
-Do-first:
-
-arc_files="arc-elf.mt"
-
-if ( echo $* | grep keep\-arc > /dev/null ) ; then
- keep_these_too="${arc_files} ${keep_these_too}"
-else
- lose_these_too="${arc_files} ${lose_these_too}"
-fi
-
-rce_files="rce-aout.mt"
-
-if ( echo $* | grep keep\-rce > /dev/null ) ; then
- keep_these_too="${rce_files} ${keep_these_too}"
-else
- lose_these_too="${rce_files} ${lose_these_too}"
-fi
-
-# All files listed between the "Things-to-keep:" line and the
-# "Do-last:" line will be kept. All other files will be removed.
-# Directories listed in this section will have their own Sanitize
-# called. Directories not listed will be removed in their entirety
-# with rm -rf.
-
-Things-to-keep:
-
-alpha.mt
-alphaosf.mh
-arm-pe.mt
-armb-aout.mt
-arml-aout.mt
-coff-a29k.mt
-coff-h8300.mt
-coff-h8500.mt
-coff-sh.mt
-coff-sparc.mt
-coff-w65.mt
-delta88.mh
-dgux.mh
-ebmon29k.mt
-go32.mh
-go32.mt
-hp300.mh
-hp300bsd.mt
-hp300hpux.mt
-hppaelf.mh
-hppaelf.mt
-i386-aout.mt
-i386-bsd.mt
-i386-coff.mt
-i386-elf.mt
-i386-gelf.mt
-i386-gnu.mt
-i386-go32.mt
-i386-laout.mt
-i386-linux.mt
-i386-lynx.mt
-i386-mach.mt
-i386-moss.mt
-i386-msdos.mt
-i386-nbsd.mt
-i386-nw.mt
-i386-pe.mt
-i386bsd.mh
-i386linux.mh
-i386lynx.mh
-i386pe.mh
-i386sco.mh
-i386v.mh
-i386v.mt
-i386v4.mh
-i960.mt
-i960coff.mt
-ieee-h8300.mt
-irix4.mh
-m68k-coff.mt
-m68k-elf.mt
-m68k-lynx.mt
-m68k-nbsd.mt
-m68k.mt
-m68klynx.mh
-m68kv.mt
-m88k-bcs.mt
-mips-big.mt
-mips-idt.mt
-mips-lit.mt
-mips-vr4300.mt
-mips-vr4300el.mt
-mipsb-elf32.mt
-mipsbsd.mh
-mipsbsd.mt
-mipsl-elf32.mt
-mipsl-idt.mt
-news.mt
-ns32k-nbsd.mt
-ose68.mt
-pc532mach.mt
-ppc-elf32.mt
-ppc-nw.mt
-ppcle-elf32.mt
-riscix.mt
-rtbsd.mh
-sa29200.mt
-solaris2.mh
-sparc-ll.mh
-sparc-lynx.mt
-sparc-nbsd.mt
-sparc64-elf.mt
-st2000.mt
-sun3.mh
-sun3.mt
-sun4.mt
-sun4sol2.mt
-vax.mt
-vsta.mt
-vxworks68.mt
-z8k-coff.mt
-
-Things-to-lose:
-
-# The lines between the "Do-last:" line and the end of the file
-# are executed as a /bin/sh shell script after everything else is
-# done.
-
-Do-last:
diff --git a/ld/config/alpha.mt b/ld/config/alpha.mt
deleted file mode 100644
index 28d9649..0000000
--- a/ld/config/alpha.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=alpha
diff --git a/ld/config/alphaosf.mh b/ld/config/alphaosf.mh
deleted file mode 100644
index 0ab53c5..0000000
--- a/ld/config/alphaosf.mh
+++ /dev/null
@@ -1,2 +0,0 @@
-NATIVE_LIB_DIRS=/usr/ccs/lib
-HOSTING_CRT0=/usr/ccs/lib/crt0.o
diff --git a/ld/config/arc-elf.mt b/ld/config/arc-elf.mt
deleted file mode 100644
index 474217d..0000000
--- a/ld/config/arc-elf.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=arcelf
diff --git a/ld/config/arm-pe.mt b/ld/config/arm-pe.mt
deleted file mode 100644
index 1b8f58d..0000000
--- a/ld/config/arm-pe.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=armpe
diff --git a/ld/config/armb-aout.mt b/ld/config/armb-aout.mt
deleted file mode 100644
index 5a9985f..0000000
--- a/ld/config/armb-aout.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=armaoutb
diff --git a/ld/config/arml-aout.mt b/ld/config/arml-aout.mt
deleted file mode 100644
index 7e7d993..0000000
--- a/ld/config/arml-aout.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=armaoutl
diff --git a/ld/config/coff-a29k.mt b/ld/config/coff-a29k.mt
deleted file mode 100644
index 813dfab..0000000
--- a/ld/config/coff-a29k.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=a29k
diff --git a/ld/config/coff-h8300.mt b/ld/config/coff-h8300.mt
deleted file mode 100644
index 56b5abf..0000000
--- a/ld/config/coff-h8300.mt
+++ /dev/null
@@ -1,7 +0,0 @@
-EMUL=h8300h
-EMUL=h8300
-
-# We need to also include h8300h support. Not sure what's the "Right Way."
-
-# This first line of this file is a hack. Somehow we need to get h8300h
-# into EMULATION_OFILES. "EMUL=h8300" *must* be last.
diff --git a/ld/config/coff-h8500.mt b/ld/config/coff-h8500.mt
deleted file mode 100644
index af51df8..0000000
--- a/ld/config/coff-h8500.mt
+++ /dev/null
@@ -1,5 +0,0 @@
-EMUL=h8500s
-EMUL=h8500b
-EMUL=h8500m
-EMUL=h8500c
-EMUL=h8500
diff --git a/ld/config/coff-sh.mt b/ld/config/coff-sh.mt
deleted file mode 100644
index cc664bd..0000000
--- a/ld/config/coff-sh.mt
+++ /dev/null
@@ -1,2 +0,0 @@
-EMUL=shl
-EMUL=sh
diff --git a/ld/config/coff-sparc.mt b/ld/config/coff-sparc.mt
deleted file mode 100644
index 1ba441f..0000000
--- a/ld/config/coff-sparc.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=coff_sparc
diff --git a/ld/config/coff-w65.mt b/ld/config/coff-w65.mt
deleted file mode 100755
index 36af96c..0000000
--- a/ld/config/coff-w65.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-EMUL=w65
-
-
diff --git a/ld/config/delta88.mh b/ld/config/delta88.mh
deleted file mode 100644
index d0db23d..0000000
--- a/ld/config/delta88.mh
+++ /dev/null
@@ -1,6 +0,0 @@
-HDEFINES =
-
-INSTALL=cp
-
-
-
diff --git a/ld/config/dgux.mh b/ld/config/dgux.mh
deleted file mode 100644
index 064815a..0000000
--- a/ld/config/dgux.mh
+++ /dev/null
@@ -1,5 +0,0 @@
-HDEFINES = -D__using_DGUX
-
-HOSTING_CRT0=/lib/crt0.o -X
-HOSTING_LIBS=/usr/sde/m88kbcs/lib/libc.a
-HOSTING_EMU=-m m88kbcs
diff --git a/ld/config/ebmon29k.mt b/ld/config/ebmon29k.mt
deleted file mode 100644
index fc83976..0000000
--- a/ld/config/ebmon29k.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=ebmon29k
diff --git a/ld/config/go32.mh b/ld/config/go32.mh
deleted file mode 100644
index d6f6ec5..0000000
--- a/ld/config/go32.mh
+++ /dev/null
@@ -1,4 +0,0 @@
-CC_FOR_BUILD=gcc
-CC=i386-go32-gcc -O2 -fno-omit-frame-pointer -Xlinker -S
-
-
diff --git a/ld/config/go32.mt b/ld/config/go32.mt
deleted file mode 100644
index d5f86db..0000000
--- a/ld/config/go32.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=go32
diff --git a/ld/config/hp300.mh b/ld/config/hp300.mh
deleted file mode 100644
index 529ea8e..0000000
--- a/ld/config/hp300.mh
+++ /dev/null
@@ -1,4 +0,0 @@
-# If compiling with -O on the HP 9000/300 running HP/UX, you must
-# specify -Wp,-P to avoid a stupid compiler bug.
-# Ian Taylor, David Henkel-Wallace, Cygnus Support
-# CFLAGS = +O1000 -Wp,-P
diff --git a/ld/config/hp300bsd.mt b/ld/config/hp300bsd.mt
deleted file mode 100644
index 9105c52..0000000
--- a/ld/config/hp300bsd.mt
+++ /dev/null
@@ -1,2 +0,0 @@
-EMUL=hp300bsd
-
diff --git a/ld/config/hp300hpux.mt b/ld/config/hp300hpux.mt
deleted file mode 100644
index dd66662..0000000
--- a/ld/config/hp300hpux.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=hp3hpux
diff --git a/ld/config/hppaelf.mh b/ld/config/hppaelf.mh
deleted file mode 100644
index 370766a..0000000
--- a/ld/config/hppaelf.mh
+++ /dev/null
@@ -1,3 +0,0 @@
-HOSTING_CRT0=/lib/crt0.o
-HOSTING_LIBS=-lc
-HOSTING_EMU=-m hppaelf
diff --git a/ld/config/hppaelf.mt b/ld/config/hppaelf.mt
deleted file mode 100644
index c1fe234..0000000
--- a/ld/config/hppaelf.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=hppaelf
diff --git a/ld/config/i386-aout.mt b/ld/config/i386-aout.mt
deleted file mode 100644
index 5a2b724..0000000
--- a/ld/config/i386-aout.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=i386aout
diff --git a/ld/config/i386-bsd.mt b/ld/config/i386-bsd.mt
deleted file mode 100644
index a5c4e92..0000000
--- a/ld/config/i386-bsd.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=i386bsd
diff --git a/ld/config/i386-coff.mt b/ld/config/i386-coff.mt
deleted file mode 100644
index dcdc3f9..0000000
--- a/ld/config/i386-coff.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=i386coff
diff --git a/ld/config/i386-elf.mt b/ld/config/i386-elf.mt
deleted file mode 100644
index f7c8061..0000000
--- a/ld/config/i386-elf.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=elf_i386
diff --git a/ld/config/i386-gelf.mt b/ld/config/i386-gelf.mt
deleted file mode 100644
index a3afaf4..0000000
--- a/ld/config/i386-gelf.mt
+++ /dev/null
@@ -1,2 +0,0 @@
-EMUL=elf_i386
-EMUL_EXTRA1=i386mach
diff --git a/ld/config/i386-gnu.mt b/ld/config/i386-gnu.mt
deleted file mode 100644
index f1e21a9..0000000
--- a/ld/config/i386-gnu.mt
+++ /dev/null
@@ -1,2 +0,0 @@
-EMUL=i386mach
-EMUL_EXTRA1=elf_i386
diff --git a/ld/config/i386-go32.mt b/ld/config/i386-go32.mt
deleted file mode 100644
index 55a8451..0000000
--- a/ld/config/i386-go32.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=i386go32
diff --git a/ld/config/i386-laout.mt b/ld/config/i386-laout.mt
deleted file mode 100644
index 16d623b..0000000
--- a/ld/config/i386-laout.mt
+++ /dev/null
@@ -1,2 +0,0 @@
-EMUL=i386linux
-EMUL_EXTRA1=elf_i386
diff --git a/ld/config/i386-linux.mt b/ld/config/i386-linux.mt
deleted file mode 100644
index a9cec18..0000000
--- a/ld/config/i386-linux.mt
+++ /dev/null
@@ -1,2 +0,0 @@
-EMUL=elf_i386
-EMUL_EXTRA1=i386linux
diff --git a/ld/config/i386-lynx.mt b/ld/config/i386-lynx.mt
deleted file mode 100644
index 66fb5a1..0000000
--- a/ld/config/i386-lynx.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=i386lynx
diff --git a/ld/config/i386-mach.mt b/ld/config/i386-mach.mt
deleted file mode 100644
index 622f1d3..0000000
--- a/ld/config/i386-mach.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=i386mach
diff --git a/ld/config/i386-moss.mt b/ld/config/i386-moss.mt
deleted file mode 100644
index 5f7ecff7..0000000
--- a/ld/config/i386-moss.mt
+++ /dev/null
@@ -1,2 +0,0 @@
-EMUL=i386moss
-EMUL_EXTRA1=i386msdos
diff --git a/ld/config/i386-msdos.mt b/ld/config/i386-msdos.mt
deleted file mode 100644
index dcda424..0000000
--- a/ld/config/i386-msdos.mt
+++ /dev/null
@@ -1,2 +0,0 @@
-EMUL=i386msdos
-EMUL_EXTRA1=i386aout
diff --git a/ld/config/i386-nbsd.mt b/ld/config/i386-nbsd.mt
deleted file mode 100644
index 93acef5..0000000
--- a/ld/config/i386-nbsd.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=i386nbsd
diff --git a/ld/config/i386-nw.mt b/ld/config/i386-nw.mt
deleted file mode 100644
index 2c5f38e..0000000
--- a/ld/config/i386-nw.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=i386nw
diff --git a/ld/config/i386-pe.mt b/ld/config/i386-pe.mt
deleted file mode 100644
index 10d7f83..0000000
--- a/ld/config/i386-pe.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=i386pe
diff --git a/ld/config/i386bsd.mh b/ld/config/i386bsd.mh
deleted file mode 100644
index f1cf72a..0000000
--- a/ld/config/i386bsd.mh
+++ /dev/null
@@ -1,5 +0,0 @@
-# The new BSD `make' has a bug: it doesn't pass empty arguments in
-# shell commands. So we need to make this value non-empty in order
-# for the genscripts.sh call to work. There's nothing magic about
-# the value `/lib'; it's just a dummy.
-NATIVE_LIB_DIRS = /lib
diff --git a/ld/config/i386linux.mh b/ld/config/i386linux.mh
deleted file mode 100644
index 052baff..0000000
--- a/ld/config/i386linux.mh
+++ /dev/null
@@ -1,2 +0,0 @@
-# Linux apparently puts crt0.o in /usr/lib, not /lib.
-HOSTING_CRT0=/usr/lib/crt0.o
diff --git a/ld/config/i386lynx.mh b/ld/config/i386lynx.mh
deleted file mode 100644
index 4867740..0000000
--- a/ld/config/i386lynx.mh
+++ /dev/null
@@ -1,2 +0,0 @@
-HOSTING_CRT0=/lib/init1.o
-HOSTING_LIBS=`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc -lm /lib/initn.o
diff --git a/ld/config/i386pe.mh b/ld/config/i386pe.mh
deleted file mode 100644
index 216d6a0..0000000
--- a/ld/config/i386pe.mh
+++ /dev/null
@@ -1,5 +0,0 @@
-CC_FOR_BUILD=gcc
-CC=i386-newlib-pe-gcc -O2
-
-
-
diff --git a/ld/config/i386sco.mh b/ld/config/i386sco.mh
deleted file mode 100644
index bf1a282..0000000
--- a/ld/config/i386sco.mh
+++ /dev/null
@@ -1,4 +0,0 @@
-# For testing, we want to use /lib/crt1.o and /lib/crtn.o so that
-# constructors work properly.
-HOSTING_CRT0=/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtbegin.o/'; fi`
-HOSTING_LIBS=`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtend.o/'; fi` /lib/crtn.o
diff --git a/ld/config/i386v.mh b/ld/config/i386v.mh
deleted file mode 100644
index 2646840..0000000
--- a/ld/config/i386v.mh
+++ /dev/null
@@ -1,4 +0,0 @@
-# For testing, we want to use /lib/crt1.o and /lib/crtn.o so that
-# constructors work properly.
-HOSTING_CRT0=/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; fi`
-HOSTING_LIBS=`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; fi` /lib/crtn.o
diff --git a/ld/config/i386v.mt b/ld/config/i386v.mt
deleted file mode 100644
index e2f13be..0000000
--- a/ld/config/i386v.mt
+++ /dev/null
@@ -1,2 +0,0 @@
-# This doesn't seem to exist.
-EMUL=i386v
diff --git a/ld/config/i386v4.mh b/ld/config/i386v4.mh
deleted file mode 100644
index 7a36f9c..0000000
--- a/ld/config/i386v4.mh
+++ /dev/null
@@ -1,3 +0,0 @@
-HOSTING_CRT0=/usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtbegin.o/'; fi`
-HOSTING_LIBS=`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtend.o/'; fi` /usr/ccs/lib/crtn.o
-NATIVE_LIB_DIRS=/usr/ccs/lib
diff --git a/ld/config/i960.mt b/ld/config/i960.mt
deleted file mode 100644
index fb6515c..0000000
--- a/ld/config/i960.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=gld960
diff --git a/ld/config/i960coff.mt b/ld/config/i960coff.mt
deleted file mode 100644
index 474bfcf..0000000
--- a/ld/config/i960coff.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=gld960coff
diff --git a/ld/config/ieee-h8300.mt b/ld/config/ieee-h8300.mt
deleted file mode 100644
index 575ff47..0000000
--- a/ld/config/ieee-h8300.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=h8300xray
diff --git a/ld/config/irix4.mh b/ld/config/irix4.mh
deleted file mode 100644
index 0ac5b8c..0000000
--- a/ld/config/irix4.mh
+++ /dev/null
@@ -1,3 +0,0 @@
-# Irix 4.0.1 does not use /lib/crt0.o
-HOSTING_CRT0=/usr/lib/crt1.o
-HOSTING_LIBS=`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o
diff --git a/ld/config/m68k-coff.mt b/ld/config/m68k-coff.mt
deleted file mode 100644
index 98e4de7..0000000
--- a/ld/config/m68k-coff.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=m68kcoff
diff --git a/ld/config/m68k-elf.mt b/ld/config/m68k-elf.mt
deleted file mode 100644
index 44da123..0000000
--- a/ld/config/m68k-elf.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=m68kelf
diff --git a/ld/config/m68k-lynx.mt b/ld/config/m68k-lynx.mt
deleted file mode 100644
index 504661f..0000000
--- a/ld/config/m68k-lynx.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=m68klynx
diff --git a/ld/config/m68k-nbsd.mt b/ld/config/m68k-nbsd.mt
deleted file mode 100644
index f3c8c8a..0000000
--- a/ld/config/m68k-nbsd.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=m68knbsd
diff --git a/ld/config/m68k.mt b/ld/config/m68k.mt
deleted file mode 100644
index 2c7a01e..0000000
--- a/ld/config/m68k.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=m68kaout
diff --git a/ld/config/m68klynx.mh b/ld/config/m68klynx.mh
deleted file mode 100644
index 4867740..0000000
--- a/ld/config/m68klynx.mh
+++ /dev/null
@@ -1,2 +0,0 @@
-HOSTING_CRT0=/lib/init1.o
-HOSTING_LIBS=`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc -lm /lib/initn.o
diff --git a/ld/config/m68kv.mt b/ld/config/m68kv.mt
deleted file mode 100644
index cb4727b..0000000
--- a/ld/config/m68kv.mt
+++ /dev/null
@@ -1,2 +0,0 @@
-# This emulation seems not to exist.
-EMUL=m68kv
diff --git a/ld/config/m88k-bcs.mt b/ld/config/m88k-bcs.mt
deleted file mode 100644
index 601aed1..0000000
--- a/ld/config/m88k-bcs.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=m88kbcs
diff --git a/ld/config/mips-big.mt b/ld/config/mips-big.mt
deleted file mode 100644
index 895fb5d..0000000
--- a/ld/config/mips-big.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=mipsbig
diff --git a/ld/config/mips-idt.mt b/ld/config/mips-idt.mt
deleted file mode 100644
index 5c3920b..0000000
--- a/ld/config/mips-idt.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=mipsidt
diff --git a/ld/config/mips-lit.mt b/ld/config/mips-lit.mt
deleted file mode 100644
index 60138e8..0000000
--- a/ld/config/mips-lit.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=mipslit
diff --git a/ld/config/mips-vr4300.mt b/ld/config/mips-vr4300.mt
deleted file mode 100644
index 962ebd9..0000000
--- a/ld/config/mips-vr4300.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=elf32vr4300
diff --git a/ld/config/mips-vr4300el.mt b/ld/config/mips-vr4300el.mt
deleted file mode 100644
index b330b2b..0000000
--- a/ld/config/mips-vr4300el.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=elf32vr4300el
diff --git a/ld/config/mipsb-elf32.mt b/ld/config/mipsb-elf32.mt
deleted file mode 100644
index 610225a..0000000
--- a/ld/config/mipsb-elf32.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=elf32bmip
diff --git a/ld/config/mipsbsd.mh b/ld/config/mipsbsd.mh
deleted file mode 100644
index bbdebe5..0000000
--- a/ld/config/mipsbsd.mh
+++ /dev/null
@@ -1,2 +0,0 @@
-# BSD 4.4 uses /usr/lib/crt0.o
-HOSTING_CRT0=/usr/lib/crt0.o
diff --git a/ld/config/mipsbsd.mt b/ld/config/mipsbsd.mt
deleted file mode 100644
index d48c647..0000000
--- a/ld/config/mipsbsd.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=mipsbsd
diff --git a/ld/config/mipsl-elf32.mt b/ld/config/mipsl-elf32.mt
deleted file mode 100644
index 4c686ac..0000000
--- a/ld/config/mipsl-elf32.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=elf32lmip
diff --git a/ld/config/mipsl-idt.mt b/ld/config/mipsl-idt.mt
deleted file mode 100644
index c9496c6..0000000
--- a/ld/config/mipsl-idt.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=mipsidtl
diff --git a/ld/config/news.mt b/ld/config/news.mt
deleted file mode 100644
index 9bd82b8..0000000
--- a/ld/config/news.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=news
diff --git a/ld/config/ns32k-nbsd.mt b/ld/config/ns32k-nbsd.mt
deleted file mode 100644
index 54d7c5b..0000000
--- a/ld/config/ns32k-nbsd.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=ns32knbsd
diff --git a/ld/config/ose68.mt b/ld/config/ose68.mt
deleted file mode 100644
index 6d50298..0000000
--- a/ld/config/ose68.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=sun3
diff --git a/ld/config/pc532mach.mt b/ld/config/pc532mach.mt
deleted file mode 100644
index bc21e11..0000000
--- a/ld/config/pc532mach.mt
+++ /dev/null
@@ -1,2 +0,0 @@
-EMUL=pc532machaout
-OTHER_EMULATIONS=epc532machaout.o
diff --git a/ld/config/ppc-elf32.mt b/ld/config/ppc-elf32.mt
deleted file mode 100644
index f0d2056..0000000
--- a/ld/config/ppc-elf32.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=elf32ppc
diff --git a/ld/config/ppc-nw.mt b/ld/config/ppc-nw.mt
deleted file mode 100644
index 56f9727..0000000
--- a/ld/config/ppc-nw.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=ppcnw
diff --git a/ld/config/ppcle-elf32.mt b/ld/config/ppcle-elf32.mt
deleted file mode 100644
index 0c06800..0000000
--- a/ld/config/ppcle-elf32.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=elf32lppc
diff --git a/ld/config/rce-aout.mt b/ld/config/rce-aout.mt
deleted file mode 100644
index 9350550..0000000
--- a/ld/config/rce-aout.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=rce
diff --git a/ld/config/riscix.mt b/ld/config/riscix.mt
deleted file mode 100644
index 16a3d26..0000000
--- a/ld/config/riscix.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=riscix
diff --git a/ld/config/rtbsd.mh b/ld/config/rtbsd.mh
deleted file mode 100644
index 650593b..0000000
--- a/ld/config/rtbsd.mh
+++ /dev/null
@@ -1,6 +0,0 @@
-# The IBM RT/PC has only been supported as a host in a cross-development
-# environment. If you don't have gcc, I was able to get 'hc -Hnocpp -ma'
-# to compile most of the modules, but didn't try running anything.
-HDEFINES = -DNO_VARARGS
-LDFLAGS =
-CC=gcc # hc/pcc just can't cut it
diff --git a/ld/config/sa29200.mt b/ld/config/sa29200.mt
deleted file mode 100644
index 112d81f..0000000
--- a/ld/config/sa29200.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=sa29200
diff --git a/ld/config/solaris2.mh b/ld/config/solaris2.mh
deleted file mode 100644
index 042c2ed..0000000
--- a/ld/config/solaris2.mh
+++ /dev/null
@@ -1,4 +0,0 @@
-# Hosting files for Solaris
-HOSTING_CRT0=`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crt1.o/'; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crti.o/'; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtbegin.o/'; fi`
-HOSTING_LIBS=`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtend.o/'; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else gcc -print-libgcc-file-name | sed -e 's/libgcc.a/crtn.o/'; fi`
-NATIVE_LIB_DIRS=/usr/ccs/lib
diff --git a/ld/config/sparc-ll.mh b/ld/config/sparc-ll.mh
deleted file mode 100644
index 12cad67..0000000
--- a/ld/config/sparc-ll.mh
+++ /dev/null
@@ -1 +0,0 @@
-HDEFINES=-DHOST_64_BIT="long long"
diff --git a/ld/config/sparc-lynx.mt b/ld/config/sparc-lynx.mt
deleted file mode 100644
index 49ad557..0000000
--- a/ld/config/sparc-lynx.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=sparclynx
diff --git a/ld/config/sparc-nbsd.mt b/ld/config/sparc-nbsd.mt
deleted file mode 100644
index fe3f553..0000000
--- a/ld/config/sparc-nbsd.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=sparcnbsd
diff --git a/ld/config/sparc64-elf.mt b/ld/config/sparc64-elf.mt
deleted file mode 100644
index 28cedb8..0000000
--- a/ld/config/sparc64-elf.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=elf64_sparc
diff --git a/ld/config/st2000.mt b/ld/config/st2000.mt
deleted file mode 100644
index 2c63001..0000000
--- a/ld/config/st2000.mt
+++ /dev/null
@@ -1,2 +0,0 @@
-EMUL=st2000
-
diff --git a/ld/config/sun3.mh b/ld/config/sun3.mh
deleted file mode 100644
index 74bae76..0000000
--- a/ld/config/sun3.mh
+++ /dev/null
@@ -1 +0,0 @@
-HOSTING_CRT0=/usr/lib/crt0.o /usr/lib/Fcrt1.o -L/usr/lib/fsoft.o
diff --git a/ld/config/sun3.mt b/ld/config/sun3.mt
deleted file mode 100644
index 52c36bb..0000000
--- a/ld/config/sun3.mt
+++ /dev/null
@@ -1,2 +0,0 @@
-EMUL=sun3
-
diff --git a/ld/config/sun4.mt b/ld/config/sun4.mt
deleted file mode 100644
index 97bc9f9..0000000
--- a/ld/config/sun4.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=sun4
diff --git a/ld/config/sun4sol2.mt b/ld/config/sun4sol2.mt
deleted file mode 100644
index 398fbdf..0000000
--- a/ld/config/sun4sol2.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=elf32_sparc
diff --git a/ld/config/vax.mt b/ld/config/vax.mt
deleted file mode 100644
index 1cf8421..0000000
--- a/ld/config/vax.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=vax
diff --git a/ld/config/vsta.mt b/ld/config/vsta.mt
deleted file mode 100644
index 7dcc53b..0000000
--- a/ld/config/vsta.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=vsta
diff --git a/ld/config/vxworks68.mt b/ld/config/vxworks68.mt
deleted file mode 100644
index 6d50298..0000000
--- a/ld/config/vxworks68.mt
+++ /dev/null
@@ -1 +0,0 @@
-EMUL=sun3
diff --git a/ld/config/z8k-coff.mt b/ld/config/z8k-coff.mt
deleted file mode 100644
index ec0a07e..0000000
--- a/ld/config/z8k-coff.mt
+++ /dev/null
@@ -1,5 +0,0 @@
-EMUL=z8001
-EMUL=z8002
-
-
-
diff --git a/ld/emultempl/m88kbcs.em b/ld/emultempl/m88kbcs.em
index 9f04936..ebf58be 100644
--- a/ld/emultempl/m88kbcs.em
+++ b/ld/emultempl/m88kbcs.em
@@ -30,7 +30,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfdlink.h"
#include "ld.h"
-#include "config.h"
#include "ldemul.h"
#include "ldfile.h"
#include "ldmisc.h"
diff --git a/ld/mpw-emipsidt.c b/ld/mpw-emipsidt.c
index 498f688..554f9a8 100644
--- a/ld/mpw-emipsidt.c
+++ b/ld/mpw-emipsidt.c
@@ -28,7 +28,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfdlink.h"
#include "ld.h"
-#include "config.h"
#include "ldmain.h"
#include "ldemul.h"
#include "ldfile.h"
diff --git a/ld/mpw-esh.c b/ld/mpw-esh.c
index dac5c79..93bc5f5 100644
--- a/ld/mpw-esh.c
+++ b/ld/mpw-esh.c
@@ -28,7 +28,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfdlink.h"
#include "ld.h"
-#include "config.h"
#include "ldmain.h"
#include "ldemul.h"
#include "ldfile.h"
diff --git a/ld/sysdep.h b/ld/sysdep.h
new file mode 100644
index 0000000..1bf52cc
--- /dev/null
+++ b/ld/sysdep.h
@@ -0,0 +1,56 @@
+/* sysdep.h -- handle host dependencies for the GNU linker
+ Copyright (C) 1995 Free Software Foundation, Inc.
+
+ This file is part of GLD, the Gnu Linker.
+
+ GLD is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GLD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GLD; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#ifndef LD_SYSDEP_H
+#define LD_SYSDEP_H
+
+#include "config.h"
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#else
+extern char *strchr ();
+extern char *strrchr ();
+extern char *strstr ();
+#endif
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef USE_BINARY_FOPEN
+#include "fopen-bin.h"
+#else
+#include "fopen-same.h"
+#endif
+
+#endif /* ! defined (LD_SYSDEP_H) */