+2016-04-30 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/Make-lang.in (ACATSCMD): New variable.
+ (check-acats): Use it.
+ (check_acats_targets): Likewise.
+
2016-04-28 Eric Botcazou <ebotcazou@adacore.com>
PR ada/70786
check-ada-subtargets: check-acats-subtargets check-gnat-subtargets
ACATSDIR = $(TESTSUITEDIR)/ada/acats
+ACATSCMD = run_acats.sh
check_acats_numbers0:=1 2 3 4 5 6 7 8 9
check_acats_numbers1:=0 $(check_acats_numbers0)
mkdir $(ACATSDIR)-parallel; \
( testdir=`cd ${srcdir}/${ACATSDIR} && ${PWD_COMMAND}`; \
export testdir; \
- cd $(ACATSDIR) && $(SHELL) $${testdir}/run_acats NONE ) \
+ cd $(ACATSDIR) && $(SHELL) $${testdir}/$(ACATSCMD) NONE ) \
|| exit 1; \
GCC_RUNTEST_PARALLELIZE_DIR=$$rootme/$(ACATSDIR)-parallel; \
export GCC_RUNTEST_PARALLELIZE_DIR; \
exit 0; \
fi; \
testdir=`cd ${srcdir}/${ACATSDIR} && ${PWD_COMMAND}`; \
- export testdir; cd $(ACATSDIR) && $(SHELL) $${testdir}/run_acats $(CHAPTERS)
+ export testdir; cd $(ACATSDIR) && $(SHELL) $${testdir}/$(ACATSCMD) $(CHAPTERS)
check-acats-subtargets:
@echo check-acats
fi; \
test -d $(ACATSDIR)$* || mkdir -p $(ACATSDIR)$*; \
testdir=`cd ${srcdir}/${ACATSDIR} && ${PWD_COMMAND}`; \
- export testdir; cd $(ACATSDIR)$* && $(SHELL) $${testdir}/run_acats
+ export testdir; cd $(ACATSDIR)$* && $(SHELL) $${testdir}/$(ACATSCMD)
touch $$GCC_RUNTEST_PARALLELIZE_DIR/finished
.PHONY: check-acats $(check_acats_targets)
+2016-04-30 Eric Botcazou <ebotcazou@adacore.com>
+
+ * ada/acats/run_acats: Rename into...
+ * ada/acats/run_acats.sh: ...this. Only export BASE variable.
+ * ada/acats/run_all.sh: Remove redundant test.
+ (target_run): Move around.
+ (target_gnatchop): Use newly built executable.
+ (target_gnatmake): Likewise.
+ Check that the compilation of impbit succeeds.
+
2016-04-30 Oleg Endo <olegendo@gcc.gnu.org>
* g++.old-deja/g++.jason/thunk3.C: Remove SH5 checks.
+++ /dev/null
-#!/bin/sh
-
-if [ "$testdir" = "" ]; then
- echo You must use make check or make check-ada
- exit 1
-fi
-
-# Provide which replacement.
-#
-# type -p is missing from Solaris 2 /bin/sh and /bin/ksh (ksh88), but both
-# ksh93 and bash have it.
-# type output format differs between ksh88 and ksh93, so avoid it if
-# type -p is present. Unfortunately, HP-UX /bin/sh ignores -p with type.
-# Fall back to whence which ksh88 and ksh93 provide, but bash does not.
-
-which () {
- path=`type -p $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
- path=`type $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
- path=`whence $* 2>/dev/null` && { echo $path; return 0; }
- return 1
-}
-
-# Set up environment to use the Ada compiler from the object tree
-
-host_gnatchop=`which gnatchop`
-host_gnatmake=`which gnatmake`
-ROOT=`${PWDCMD-pwd}`
-BASE=`cd $ROOT/../../..; ${PWDCMD-pwd}`
-
-PATH=$BASE:$ROOT:$PATH
-ADA_INCLUDE_PATH=$BASE/ada/rts
-LD_LIBRARY_PATH=$ADA_INCLUDE_PATH:$BASE:$LD_LIBRARY_PATH
-ADA_OBJECTS_PATH=$ADA_INCLUDE_PATH
-
-if [ ! -d $ADA_INCLUDE_PATH ]; then
- echo gnatlib missing, exiting.
- exit 1
-fi
-
-if [ ! -f $BASE/gnatchop ]; then
- echo gnattools missing, exiting.
- exit 1
-fi
-
-if [ ! -f $BASE/gnatmake ]; then
- echo gnattools missing, exiting.
- exit 1
-fi
-
-GCC_DRIVER="$BASE/xgcc"
-GCC="$BASE/xgcc -B$BASE/"
-export PATH ADA_INCLUDE_PATH ADA_OBJECTS_PATH GCC_DRIVER GCC LD_LIBRARY_PATH
-
-echo '#!/bin/sh' > host_gnatchop
-echo PATH=`dirname $host_gnatchop`:'$PATH' >> host_gnatchop
-echo unset ADA_INCLUDE_PATH ADA_OBJECTS_PATH GCC_EXEC_PREFIX >> host_gnatchop
-echo export PATH >> host_gnatchop
-echo exec gnatchop '"$@"' >> host_gnatchop
-
-chmod +x host_gnatchop
-
-echo '#!/bin/sh' > host_gnatmake
-echo PATH=`dirname $host_gnatmake`:'$PATH' >> host_gnatmake
-echo unset ADA_INCLUDE_PATH ADA_OBJECTS_PATH GCC_EXEC_PREFIX >> host_gnatmake
-echo export PATH >> host_gnatmake
-echo exec gnatmake '"$@"' >> host_gnatmake
-
-chmod +x host_gnatmake
-
-# Limit the stack to 16MB for stack checking
-ulimit -s 16384
-
-exec $testdir/run_all.sh ${1+"$@"}
--- /dev/null
+#!/bin/sh
+
+if [ "$testdir" = "" ]; then
+ echo You must use make check or make check-ada
+ exit 1
+fi
+
+# Provide which replacement.
+#
+# type -p is missing from Solaris 2 /bin/sh and /bin/ksh (ksh88), but both
+# ksh93 and bash have it.
+# type output format differs between ksh88 and ksh93, so avoid it if
+# type -p is present. Unfortunately, HP-UX /bin/sh ignores -p with type.
+# Fall back to whence which ksh88 and ksh93 provide, but bash does not.
+
+which () {
+ path=`type -p $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
+ path=`type $* 2>/dev/null` && { echo $path | awk '{print $NF}'; return 0; }
+ path=`whence $* 2>/dev/null` && { echo $path; return 0; }
+ return 1
+}
+
+# Set up environment to use the Ada compiler from the object tree
+
+host_gnatchop=`which gnatchop`
+host_gnatmake=`which gnatmake`
+ROOT=`${PWDCMD-pwd}`
+BASE=`cd $ROOT/../../..; ${PWDCMD-pwd}`
+
+PATH=$BASE:$ROOT:$PATH
+ADA_INCLUDE_PATH=$BASE/ada/rts
+LD_LIBRARY_PATH=$ADA_INCLUDE_PATH:$BASE:$LD_LIBRARY_PATH
+ADA_OBJECTS_PATH=$ADA_INCLUDE_PATH
+
+if [ ! -d $ADA_INCLUDE_PATH ]; then
+ echo gnatlib missing, exiting.
+ exit 1
+fi
+
+if [ ! -f $BASE/gnatchop ]; then
+ echo gnattools missing, exiting.
+ exit 1
+fi
+
+if [ ! -f $BASE/gnatmake ]; then
+ echo gnattools missing, exiting.
+ exit 1
+fi
+
+export PATH ADA_INCLUDE_PATH ADA_OBJECTS_PATH BASE LD_LIBRARY_PATH
+
+echo '#!/bin/sh' > host_gnatchop
+echo PATH=`dirname $host_gnatchop`:'$PATH' >> host_gnatchop
+echo unset ADA_INCLUDE_PATH ADA_OBJECTS_PATH GCC_EXEC_PREFIX >> host_gnatchop
+echo export PATH >> host_gnatchop
+echo exec gnatchop '"$@"' >> host_gnatchop
+
+chmod +x host_gnatchop
+
+echo '#!/bin/sh' > host_gnatmake
+echo PATH=`dirname $host_gnatmake`:'$PATH' >> host_gnatmake
+echo unset ADA_INCLUDE_PATH ADA_OBJECTS_PATH GCC_EXEC_PREFIX >> host_gnatmake
+echo export PATH >> host_gnatmake
+echo exec gnatmake '"$@"' >> host_gnatmake
+
+chmod +x host_gnatmake
+
+# Limit the stack to 16MB for stack checking
+ulimit -s 16384
+
+exec $testdir/run_all.sh ${1+"$@"}
gccflags="-O2"
gnatflags="-gnatws"
-target_run () {
- eval $EXPECT -f $testdir/run_test.exp $*
-}
-
# End of customization section.
# Perform arithmetic evaluation on the ARGs, and store the result in the
dir=`${PWDCMD-pwd}`
-if [ "$testdir" = "" ]; then
- echo You must use make check or make check-ada
- exit 1
-fi
-
if [ "$dir" = "$testdir" ]; then
echo "error: srcdir must be different than objdir, exiting."
exit 1
fi
+GCC="$BASE/xgcc -B$BASE/"
+
target_gnatchop () {
- gnatchop --GCC="$GCC_DRIVER" $*
+ $BASE/gnatchop --GCC="$BASE/xgcc" $*
}
target_gnatmake () {
- echo gnatmake --GCC=\"$GCC\" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC=\"$GCC\"
- gnatmake --GCC="$GCC" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC="$GCC"
+ echo $BASE/gnatmake --GNATBIND=$BASE/gnatbind --GNATLINK=$BASE/gnatlink --GCC="$GCC" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC="$GCC"
+ $BASE/gnatmake --GNATBIND=$BASE/gnatbind --GNATLINK=$BASE/gnatlink --GCC="$GCC" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC="$GCC"
}
target_gcc () {
$GCC $gccflags $*
}
+target_run () {
+ eval $EXPECT -f $testdir/run_test.exp $*
+}
+
clean_dir () {
rm -f "$binmain" *.o *.ali > /dev/null 2>&1
}
# Find out the size in bit of an address on the target
target_gnatmake $testdir/support/impbit.adb >> $dir/acats.log 2>&1
+if [ $? -ne 0 ]; then
+ display "**** Failed to compile impbit"
+ exit 1
+fi
target_run $dir/support/impbit > $dir/support/impbit.out 2>&1
target_bit=`cat $dir/support/impbit.out`
echo target_bit="$target_bit" >> $dir/acats.log