2002-04-07 Elena Zannoni <ezannoni@redhat.com>

* gdb.asm/asm-source.exp: Build symbolic link to arch specific
        instructions file at run time instead of configure time.
        Sometimes we run the test in a directory that is not the one we
        configured in.
        * gdb.asm/configure.in: Delete creation of symlink.
        * gdb.asm/configure: Regenerate.
This commit is contained in:
Elena Zannoni 2002-04-07 23:57:23 +00:00
parent 7aa83cacfa
commit 16a8534aff
4 changed files with 33 additions and 83 deletions

View File

@ -1,3 +1,12 @@
2002-04-07 Elena Zannoni <ezannoni@redhat.com>
* gdb.asm/asm-source.exp: Build symbolic link to arch specific
instructions file at run time instead of configure time.
Sometimes we run the test in a directory that is not the one we
configured in.
* gdb.asm/configure.in: Delete creation of symlink.
* gdb.asm/configure: Regenerate.
2002-04-05 J. Brobecker <brobecker@gnat.com>
* gdb.gdb/xfullpath.exp: New test, to exercise the new

View File

@ -1,4 +1,4 @@
# Copyright 1998, 2000 Free Software Foundation, Inc.
# Copyright 1998, 2000, 2002 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -72,6 +72,10 @@ set binfile ${objdir}/${subdir}/${testfile}
set src1 ${srcdir}/${subdir}/asmsrc1.s
set src2 ${srcdir}/${subdir}/asmsrc2.s
set insn_file ${srcdir}/${subdir}/${asm-arch}.inc
remote_exec build "rm -f ${objdir}/${subdir}/arch.inc"
remote_exec build "ln -s ${insn_file} ${objdir}/${subdir}/arch.inc"
if { "${asm-flags}" == "" } {
#set asm-flags "-Wa,-gstabs,-I${srcdir}/${subdir},-I${objdir}/${subdir}"
set asm-flags "-gstabs -I${srcdir}/${subdir} -I${objdir}/${subdir}"

View File

@ -28,6 +28,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
sitefile=
srcdir=
target=NONE
verbose=
@ -142,6 +143,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
--site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@ -312,6 +314,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
-site-file | --site-file | --site-fil | --site-fi | --site-f)
ac_prev=sitefile ;;
-site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
sitefile="$ac_optarg" ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@ -477,12 +484,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
if test -z "$sitefile"; then
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
fi
else
CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@ -571,7 +582,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:575: checking host system type" >&5
echo "configure:586: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@ -592,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:596: checking target system type" >&5
echo "configure:607: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@ -610,7 +621,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:614: checking build system type" >&5
echo "configure:625: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@ -633,20 +644,6 @@ test "$host_alias" != "$target_alias" &&
program_prefix=${target_alias}-
archinc=common.inc
case ${target} in
*arm-*-*) archinc=arm.inc ;;
xscale-*-*) archinc=arm.inc ;;
d10v-*-*) archinc=d10v.inc ;;
s390-*-*) archinc=s390.inc ;;
i[3456]86*) archinc=i386.inc ;;
m32r*-*) archinc=m32r.inc ;;
powerpc*-*) archinc=powerpc.inc ;;
sparc-*-*) archinc=sparc.inc ;;
xstormy16-*-*) archinc=xstormy16.inc ;;
esac
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@ -902,51 +899,6 @@ s%@top_srcdir@%$top_srcdir%g
fi; done
rm -f conftest.s*
EOF
cat >> $CONFIG_STATUS <<EOF
ac_sources="$archinc"
ac_dests="arch.inc"
EOF
cat >> $CONFIG_STATUS <<\EOF
srcdir=$ac_given_srcdir
while test -n "$ac_sources"; do
set $ac_dests; ac_dest=$1; shift; ac_dests=$*
set $ac_sources; ac_source=$1; shift; ac_sources=$*
echo "linking $srcdir/$ac_source to $ac_dest"
if test ! -r $srcdir/$ac_source; then
{ echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
fi
rm -f $ac_dest
# Make relative symlinks.
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
# The dest file is in a subdirectory.
test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
# A "../" for each directory in $ac_dest_dir_suffix.
ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
else
ac_dest_dir_suffix= ac_dots=
fi
case "$srcdir" in
[/$]*) ac_rel_source="$srcdir/$ac_source" ;;
*) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
esac
# Make a symlink if possible; otherwise try a hard link.
if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
ln $srcdir/$ac_source $ac_dest; then :
else
{ echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
fi
done
EOF
cat >> $CONFIG_STATUS <<EOF

View File

@ -12,19 +12,4 @@ AC_SUBST(CC)
AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
AC_CANONICAL_SYSTEM
dnl In default case we need to link with some file so use common.inc.
archinc=common.inc
case ${target} in
*arm-*-*) archinc=arm.inc ;;
xscale-*-*) archinc=arm.inc ;;
d10v-*-*) archinc=d10v.inc ;;
s390-*-*) archinc=s390.inc ;;
i[[3456]]86*) archinc=i386.inc ;;
m32r*-*) archinc=m32r.inc ;;
powerpc*-*) archinc=powerpc.inc ;;
sparc-*-*) archinc=sparc.inc ;;
xstormy16-*-*) archinc=xstormy16.inc ;;
esac
AC_LINK_FILES($archinc,arch.inc)
AC_OUTPUT(Makefile)