diff options
author | marino <marino> | 2015-06-15 09:46:27 +0000 |
---|---|---|
committer | marino <marino> | 2015-06-15 09:46:27 +0000 |
commit | aa4f2afa7b60449238a5e02bcd9e737d22be2364 (patch) | |
tree | 068e1abe4c84b74e5be1683f45e1b68d20d12fdf /lang/gcc5-aux/files/diff-ada-testsuite | |
parent | df13e3daf277f073f7fc689bf09de05e3480a58e (diff) | |
download | pkgsrc-aa4f2afa7b60449238a5e02bcd9e737d22be2364.tar.gz |
Import lang/gcc5-aux based on gcc-5.1
This compiler package is not like the lang/gcc4* packages, but rather
the lang/gcc-aux package which exists to bring GNAT, the Ada language
compiler. The lang/gcc-aux package is based on gcc-4.9, and this
package is based on gcc-5. This is the first gcc5 package in pkgsrc,
and it does support C, C++, ObjC, and Fortran in addition to Ada thus
it is very useful, but it does have a different purpose than other
gcc ports.
This port has had minimal testing. I verified GNAT passes 100% of the
testsuite on NetBSD 6.1/amd64, but it has not been tested on any
NetBSD 5, 7.0 or 7.99 platform yet. I don't have any hardware, so it
will require using a VM or having others report failure/success. Due
to similarity with lang/gcc-aux, chances are good that it will build
and function properly on other platforms.
See http://gcc.gnu.org/gcc-5/changes.html for more information about
improvements over the gcc-4.9 series.
Diffstat (limited to 'lang/gcc5-aux/files/diff-ada-testsuite')
-rw-r--r-- | lang/gcc5-aux/files/diff-ada-testsuite | 584 |
1 files changed, 584 insertions, 0 deletions
diff --git a/lang/gcc5-aux/files/diff-ada-testsuite b/lang/gcc5-aux/files/diff-ada-testsuite new file mode 100644 index 00000000000..725726e66c8 --- /dev/null +++ b/lang/gcc5-aux/files/diff-ada-testsuite @@ -0,0 +1,584 @@ +--- gcc/testsuite/ada/acats/run_acats.orig ++++ gcc/testsuite/ada/acats/run_acats +@@ -5,20 +5,6 @@ + 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 + +--- gcc/testsuite/ada/acats/run_all.sh.orig ++++ gcc/testsuite/ada/acats/run_all.sh +@@ -50,6 +50,14 @@ + echo "$@" >> $dir/acats.log + } + ++inform () { ++ printf "%04d %7s" $1 $2 ++} ++ ++disinform () { ++ printf "\r" ++} ++ + dir=`${PWDCMD-pwd}` + + if [ "$testdir" = "" ]; then +@@ -231,6 +239,18 @@ + par_countm=0 + par_last= + ++countdown=0 ++for chapter in $chapters; do ++ if [ -d $dir/tests/$chapter ]; then ++ cd $dir/tests/$chapter ++ ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \ ++ cut -c1-7 | sort | uniq | comm -23 - $dir/support/norun.lst \ ++ > $dir/tests/$chapter/${chapter}.lst ++ countn=`wc -l < $dir/tests/$chapter/${chapter}.lst` ++ countdown=`expr $countdown + $countn` ++ fi ++done ++ + for chapter in $chapters; do + # Used to generate support once and finish after that. + [ "$chapter" = "NONE" ] && continue +@@ -243,10 +263,6 @@ + continue + fi + +- cd $dir/tests/$chapter +- ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \ +- cut -c1-7 | sort | uniq | comm -23 - $dir_support/norun.lst \ +- > $dir/tests/$chapter/${chapter}.lst + countn=`wc -l < $dir/tests/$chapter/${chapter}.lst` + as_fn_arith $glob_countn + $countn + glob_countn=$as_val +@@ -299,10 +315,13 @@ + if [ $? -eq 0 ]; then + extraflags="$extraflags -fstack-check" + fi ++ inform $countdown $i ++ countdown=`expr $countdown - 1` + test=$dir/tests/$chapter/$i + mkdir $test && cd $test >> $dir/acats.log 2>&1 + + if [ $? -ne 0 ]; then ++ disinform + display "FAIL: $i" + failed="${failed}${i} " + clean_dir +@@ -323,8 +342,10 @@ + cxb30*) EXTERNAL_OBJECTS="$dir_support/cxb30040.o $dir_support/cxb30060.o $dir_support/cxb30130.o $dir_support/cxb30131.o";; + ca1020e) rm -f ca1020e_func1.adb ca1020e_func2.adb ca1020e_proc1.adb ca1020e_proc2.adb > /dev/null 2>&1;; + ca14028) rm -f ca14028_func2.ads ca14028_func3.ads ca14028_proc1.ads ca14028_proc3.ads > /dev/null 2>&1;; ++ cxh1001) extraflags="-a -f"; echo "pragma Normalize_Scalars;" > gnat.adc + esac + if [ "$main" = "" ]; then ++ disinform + display "FAIL: $i" + failed="${failed}${i} " + clean_dir +@@ -333,6 +354,7 @@ + + target_gnatmake $extraflags -I$dir_support $main >> $dir/acats.log 2>&1 + if [ $? -ne 0 ]; then ++ disinform + display "FAIL: $i" + failed="${failed}${i} " + clean_dir +@@ -347,6 +369,7 @@ + target_run $dir/tests/$chapter/$i/$binmain > $dir/tests/$chapter/$i/${i}.log 2>&1 + cd $dir/tests/$chapter/$i + cat ${i}.log >> $dir/acats.log ++ disinform + egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' ${i}.log > /dev/null 2>&1 + if [ $? -ne 0 ]; then + grep 'tasking not implemented' ${i}.log > /dev/null 2>&1 +--- /dev/null ++++ gcc/testsuite/ada/acats/run_remote.sh +@@ -0,0 +1,412 @@ ++#!/bin/sh ++# Run ACATS with the GNU Ada compiler ++ ++# The following functions are to be customized if you run in cross ++# environment or want to change compilation flags. Note that for ++# tests requiring checks not turned on by default, this script ++# automatically adds the needed flags to pass (ie: -gnato or -gnatE). ++ ++# gccflags="-O3 -fomit-frame-pointer -funroll-all-loops -finline-functions" ++# gnatflags="-gnatN" ++ ++gccflags="-O2" ++gnatflags="-gnatws" ++tabtarget="/data/local/testsuite" ++STRIP="arm-aux-linux-androideabi-strip" ++ ++target_run () { ++ # Run on rooted tablet (port 22 vs port 2222) ++ BN=`basename $*` ++ $STRIP_FOR_TARGET $* ++ /usr/bin/scp -qp $* root@tablet:$tabtarget/ ++ /usr/bin/ssh -q tablet $tabtarget/$BN ++} ++ ++target_cmd () { ++ /usr/bin/ssh -q tablet "$1" ++} ++ ++# End of customization section. ++ ++display_noeol () { ++ printf "$@" ++ printf "$@" >> $dir/acats.sum ++ printf "$@" >> $dir/acats.log ++} ++ ++display () { ++ echo "$@" ++ echo "$@" >> $dir/acats.sum ++ echo "$@" >> $dir/acats.log ++} ++ ++log () { ++ echo "$@" >> $dir/acats.sum ++ echo "$@" >> $dir/acats.log ++} ++ ++inform () { ++ printf "%04d %7s" $1 $2 ++} ++ ++disinform () { ++ printf "\r" ++} ++ ++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 ++ ++target_gnatmake () { ++ echo gnatmake-cross --GCC=\"$GCC\" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC=\"$GCC\" ++ gnatmake-cross --GCC="$GCC" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC="$GCC" ++} ++ ++target_gcc () { ++ $GCC $gccflags $* ++} ++ ++clean_dir () { ++ rm -f "$binmain" *.o *.ali > /dev/null 2>&1 ++} ++ ++find_main () { ++ ls ${i}?.adb > ${i}.lst 2> /dev/null ++ ls ${i}*m.adb >> ${i}.lst 2> /dev/null ++ ls ${i}.adb >> ${i}.lst 2> /dev/null ++ main=`tail -1 ${i}.lst` ++} ++ ++split_testid () { ++ local mysplit=`echo $1 | awk -F/ '{print "section=" $1 "; TN=" $2 "; prog=" $3 ";"}'` ++ eval ${mysplit} ++} ++ ++EXTERNAL_OBJECTS="" ++# Global variable to communicate external objects to link with. ++ ++rm -f $dir/acats.sum $dir/acats.log $dir/transfer.lst ++ ++display "Test Run By $USER on `date`" ++ ++display " === acats configuration ===" ++ ++target=`$GCC -dumpmachine` ++ ++display target gcc is $GCC ++display `$GCC -v 2>&1` ++display host=`gcc -dumpmachine` ++display target=$target ++display `type gnatmake-cross` ++gnatls-cross -v >> $dir/acats.log ++display "" ++ ++# Let's be tidy and clear off the remote device first ++target_cmd "cd ${tabtarget}; rm logs/*; rmdir logs; rm *" ++ ++display " === acats support ===" ++display_noeol "Generating support files..." ++ ++rm -rf $dir/support ++mkdir -p $dir/support ++cd $dir/support ++ ++cp $testdir/support/*.ada $testdir/support/*.a $testdir/support/*.tst $dir/support ++ ++# Find out the size in bit of an address on the target ++target_gnatmake $testdir/support/impbit.adb >> $dir/acats.log 2>&1 ++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 ++ ++# Find out a suitable asm statement ++# Adapted from configure.ac gcc_cv_as_dwarf2_debug_line ++case "$target" in ++ ia64*-*-* | s390*-*-*) ++ target_insn="nop 0" ++ ;; ++ mmix-*-*) ++ target_insn="swym 0" ++ ;; ++ *) ++ target_insn="nop" ++ ;; ++esac ++echo target_insn="$target_insn" >> $dir/acats.log ++ ++sed -e "s,ACATS4GNATDIR,$dir,g" \ ++ < $testdir/support/impdef.a > $dir/support/impdef.a ++sed -e "s,ACATS4GNATDIR,$dir,g" \ ++ -e "s,ACATS4GNATBIT,$target_bit,g" \ ++ -e "s,ACATS4GNATINSN,$target_insn,g" \ ++ < $testdir/support/macro.dfs > $dir/support/MACRO.DFS ++sed -e "s,ACATS4GNATDIR,$dir,g" \ ++ < $testdir/support/tsttests.dat > $dir/support/TSTTESTS.DAT ++ ++cp $testdir/tests/cd/*.c $dir/support ++cp $testdir/tests/cxb/*.c $dir/support ++grep -v '^#' $testdir/norun.lst | sort > $dir/support/norun.lst ++ ++rm -rf $dir/run ++mv $dir/tests $dir/tests.$$ 2> /dev/null ++rm -rf $dir/tests.$$ & ++mkdir -p $dir/run ++ ++cp -pr $testdir/tests $dir/ ++ ++for i in $dir/support/*.ada $dir/support/*.a; do ++ host_gnatchop $i >> $dir/acats.log 2>&1 ++done ++ ++# These tools are used to preprocess some ACATS sources ++# they need to be compiled native on the host. ++ ++host_gnatmake -q -gnatws macrosub.adb ++if [ $? -ne 0 ]; then ++ display "**** Failed to compile macrosub" ++ exit 1 ++fi ++./macrosub > macrosub.out 2>&1 ++ ++gcc -c cd300051.c ++host_gnatmake -q -gnatws widechr.adb ++if [ $? -ne 0 ]; then ++ display "**** Failed to compile widechr" ++ exit 1 ++fi ++./widechr > widechr.out 2>&1 ++ ++rm -f $dir/support/macrosub ++rm -f $dir/support/widechr ++rm -f $dir/support/*.ali ++rm -f $dir/support/*.o ++ ++display " done." ++ ++# From here, all compilations will be made by the target compiler ++ ++display_noeol "Compiling support files..." ++ ++target_gcc -c *.c ++if [ $? -ne 0 ]; then ++ display "**** Failed to compile C code" ++ exit 1 ++fi ++ ++host_gnatchop *.adt >> $dir/acats.log 2>&1 ++ ++target_gnatmake -c -gnato -gnatE *.ads >> $dir/acats.log 2>&1 ++target_gnatmake -c -gnato -gnatE *.adb >> $dir/acats.log 2>&1 ++ ++display " done." ++display "" ++display " === acats tests ===" ++ ++if [ $# -eq 0 ]; then ++ chapters=`cd $dir/tests; echo [a-z]*` ++else ++ chapters=$* ++fi ++ ++glob_countn=0 ++glob_countok=0 ++glob_countu=0 ++countdown=0 ++ ++for chapter in $chapters; do ++ if [ -d $dir/tests/$chapter ]; then ++ cd $dir/tests/$chapter ++ ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \ ++ cut -c1-7 | sort | uniq | comm -23 - $dir/support/norun.lst \ ++ > $dir/tests/$chapter/${chapter}.lst ++ countn=`wc -l < $dir/tests/$chapter/${chapter}.lst` ++ countdown=`expr $countdown + $countn` ++ fi ++done ++ ++cat > $dir/execute.sh << EOF ++inform () { ++ printf "left: %04d" \$1 ++} ++disinform () { ++ printf "\r" ++} ++cycle () { ++ local countx=0 ++ local total=\$(echo \$testlist | awk '{print NF}') ++ mkdir -p logs ++ echo "Executing \$total tests on remote device" ++ inform \$total ++ for x in \$testlist; do ++ timeout -t 30 ./\${x} > logs/\${x}.log 2>&1 ++ countx=\$(expr \$countx + 1) ++ if [ \$countx -eq 25 ]; then ++ total=\$(expr \$total - 25) ++ countx=0 ++ disinform ++ inform \$total ++ fi ++ done ++ disinform ++ tar -czf remote.logs.tar.gz logs ++} ++testlist=" \\ ++EOF ++ ++display "All tests are being cross-compiled without execution first." ++ ++for chapter in $chapters; do ++ if [ ! -d $dir/tests/$chapter ]; then ++ continue ++ fi ++ ++ countn=`wc -l < $dir/tests/$chapter/${chapter}.lst` ++ glob_countn=`expr $glob_countn + $countn` ++ counti=0 ++ for i in `cat $dir/tests/$chapter/${chapter}.lst`; do ++ counti=`expr $counti + 1` ++ extraflags="-gnat95" ++ grep $i $testdir/overflow.lst > /dev/null 2>&1 ++ if [ $? -eq 0 ]; then ++ extraflags="$extraflags -gnato" ++ fi ++ grep $i $testdir/elabd.lst > /dev/null 2>&1 ++ if [ $? -eq 0 ]; then ++ extraflags="$extraflags -gnatE" ++ fi ++ grep $i $testdir/floatstore.lst > /dev/null 2>&1 ++ if [ $? -eq 0 ]; then ++ extraflags="$extraflags -ffloat-store" ++ fi ++ grep $i $testdir/stackcheck.lst > /dev/null 2>&1 ++ if [ $? -eq 0 ]; then ++ extraflags="$extraflags -fstack-check" ++ fi ++ inform $countdown $i ++ countdown=`expr $countdown - 1` ++ test=$dir/tests/$chapter/$i ++ mkdir $test && cd $test >> $dir/acats.log 2>&1 ++ ++ if [ $? -ne 0 ]; then ++ disinform ++ display "FAIL: $i" ++ failed="${failed}${i} " ++ clean_dir ++ continue ++ fi ++ ++ host_gnatchop -c -w `ls ${test}*.a ${test}*.ada ${test}*.adt ${test}*.am ${test}*.dep 2> /dev/null` >> $dir/acats.log 2>&1 ++ find_main ++ if [ -z "$main" ]; then ++ sync ++ find_main ++ fi ++ binmain=`echo $main | sed -e 's/\(.*\)\..*/\1/g'` ++ echo "BUILD $main" >> $dir/acats.log ++ EXTERNAL_OBJECTS="" ++ case $i in ++ cxb30*) EXTERNAL_OBJECTS="$dir/support/cxb30040.o $dir/support/cxb30060.o $dir/support/cxb30130.o $dir/support/cxb30131.o";; ++ ca1020e) rm -f ca1020e_func1.adb ca1020e_func2.adb ca1020e_proc1.adb ca1020e_proc2.adb > /dev/null 2>&1;; ++ ca14028) rm -f ca14028_func2.ads ca14028_func3.ads ca14028_proc1.ads ca14028_proc3.ads > /dev/null 2>&1;; ++ cxh1001) extraflags="-a -f"; echo "pragma Normalize_Scalars;" > gnat.adc ++ esac ++ if [ "$main" = "" ]; then ++ disinform ++ display "FAIL: $i" ++ failed="${failed}${i} " ++ clean_dir ++ continue ++ fi ++ ++ target_gnatmake $extraflags -I$dir/support $main >> $dir/acats.log 2>&1 ++ if [ $? -ne 0 ]; then ++ disinform ++ display "FAIL: $i" ++ failed="${failed}${i} " ++ clean_dir ++ continue ++ fi ++ echo $chapter/$i/$binmain >> $dir/transfer.lst ++ echo "$binmain \\" >> $dir/execute.sh ++ $STRIP $binmain ++ disinform ++ done ++done ++echo '"' >> $dir/execute.sh ++echo "cycle" >> $dir/execute.sh ++ ++sync ++display "Transfer files to remote device: root@tablet:$tabtarget/" ++cd $dir/tests ++cat $dir/transfer.lst | xargs tar --strip-components=2 -czf - | \ ++ target_cmd "tar -C $tabtarget -xzf -" ++cd $dir ++tar -czf - execute.sh | target_cmd "tar -C $tabtarget -xzf -" ++target_cmd "cd $tabtarget; sh execute.sh" ++rm -rf $dir/logs $dir/remote.logs.tar.gz ++/usr/bin/scp -q root@tablet:$tabtarget/remote.logs.tar.gz $dir/ ++tar -xzf $dir/remote.logs.tar.gz ++ ++countdown=`wc -l < $dir/transfer.lst` ++glob_countn=${countdown} ++for i in `cat $dir/transfer.lst`; do ++ split_testid $i ++ if [ "$section" != "$savedsect" ]; then ++ display Running chapter $section ... ++ fi ++ savedsect=$section ++ ++ #inform $countdown $TN ++ countdown=`expr $countdown - 1` ++ proglog="$dir/logs/${prog}.log" ++ echo "RUN $prog" >> $dir/acats.log ++ if [ ! -f $proglog ]; then ++ echo "LOG NOT FOUND!" >> $proglog ++ fi ++ ++ cat $proglog >> $dir/acats.log ++ ++ egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' $proglog > /dev/null 2>&1 ++ if [ $? -ne 0 ]; then ++ grep 'tasking not implemented' $proglog > /dev/null 2>&1 ++ ++ if [ $? -ne 0 ]; then ++ display "FAIL: ${TN}" ++ failed="${failed}${TN} " ++ else ++ log "UNSUPPORTED: ${TN}" ++ glob_countn=`expr $glob_countn - 1` ++ glob_countu=`expr $glob_countu + 1` ++ fi ++ else ++ log "PASS: ${TN}" ++ glob_countok=`expr $glob_countok + 1` ++ fi ++ cd $dir/tests/$section/$TN ++ clean_dir ++ #disinform ++done ++ ++display " === acats Summary ===" ++display "# of expected passes $glob_countok" ++display "# of unexpected failures `expr $glob_countn - $glob_countok`" ++ ++if [ $glob_countu -ne 0 ]; then ++ display "# of unsupported tests $glob_countu" ++fi ++ ++if [ $glob_countok -ne $glob_countn ]; then ++ display "*** FAILURES: $failed" ++fi ++ ++display "$0 completed at `date`" ++ ++exit 0 +--- gcc/testsuite/gnat.dg/test_raise_from_pure.adb.orig ++++ gcc/testsuite/gnat.dg/test_raise_from_pure.adb +@@ -1,4 +1,4 @@ +--- { dg-do run } ++-- { dg-do run { xfail *-*-openbsd* } } + -- { dg-options "-O2" } + + -- This is an optimization test and its failure is only a missed optimization. +--- gcc/testsuite/gnat.dg/unchecked_convert5.adb.orig ++++ gcc/testsuite/gnat.dg/unchecked_convert5.adb +@@ -1,22 +0,0 @@ +--- { dg-do run { target hppa*-*-* sparc*-*-* powerpc*-*-* } } +- +-with Unchecked_Conversion; +- +-procedure Unchecked_Convert5 is +- +- subtype c_1 is string(1..1); +- +- function int2c1 is -- { dg-warning "different sizes" } +- new unchecked_conversion (source => integer, target => c_1); +- +- c1 : c_1; +- +-begin +- +- c1 := int2c1(16#12#); +- +- if c1 (1) /= ASCII.Nul then +- raise Program_Error; +- end if; +- +-end; +--- gcc/testsuite/gnat.dg/unchecked_convert6.adb.orig ++++ gcc/testsuite/gnat.dg/unchecked_convert6.adb +@@ -1,22 +0,0 @@ +--- { dg-do run { target hppa*-*-* sparc*-*-* powerpc*-*-* } } +- +-with Unchecked_Conversion; +- +-procedure Unchecked_Convert6 is +- +- subtype c_5 is string(1..5); +- +- function int2c5 is -- { dg-warning "different sizes" } +- new unchecked_conversion (source => integer, target => c_5); +- +- c5 : c_5; +- +-begin +- +- c5 := int2c5(16#12#); +- +- if c5 (4) /= ASCII.DC2 then +- raise Program_Error; +- end if; +- +-end; |