Commit 53b8fe3e by Eric Botcazou Committed by Eric Botcazou

run_acats: Treat 'gnatchop' the same way as 'gnatmake'.

	* ada/acats/run_acats: Treat 'gnatchop' the same way
	as 'gnatmake'.  Export GCC_DRIVER.
	* ada/acats/run_all.sh: Add target_gnatchop.  Use
	'host_gnatchop' and 'target_gnatchop' instead of 'gnatshop'.

From-SVN: r75551
parent 7ddb6568
2004-01-08 Eric Botcazou <ebotcazou@libertysurf.fr>
* ada/acats/run_acats: Treat 'gnatchop' the same way
as 'gnatmake'. Export GCC_DRIVER.
* ada/acats/run_all.sh: Add target_gnatchop. Use
'host_gnatchop' and 'target_gnatchop' instead of 'gnatshop'.
2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org> 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/12573 PR c++/12573
......
...@@ -7,6 +7,7 @@ fi ...@@ -7,6 +7,7 @@ fi
# Set up environment to use the Ada compiler from the object tree # Set up environment to use the Ada compiler from the object tree
host_gnatchop=`type gnatchop | awk '{print $3}'`
host_gnatmake=`type gnatmake | awk '{print $3}'` host_gnatmake=`type gnatmake | awk '{print $3}'`
ROOT=`${PWDCMD-pwd}` ROOT=`${PWDCMD-pwd}`
BASE=`cd $ROOT/../../..; ${PWDCMD-pwd}` BASE=`cd $ROOT/../../..; ${PWDCMD-pwd}`
...@@ -20,13 +21,27 @@ if [ ! -d $ADA_INCLUDE_PATH ]; then ...@@ -20,13 +21,27 @@ if [ ! -d $ADA_INCLUDE_PATH ]; then
exit 1 exit 1
fi fi
if [ ! -f $BASE/gnatchop ]; then
echo gnattools missing, exiting.
exit 1
fi
if [ ! -f $BASE/gnatmake ]; then if [ ! -f $BASE/gnatmake ]; then
echo gnattools missing, exiting. echo gnattools missing, exiting.
exit 1 exit 1
fi fi
GCC_DRIVER="$BASE/xgcc"
GCC="$BASE/xgcc -B$BASE/" GCC="$BASE/xgcc -B$BASE/"
export PATH ADA_INCLUDE_PATH ADA_OBJECTS_PATH GCC export PATH ADA_INCLUDE_PATH ADA_OBJECTS_PATH GCC_DRIVER GCC
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 $host_gnatchop '"$@"' >> host_gnatchop
chmod +x host_gnatchop
echo '#!/bin/sh' > host_gnatmake echo '#!/bin/sh' > host_gnatmake
echo PATH=`dirname $host_gnatmake`:'$PATH' >> host_gnatmake echo PATH=`dirname $host_gnatmake`:'$PATH' >> host_gnatmake
......
...@@ -47,6 +47,10 @@ if [ "$dir" = "$testdir" ]; then ...@@ -47,6 +47,10 @@ if [ "$dir" = "$testdir" ]; then
exit 1 exit 1
fi fi
target_gnatchop () {
gnatchop --GCC="$GCC_DRIVER" $*
}
target_gnatmake () { target_gnatmake () {
gnatmake --GCC="$GCC" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC="$GCC" gnatmake --GCC="$GCC" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC="$GCC"
} }
...@@ -101,7 +105,7 @@ mkdir -p $dir/run ...@@ -101,7 +105,7 @@ mkdir -p $dir/run
cp -pr $testdir/tests $dir/ cp -pr $testdir/tests $dir/
for i in $dir/support/*.ada $dir/support/*.a; do for i in $dir/support/*.ada $dir/support/*.a; do
gnatchop $i >> $dir/acats.log 2>&1 host_gnatchop $i >> $dir/acats.log 2>&1
done done
# These tools are used to preprocess some ACATS sources # These tools are used to preprocess some ACATS sources
...@@ -139,7 +143,7 @@ if [ $? -ne 0 ]; then ...@@ -139,7 +143,7 @@ if [ $? -ne 0 ]; then
exit 1 exit 1
fi fi
gnatchop *.adt >> $dir/acats.log 2>&1 target_gnatchop *.adt >> $dir/acats.log 2>&1
target_gnatmake -c -gnato -gnatE *.ads > /dev/null 2>&1 target_gnatmake -c -gnato -gnatE *.ads > /dev/null 2>&1
target_gnatmake -c -gnato -gnatE *.adb target_gnatmake -c -gnato -gnatE *.adb
...@@ -188,7 +192,7 @@ for chapter in $chapters; do ...@@ -188,7 +192,7 @@ for chapter in $chapters; do
test=$dir/tests/$chapter/$i test=$dir/tests/$chapter/$i
mkdir $test mkdir $test
cd $test cd $test
gnatchop -c -w `ls ${test}*.a ${test}*.ada ${test}*.adt ${test}*.am ${test}*.dep 2> /dev/null` >> $dir/acats.log 2>&1 target_gnatchop -c -w `ls ${test}*.a ${test}*.ada ${test}*.adt ${test}*.am ${test}*.dep 2> /dev/null` >> $dir/acats.log 2>&1
ls ${i}?.adb > ${i}.lst 2> /dev/null ls ${i}?.adb > ${i}.lst 2> /dev/null
ls ${i}*m.adb >> ${i}.lst 2> /dev/null ls ${i}*m.adb >> ${i}.lst 2> /dev/null
ls ${i}.adb >> ${i}.lst 2> /dev/null ls ${i}.adb >> ${i}.lst 2> /dev/null
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment