aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorDavid MacKenzie <djm@cygnus>1993-07-03 02:18:12 +0000
committerDavid MacKenzie <djm@cygnus>1993-07-03 02:18:12 +0000
commitff76a7dbf3f970aa7d3138d74035938d0d3ab306 (patch)
tree75e1ff344dfca339192aa670417d3e5a85032d06 /ld
parent173a0c3d261a0694f4bc612991e7d9e8e9965337 (diff)
downloadgdb-ff76a7dbf3f970aa7d3138d74035938d0d3ab306.zip
gdb-ff76a7dbf3f970aa7d3138d74035938d0d3ab306.tar.gz
gdb-ff76a7dbf3f970aa7d3138d74035938d0d3ab306.tar.bz2
Fix previous fix.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog13
-rw-r--r--ld/Makefile.in4
-rwxr-xr-xld/genscripts.sh17
-rw-r--r--ld/ldmain.c5
4 files changed, 28 insertions, 11 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 30550af..8c4857f 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,16 @@
+Fri Jul 2 18:06:05 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * genscripts.sh: Put the scripts in the ldscripts directory, not
+ emulations.
+ * configure.in (ldscripts): Make, instead of emulations.
+ * Makefile.in (scriptdir): Take off the "ld" part.
+ (install, clean, distclean): Use ldscripts, not emulations.
+ In tests, pass -L., not -Lemulations.
+ Don't pass tooldir/lib to genscripts.sh.
+ * genscripts.sh: Don't take tooldir/lib arg.
+ * ldlang.c (lang_process): Add "ldscripts/" to the name of the
+ default script file.
+
Fri Jul 2 17:13:35 1993 Doug Evans (dje@canuck.cygnus.com)
* scripttempl/h8300.sc: Add .tors section for constructor/destructors.
diff --git a/ld/Makefile.in b/ld/Makefile.in
index d385014..6c0b5c0 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -185,7 +185,7 @@ DEF_EMUL = ` if [ -z "$(EMUL)" ] ; then \
fi`
ldmain.o: ldmain.c
- $(CC) -c $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $(DEF_EMUL) $(CFLAGS) $<
+ $(CC) -c $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $(DEF_EMUL) -DSCRIPTDIR='"$(scriptdir)"' $(CFLAGS) $<
ldemul-list.h:
(echo "/* This file is automatically generated. DO NOT EDIT! */";\
@@ -209,7 +209,7 @@ ldlex.c: ldlex.l ldgram.h
# These all start with em_ so 'make clean' can find them.
-GENSCRIPTS=sh $(srcdir)/genscripts.sh ${srcdir} ${tooldir}/lib ${libdir} ${host_alias} ${target_alias}
+GENSCRIPTS=sh $(srcdir)/genscripts.sh ${srcdir} ${libdir} ${host_alias} ${target_alias}
GEN_DEPENDS=$(srcdir)/genscripts.sh
em_sun4.c: $(srcdir)/emulparams/sun4.sh \
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
index 99434ee..a6a0e2e 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -1,19 +1,18 @@
# genscripts.sh
# This shell script does the work of generating the ld-emulation-target
# specific information from a specific file of paramaters.
-# Usage: genscripts.sh srcdir tooldirlib libdir host_alias target_alias emulation_name
+# Usage: genscripts.sh srcdir libdir host_alias target_alias emulation_name
# Sample usage:
-# genscripts.sh /offsite/djm/work/devo/ld /usr/local/sparc-sun-sunos4.1.3/lib /usr/local/lib sparc-sun-sunos4.1.3 sparc-sun-sunos4.1.3 sun3.sh
+# genscripts.sh /offsite/djm/work/devo/ld /usr/local/lib sparc-sun-sunos4.1.3 sparc-sun-sunos4.1.3 sun3.sh
# produces sun3.x sun3.xbn sun3.xn sun3.xr sun3.xu em_sun3.c
srcdir=$1
-tooldirlib=$2
-libdir=$3
-host_alias=$4
-target_alias=$5
+libdir=$2
+host_alias=$3
+target_alias=$4
# Include the emulation-specific parameters:
-. ${srcdir}/emulparams/$6
+. ${srcdir}/emulparams/$5
# Set the library search path, for libraries named by -lfoo.
# If LIB_PATH is defined (e.g., by Makefile) and non-empty, it is used.
@@ -25,13 +24,13 @@ target_alias=$5
if [ "x${LIB_PATH}" = "x" ] ; then
if [ "x${host_alias}" = "x${target_alias}" ] ; then
# Native.
- LIB_PATH=/lib:/usr/lib:${tooldirlib}:${libdir}
+ LIB_PATH=/lib:/usr/lib:${libdir}
if [ "${libdir}" != /usr/local/lib ] ; then
LIB_PATH=${LIB_PATH}:/usr/local/lib
fi
else
# Cross.
- LIB_PATH=${tooldirlib}
+ LIB_PATH=
fi
fi
LIB_SEARCH_DIRS=`echo ${LIB_PATH} | tr ':' ' ' | sed -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\1);/g'`
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 36a6f0d..0ee740c 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -187,6 +187,11 @@ main (argc, argv)
ldsym_init ();
ldfile_add_arch ("");
+ /* Set the default directory for finding script files.
+ Libraries will be searched for here too, but we want
+ them to be, anyway. */
+ ldfile_add_library_path (SCRIPTDIR);
+
config.make_executable = true;
force_make_executable = false;