Fix previous fix.
authorDavid MacKenzie <djm@cygnus>
Sat, 3 Jul 1993 02:18:12 +0000 (02:18 +0000)
committerDavid MacKenzie <djm@cygnus>
Sat, 3 Jul 1993 02:18:12 +0000 (02:18 +0000)
ld/ChangeLog
ld/Makefile.in
ld/genscripts.sh
ld/ldmain.c

index 30550af8e3e0ce3c7ac266d9f2cf0c5cc369986c..8c4857f2476d5c387f0d9a7281af206a38067fe0 100644 (file)
@@ -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.
index d38501492ddadc10e6619110a40a77960f6f8331..6c0b5c0163807abafd6582937d75adcbe422b870 100644 (file)
@@ -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 \
index 99434eefc024000e407f1d60b278055fc276fdeb..a6a0e2e40280bbe9385fa0e069116800d068b323 100755 (executable)
@@ -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'`
index 36a6f0d52e8806b7067ef4e47db071d939ab7489..0ee740cc29ad75d744baf05cc5e78254d9d8e306 100644 (file)
@@ -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;
 
This page took 0.031939 seconds and 4 git commands to generate.