This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
2.10.91: genscripts.sh outputs incorrect paths
- To: binutils at sourceware dot cygnus dot com
- Subject: 2.10.91: genscripts.sh outputs incorrect paths
- From: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- Date: Fri, 19 Jan 2001 21:16:45 +0100 (MET)
- Organization: Technical University of Gdansk
- Reply-To: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
Hi,
Another old one resent...
The genscripts.sh script constructs search paths for ld scripts
incorrectly. This does not show all the time, but e.g. when I configure
binutils as follows:
./configure --prefix=/usr
'--libdir=${exec_prefix}/mipsel-linux/i386-linux/lib' --enable-shared
--disable-static --cache-file=config.cache --build=i386-linux
--host=i386-linux --target=mipsel-linux
I get the search path as follows:
SEARCH_DIR(/usr/mipsel-linux/i386-linux/mipsel-linux/lib);
which is obviously incorrect, as it should be set to ${tooldir}/lib and
not based on ${libdir} which points to host libraries.
ld/ChangeLog:
2001-01-19 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* genscripts.sh: Use ${tooldir} passed explicitly to build search
paths.
* Makefile.am (GENSCRIPTS): Pass ${tooldir} to genscripts.sh.
* Makefile.in: Regenerate.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
binutils-2.9.5-genscripts.patch
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