This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Genscripts.sh does not use ${tooldir}


Hi,

 The genscripts.sh script for ld ignores ${tooldir} and tries to guess it
based on ${libdir}.  I don't believe it's the right approach especially as
I can't see anything preventing Makefiles from delegating ${tooldir} to
the script.  It makes breakage when ${tooldir} is
${exec_prefix}/<target_alias> but ${libdir} is not ${exec_prefix}/lib. 

 I propose the following patch that works for me.  There is only a single
reference to genscripts.sh within the whole source tree so I don't believe
we need to stick to any backward compatibility.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

Mon Oct 11 1999  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>

        * genscripts.sh: Expect a full path of tooldir as the
        third argument.  Shift the former third through eighth
        arguments right by one.  Do not handle a basename of
        tooldir as the last argument anymore.
        * Makefile.am (GENSCRIPTS): Modify accordingly.
        * Makefile.in: Regenerate.


diff -u --recursive --new-file binutils.macro/ld/Makefile.am binutils/ld/Makefile.am
--- binutils.macro/ld/Makefile.am	Fri Sep 24 14:11:04 1999
+++ binutils/ld/Makefile.am	Sun Oct  3 18:44:51 1999
@@ -270,7 +270,7 @@
 
 # These all start with e so 'make clean' can find them.
 
-GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
+GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} ${tooldir} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
 GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
 @TDIRS@
 
diff -u --recursive --new-file binutils.macro/ld/genscripts.sh binutils/ld/genscripts.sh
--- binutils.macro/ld/genscripts.sh	Tue Aug 10 14:36:57 1999
+++ binutils/ld/genscripts.sh	Sun Oct  3 18:43:21 1999
@@ -1,23 +1,25 @@
 #!/bin/sh
 # genscripts.sh - generate the ld-emulation-target specific files
 #
-# Usage: genscripts.sh srcdir libdir host target target_alias \
-# default_emulation native_lib_dirs this_emulation tool_dir
+# Usage: genscripts.sh srcdir libdir tooldir host target target_alias \
+# default_emulation native_lib_dirs this_emulation
 #
 # Sample usage:
-# genscripts.sh /djm/ld-devo/devo/ld /usr/local/lib sparc-sun-sunos4.1.3 \
-# sparc-sun-sunos4.1.3 sparc-sun-sunos4.1.3 sun4 "" sun3 sparc-sun-sunos4.1.3
+# genscripts.sh /djm/ld-devo/devo/ld /usr/local/lib \
+# /usr/local/sparc-sun-sunos4.1.3 sparc-sun-sunos4.1.3 \
+# sparc-sun-sunos4.1.3 sparc-sun-sunos4.1.3 sun4 "" sun3
 # produces sun3.x sun3.xbn sun3.xn sun3.xr sun3.xu em_sun3.c
 
 srcdir=$1
 libdir=$2
-host=$3
-target=$4
-target_alias=$5
-EMULATION_LIBPATH=$6
-NATIVE_LIB_DIRS=$7
-EMULATION_NAME=$8
-tool_lib=`echo ${libdir} | sed -e 's|/lib$||'`/${9-$target_alias}/lib
+tooldir=$3
+host=$4
+target=$5
+target_alias=$6
+EMULATION_LIBPATH=$7
+NATIVE_LIB_DIRS=$8
+EMULATION_NAME=$9
+tool_lib=${tooldir}/lib
 
 # Include the emulation-specific parameters:
 . ${srcdir}/emulparams/${EMULATION_NAME}.sh



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]