+Support --gdbcvspie (disabled by default).
authorjkratoch <>
Sat, 3 Apr 2010 20:48:35 +0000 (20:48 +0000)
committerjkratoch <>
Sat, 3 Apr 2010 20:48:35 +0000 (20:48 +0000)
Unify gdb-*.{sum,log} filenames.

bin/hammock

index c8f062f..16053ed 100755 (executable)
@@ -42,6 +42,7 @@ my $configure;
 my $branch;
 # FIXME: Connect make paralellization to the children.
 my $distrojobs;
+my $gdbcvspie;
 die if !GetOptions(
   "i|userid=s"=>\$userid,
     "force"=>\$force,
@@ -59,6 +60,7 @@ die if !GetOptions(
   "D|distrojobs=s"=>\$distrojobs,
     "configure=s"=>\$configure,
     "branch=s"=>\$branch,
+    "gdbcvspie"=>\$gdbcvspie,
 );
 $component and ($component=~m{^(?:(?:fedora|rhel)(?:gdb|binutils|glibc)|gdbcvs|binutilscvs|archer-.*|/home/.*)$} or die "-c|--component required to be: fedoragdb|rhelgdb|fedorabinutils|rhelbinutils|fedoraglibc|rhelglibc|gdbcvs|binutilscvs|archer-*|/home/*");
 $component and $component=~m{^/home/} and (-f "$component/gdb/gdbtypes.c" or die "$component/gdb/gdbtypes.c not found");
@@ -71,6 +73,7 @@ if ($component=~/^(gdb|binutils)cvs$/) {
 } else {
   die "--branch currently unsupported for non-CVS sources" if $branch;
 }
+!$gdbcvspie or $component eq "gdbcvs" or die "--gdbcvspie requires -c gdbcvs";
 @target and ($srcrpm or $component=~/^(?:fedora|rhel)/) and die "--target is available only for baretestsuite modes";
 my %target;
 do { error "Duplicate target: $_\n" if $target{$_}++; } for @target;
@@ -209,6 +212,7 @@ my %dump=(
   "srcrpm"=>$srcrpm,
   "file"=>join("\n",@file),
   "configure"=>$configure,
+  "gdbcvspie"=>$gdbcvspie,
 );
 while (my($name,$val)=each(%dump)) {
   next if !$val;
@@ -397,10 +401,9 @@ while (@distrouse || keys(%child)) {
       } else {
        my @check=($distro=~/-x86_64/ ? qw(-m64 -m32) : -m32);
        @check=map("check//unix/$_",@check);
-### FIXME:
-###    @check=map({($_,"$_/-fPIE/-pie");} @check);
+       @check=map({($_,"$_/-fPIE/-pie");} @check) if $gdbcvspie;
        # for i in ".join(" ",@check).";do orphanripper make -k \$i || :;done
-       mockrun "cd $baretestsuite; $errs1; errs2; cd gdb; ulimit -c unlimited; orphanripper make -k ".join(" ",@check)." || :; mkdir $out; ".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-$distro".q{$suffix.$t || :; done; done;};
+       mockrun "cd $baretestsuite; $errs1; errs2; cd gdb; ulimit -c unlimited; orphanripper make -k ".join(" ",@check)." || :; mkdir $out; ".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;};
       }
       # gdbunpack does:
       #                perl -i -pe 's{\Q'"$HOME"'\E/.*?/build/[^/]*/}{}g' "$base"/*