[RFA/testsuite] asm-source.exp
Elena Zannoni
ezannoni@redhat.com
Fri Apr 5 13:02:00 GMT 2002
Install tree testing for asm-source.exp doesn't work, because the
arch.inc file is not found.
For instance on linux:
Running /bart/ezannoni/uberbaum/src/gdb/testsuite/gdb.asm/asm-source.exp ...
Executing on host: as /bart/ezannoni/uberbaum/src/gdb/testsuite/gdb.asm/asmsrc1.s -gstabs -I/bart/ezannoni/uberbaum/src/gdb/testsuite/gdb.asm -I/bart/ezannoni/tests-installed/i686-pc-linux-gnu-20020405/gdb/testsuite/gdb.asm -o asmsrc1.o (timeout = 300)
spawn as /bart/ezannoni/uberbaum/src/gdb/testsuite/gdb.asm/asmsrc1.s -gstabs -I/bart/ezannoni/uberbaum/src/gdb/testsuite/gdb.asm -I/bart/ezannoni/tests-installed/i686-pc-linux-gnu-20020405/gdb/testsuite/gdb.asm -o asmsrc1.o
/bart/ezannoni/uberbaum/src/gdb/testsuite/gdb.asm/asmsrc1.s: Assembler messages:
/bart/ezannoni/uberbaum/src/gdb/testsuite/gdb.asm/asmsrc1.s:2: Error: can't open arch.inc for reading
/bart/ezannoni/uberbaum/src/gdb/testsuite/gdb.asm/asmsrc1.s:2: arch.inc: No such file or directory
How about the following patch? Seems to work for me.
Elena
2002-04-05 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.
Index: asm-source.exp
===================================================================
RCS file: /cvs/uberbaum/gdb/testsuite/gdb.asm/asm-source.exp,v
retrieving revision 1.19
diff -u -p -r1.19 asm-source.exp
--- asm-source.exp 2002/04/05 02:48:23 1.19
+++ asm-source.exp 2002/04/05 20:51:22
@@ -72,6 +72,10 @@ set binfile ${objdir}/${subdir}/${testfi
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}"
Index: configure
===================================================================
RCS file: /cvs/uberbaum/gdb/testsuite/gdb.asm/configure,v
retrieving revision 1.9
diff -u -p -r1.9 configure
--- configure 2002/04/05 02:48:23 1.9
+++ configure 2002/04/05 20:51:22
@@ -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 r
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/^\([^-]*\)-
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/^\([^-]
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
Index: configure.in
===================================================================
RCS file: /cvs/uberbaum/gdb/testsuite/gdb.asm/configure.in,v
retrieving revision 1.9
diff -u -p -r1.9 configure.in
--- configure.in 2002/04/05 02:48:23 1.9
+++ configure.in 2002/04/05 20:51:22
@@ -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)
More information about the Gdb-patches
mailing list