if [ "$priority" = "1" ] ; then
confopt="$confopt --disable-nls"
libpath="$prefix/lib"
+ echo "libpath = $libpath"
fi
if [ "$priority" = "4" ] ; then
custmain=1
custmain() {
- # install the ld linking against new libc
- mv -v $bindir/{ld,ld-old}
+ # install the ld linking against toolchain libc
+ mv -v $prefix/bin/{ld,ld-old}
mv -v $prefix/`gcc -dumpmachine`/bin/{ld,ld-old}
- mv -v $bindir/{ld-new,ld}
- ln -sfv $bindir/ld $prefix/`gcc -dumpmachine`/bin/ld
+ mv -v $prefix/bin/{ld-new,ld}
+ ln -sfv $prefix/bin/ld $prefix/`gcc -dumpmachine`/bin/ld
# show new linker to gcc
- SPECFILE="`gcc --print-file specs`" &&
+ SPECFILE="`gcc -print-libgcc-file-name`"
+ SPECFILE="`dirname $SPECFILE`/specs"
+ gcc -dumpspecs |
sed -e "s@/lib/ld.so.1@$prefix/lib/ld.so.1@g" \
- -e "s@/lib/ld-linux.so.2@$prefix/lib/ld-linux.so.2@g" \
- $SPECFILE > tempspecfile
- mv tempspecfile $SPECFILE
+ -e "s@/lib/ld-linux.so.2@$prefix/lib/ld-linux.so.2@g" > \
+ $SPECFILE
+ echo "debug: (specfile ->$SPECFILE)"
+ cp -v $SPECFILE $hdw_home_dir
+ cat $SPECFILE
+ echo "debug: (gcc -dumpspecs)"
+ gcc -dumpspecs
INCDIR="`dirname $SPECFILE`/include"
unset SPECFILE
fi
if [ "$priority" = "5" ] ; then
- confopt="$confopt --enable-shared --with-lib-path=$prefix/lib"
+ confopt="$confopt --disable-nls --with-lib-path=$prefix/lib"
if [ "$hdw_crossbuild" = "0" ] ; then
libpath="/usr/lib:/lib"
else
- libpath="$prefix/usr/lib:$prefix/lib"
+ libpath="$root/usr/lib:$root/lib"
fi
fi
# (glibc will go there)
make -C ld clean
make -C ld LIB_PATH=$libpath
- cp -v ld/ld-new $bindir
+ cp -v ld/ld-new $prefix/bin
}