From: Jan Kratochvil Date: Sun, 6 Nov 2011 15:35:52 +0000 (+0100) Subject: archer-master -> gdb-master X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=commitdiff_plain;h=89f10d958bacf3f13160bbba670195bc0eb414f3;hp=63d617ba50cf702cc6f843f0b5958f2ed3385d93 archer-master -> gdb-master Support --dwarf also 40 and 41. Run cgclassify for real. Update for new Fedora branches missing trailing /master. Skip break-interp.exp for --valgrind. --- diff --git a/bin/hammock b/bin/hammock index 70de9cc..8844203 100755 --- a/bin/hammock +++ b/bin/hammock @@ -9,7 +9,7 @@ my $start=time(); my $gdbcvsmaster=$ENV{"HOME"}."/redhat/gdb-cvs-master"; my $binutilscvsmaster=$ENV{"HOME"}."/redhat/binutils-cvs-master"; -my $archermaster=$ENV{"HOME"}."/redhat/archer-master"; +my $archermaster=$ENV{"HOME"}."/redhat/gdb-master"; my $fedoragitroot=q{git://pkgs.fedoraproject.org}; #Unknown host cvs.devel.redhat.com. #my $rhelcvsroot=q{:pserver:anonymous:@cvs.devel.redhat.com:/cvs/dist}; @@ -52,6 +52,9 @@ my $gdbserver; my $valgrind; my $gdbindex; my $dwarf; +# Use --dwarf=40 for: --dwarf=4 -fno-debug-types-section +# Use --dwarf=41 for: --dwarf=4 -fdebug-types-section +my $debug_types_section; my $orphanripper=1; die if !GetOptions( "i|userid=s"=>\$userid, @@ -95,6 +98,8 @@ $gdbserver and $component ne "gdbcvs" and die "--gdbserver is available only for $valgrind and $component ne "gdbcvs" and die "--valgrind is available only for gdbcvs"; $gdbserver and $valgrind and die "--gdbserver and --valgrind are mutually exclusive"; ($gdbserver || $valgrind) and $gdbindex and die "--gdbserver|--valgrind and --gdbindex are mutually exclusive"; +do { $debug_types_section=0; $dwarf=4; } if ($dwarf||0)==40; +do { $debug_types_section=1; $dwarf=4; } if ($dwarf||0)==41; !defined $dwarf or ($dwarf>=2 && $dwarf<=4) or die "--dwarf requires DWARF version number"; ($gdbserver || $valgrind || $gdbindex) and $dwarf and die "--gdbserver|--valgrind|--gdbindex and --dwarf are mutually exclusive"; $orphanripper=($orphanripper?"orphanripper":""); @@ -216,7 +221,7 @@ sub writefile } # /etc/cgconfig.conf -spawn "echo cgclassify -g '*':hammock $$ || :"; +spawn "cgclassify -g '*':hammock $$ || :"; spawn "renice +19 -p $$"; spawn "ionice -c3 -p $$"; @@ -241,6 +246,7 @@ my %dump=( "valgrind"=>$valgrind, "gdbindex"=>$gdbindex, "dwarf"=>$dwarf, + "debug_types_section"=>$debug_types_section, "orphanripper"=>$orphanripper, ); while (my($name,$val)=each(%dump)) { @@ -305,7 +311,7 @@ while (@distrouse || keys(%child)) { my $gitrepo; if ($component=~/^fedora(.*)$/) { $gitrepo=$1; - $gitbranch="f$1/master" if $componentdistro=~/^fedora-(\d+)$/; + $gitbranch="f$1" if $componentdistro=~/^fedora-(\d+)$/; $gitbranch="master" if $componentdistro=~/^fedora-rawhide$/; die "$component vs. $componentdistro" if !$gitbranch; $gitroot=$fedoragitroot; @@ -456,10 +462,20 @@ while (@distrouse || keys(%child)) { if ($component eq "binutilscvs") { mockrun "cd $baretestsuite; $errs12; ulimit -c unlimited; $orphanripper make -k check || :; ".q{for file in {gas/testsuite/gas,ld/ld,binutils/binutils}.{sum,log};do ln $file}." $out/binutils-$distro-".q{$(basename $file) || :; done;}; } else { + if ($valgrind) { + # FIXME + do { unlink $_ or warn "$_: $!"; } for "$baretestsuite/gdb/testsuite/gdb.base/break-interp.exp"; + } my @check=($distro=~/-x86_64/ ? qw(-m64 -m32) : -m32); @check=map("check//unix/$_",@check); @check=map({($_,"$_/-fPIE/-pie");} @check) if $gdbcvspie; # for i in ".join(" ",@check).";do $orphanripper make -k \$i || :;done + sub runtestcc($) + { + local($_)=@_; + s/ /\\ /g; + return ' RUNTESTFLAGS="CC_FOR_TARGET=gcc\ '.$_.' CXX_FOR_TARGET=g++\ '.$_.'"' + } mockrun "cd $baretestsuite;" .(!$valgrind?"":' HAMMOCK_VALGRIND=1') ." $errs12" @@ -473,7 +489,7 @@ while (@distrouse || keys(%child)) { .(!$gdbserver?"":' RUNTESTFLAGS=--target_board=native-gdbserver') .(!$valgrind?"":' RUNTESTFLAGS=--target_board=valgrind') .(!$gdbindex?"":' RUNTESTFLAGS="CC_FOR_TARGET=/bin/sh\ $PWD/cc-with-index.sh\ gcc CXX_FOR_TARGET=/bin/sh\ $PWD/cc-with-index.sh\ g++"') - .(!$dwarf?"":' RUNTESTFLAGS="CC_FOR_TARGET=gcc\ -gdwarf-'.$dwarf.'\ -g0 CXX_FOR_TARGET=g++\ -gdwarf-'.$dwarf.'\ -g0"') + .(!$dwarf?"":runtestcc "-gdwarf-$dwarf".(!defined $debug_types_section?"":'\ '.($debug_types_section?"-fdebug-types-section":"-fno-debug-types-section"))." -g0") .(!$parallel?"":' FORCE_PARALLEL=1') ." || :; ".q{for t in sum log;do for file in testsuite*/gdb.$t;do suffix="${file#testsuite.unix.}"; suffix="${suffix%/gdb.$t}"; ln $file}." $out/gdb".q{$suffix.$t || :; done; done;}; }