This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] DJGPP: fnchange.lst removal attempt


Hi,

tried to create a script to autogenerate and remove fnchange.lst but ... after
writing it I found I am not able to even compile the current FSF GDB HEAD.

configure:4342: checking for C compiler default output file name
configure:4364: gcc -O2 -ggdb -g3   conftest.c  >&5
conftest.c:10:1: warning: "PACKAGE_TARNAME" redefined
conftest.c:3:1: warning: this is the location of the previous definition
c:/djgpp/lib/crt0.o:crt0.s:(.data+0xc2): undefined reference to `_main'
c:/djgpp/lib/libc.a(crt1.o):crt1.c:(.text+0x404): undefined reference to `_main'
collect2: ld returned 1 exit status
configure:4368: $? = 1
configure:4405: result:
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAMEconfigure:4411: error: in `c:/gdborig/gdb':
configure:4415: error: C compiler cannot create executables
See `config.log' for more details.

But FreeDOS-1.0 is generating corrupted disk (in qemu-kvm) so it may have been
also due to the disk corruption.  Does the build work for anyone?  Tried with:
	bnu219b.zip bsh204br3.zip bsn241b.zip csdpmi7b.zip djdev203.zip
	fil41b.zip find41b.zip flx254b.zip gcc442b.zip mak3791b.zip
	pdcur34a.zip sed421b.zip shl2011b.zip tar112ab.zip txt20b.zip

BTW current fnchange.lst is already in a bad shape:

Duplicates in fnchange.lst:
bfd/elf32-microblaze.c
gdb/ChangeLog-2002
gdb/amd64-windows-nat.c
gdb/amd64-windows-tdep.c
opcodes/microblaze-opc.h
opcodes/microblaze-opcm.h

in fnchange.lst && in repository && not in dist .tar
COPYING.LIBGLOSS

in fnchange.lst && not in repository && in dist .tar
(none)

Not a bad shape but statement: fnchange.lst change of directories:
@V@/sim/microblaze @V@/sim/mb
@V@/sim/microblaze/microblaze.h @V@/sim/mb/mb.h
@V@/sim/microblaze/microblaze.isa @V@/sim/mb/mb.isa
other files in sim/microblaze/:
        Makefile.in
        config.in
        configure
        configure.ac
        interp.c
        sim-main.h
        sysdep.h
But there are no 8.3 conflicts in sim/microblaze/.

fnchange.lst change of directory names:
@V@/gdb/testsuite/gdb.gdbtk/EVERYTHING @V@/gdb/testsuite/gdb.tk/EVERYTHING

Mistaken change of directory:
@V@/bfd/doc/ChangeLog-9103 @V@/bfd/ChangeLog.9103
@V@/bfd/elf32-microblaze.c @V@e32mb.c
@V@/gdb/features/i386/i386-avx-linux.c @V@/features/i386/i32-al.c
@V@/gdb/features/i386/i386-mmx-linux.c @V@/features/i386/i32-ml.c
@V@/sim/testsuite/sim/cris/asm/tjmpsrv32-2.ms @V@/sim/testsuite/sim/cris/tjmp32-2.ms
@V@/sim/testsuite/sim/cris/asm/tjmpsrv32.ms @V@/sim/testsuite/sim/cris/tjmp32.ms
@V@/sim/testsuite/sim/cris/c/ftruncate1.c @V@/sim/testsuite/sim/cris/ftrunc1.c
@V@/sim/testsuite/sim/cris/c/ftruncate2.c @V@/sim/testsuite/sim/cris/ftrunc2.c
@V@/sim/testsuite/sim/cris/c/readlink1.c @V@/sim/testsuite/sim/cris/rdlink1.c
@V@/sim/testsuite/sim/cris/c/readlink2.c @V@/sim/testsuite/sim/cris/rdlink2.c
@V@/sim/testsuite/sim/cris/c/readlink3.c @V@/sim/testsuite/sim/cris/rdlink3.c
@V@/sim/testsuite/sim/cris/c/readlink4.c @V@/sim/testsuite/sim/cris/rdlink4.c
@V@/sim/testsuite/sim/cris/c/readlink5.c @V@/sim/testsuite/sim/cris/rdlink5.c
@V@/sim/testsuite/sim/cris/c/readlink6.c @V@/sim/testsuite/sim/cris/rdlink6.c
@V@/sim/testsuite/sim/cris/c/readlink7.c @V@/sim/testsuite/sim/cris/rdlink7.c
@V@/sim/testsuite/sim/cris/c/readlink8.c @V@/sim/testsuite/sim/cris/rdlink8.c
@V@/sim/testsuite/sim/cris/c/readlink9.c @V@/sim/testsuite/sim/cris/rdlink9.c
@V@/sim/testsuite/sim/cris/c/readlink10.c @V@/sim/testsuite/sim/cris/rdlink10.c
@V@/sim/testsuite/sim/cris/c/sigreturn1.c @V@/sim/testsuite/sim/cris/sigret1.c
@V@/sim/testsuite/sim/cris/c/sigreturn2.c @V@/sim/testsuite/sim/cris/sigret2.c
@V@/sim/testsuite/sim/cris/c/sigreturn3.c @V@/sim/testsuite/sim/cris/sigret3.c
@V@/sim/testsuite/sim/cris/c/sigreturn4.c @V@/sim/testsuite/sim/cris/sigret4.c
@V@/sim/testsuite/sim/cris/c/truncate1.c @V@/sim/testsuite/sim/cris/trunc1.c
@V@/sim/testsuite/sim/cris/c/truncate2.c @V@/sim/testsuite/sim/cris/trunc2.c

And currently missing translations generating DJTAR.EXE error:
	Cannot exclusively open file:
gdb/regformats/s390-linux64.dat gdb/regformats/i386/amd64-avx-linux.dat gdb/regformats/i386/i386-avx-linux.dat gdb/regformats/i386/i386-mmx-linux.dat gdb/features/s390-core64.xml gdb/features/s390-linux64.c gdb/features/s390-linux32.xml gdb/testsuite/gdb.cp/pr10728-y.cc gdb/testsuite/gdb.cp/virtfunc.cc gdb/testsuite/gdb.cp/virtfunc2.exp gdb/testsuite/gdb.reverse/consecutive-precsave.exp gdb/testsuite/gdb.reverse/machinestate-precsave.exp gdb/testsuite/gdb.base/unloadshr2.c gdb/testsuite/gdb.base/watchpoints.exp gdb/testsuite/gdb.base/break-interp-main.c gdb/testsuite/gdb.base/sepdebug2.c gdb/testsuite/gdb.base/watchpoint.c gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp gdb/testsuite/gdb.base/watchpoints.c gdb/testsuite/gdb.threads/watchthreads-reorder.exp gdb/testsuite/gdb.threads/watchthreads-reorder.c gdb/gnulib/m4/gnulib-comp.m4 gdb/gnulib/m4/gnulib-cache.m4 gdb/ChangeLog bfd/ChangeLog libdecnumber/dpd/decimal128Local.h libdecnumber/dpd/decimal128.h libdecnumber/dpd/decimal32.h libdecnumber/dpd/decimal64Symbols.h libdecnumber/decPackedSymbols.h libdecnumber/bid/host-ieee32.c libdecnumber/bid/decimal128Local.h libdecnumber/bid/decimal128.h libdecnumber/bid/host-ieee64.c libdecnumber/bid/decimal32.h libdecnumber/bid/decimal64Symbols.h libdecnumber/decNumberSymbols.h libdecnumber/decNumber.h libdecnumber/decContext.h libdecnumber/decDouble.h libdecnumber/decSingle.h opcodes/ChangeLog

Also current gdb/config/djgpp/djconfig.sh cannot find gdb/ChangeLog.002 .

In this state I find all the adjustments of gdb/config/djgpp/fnchange.lst not
much useful.

Including script generating fnchange.lst.  It would need to adjust
gdb/config/djgpp/djconfig.sh checking existing files - and maybe something
more - but it already does not work.  Some (few) of the generated translations
may need to be made static; currently they are all generated dynamically.

Current output:
	http://people.redhat.com/jkratoch/fnchange.lst

File for this script (saving a rebuild of gdb.tar to list its files).
	http://people.redhat.com/jkratoch/fnchange.cache


Regards,
Jan


------------------------------------------------------------------------------

#! /usr/bin/perl
# Copyright (C) 2010 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING3.  If not see
# <http://www.gnu.org/licenses/>.

use strict;
use warnings;

my $cache = $ARGV[0];
if ((@ARGV != 0 && @ARGV != 1) || $cache eq "-h" || $cache eq "--help") {
  die "$0: [<filenames list cache file>]\n";
}

sub read_file($)
{
  my($name) = @_;

  local *F;
  open F, $name or die "$name: $!";
  defined (my $F = do { local $/ = undef; <F>; }) or die "$name: $!";
  close F or die "$name: $!";
  return $F;
}

sub write_file($$)
{
  my($name, $content) = @_;

  local *F;
  open F, ">$name" or die "$name: $!";
  print F $content or die "$name: $!";
  close F or die "$name: $!";
}

my $tar;
if (!$cache || !-f $cache) {
  my $F = read_file "git status; true |";
  $F =~ /^# On branch .+\n\Qnothing to commit (working directory clean)\E\n$/
    or die "Unexpected git status: $F";

  my $cmd = "make -j1 -f src-release gdb.tar";
  system $cmd and die "$cmd: $?";

  my @glob = glob "gdb*.tar";
  @glob == 1 or die "Unexpected gdb*.tar match: ".join " ",@glob;
  my $g = $glob[0];

  $tar = read_file "tar tf $g |";
  write_file $cache, $tar if $cache;

  $cmd = "git clean -df";
  system $cmd and die "$cmd: $?";
} else {
  $tar = read_file $cache;
}
my @tar = split /\n/, $tar;
@tar = sort @tar;

# orig -> mapped
my %map = ("." => ".");

# mapped -> count
my %used;

for (@tar) {
  next if $_ eq ".";
  s{^(?:\.|gdb-[^/]*)/}{./} or die "No (.|gdb-*)/ prefix: $_";

  # Duplicate filename?
  die if $map{$_};

  # Simulate leading dir1 and dir1/dir2 for any dir1/dir2/file.
  # gdb.tar specifically omits any directory entries themselves.
  my @elem=split /\//, $_;
  my @use;
  while (@elem) {
    push @use,shift @elem;
    my $o = join ("/", @use);
    next if $map{$o};

    my($dir, $file) = ($o =~ m{^(.*)/([^/]+)$}) or die $o;
    $_ = $file;
    tr/-._a-zA-Z0-9//cd;
    s/^[.]?//;
    # Keep only the first dot, later dots convert to '-'.
    s/[.]/%/;
    tr/./-/;
    tr/%/./;
    s/^([^.]{1,8})[^.]*((?:[.][^.]{1,3})?)[^.]*$/$1$2/
	    or die "$o component $_ has two dots\n";
    $file = $_;
    $dir = $map{lc $dir} or die "Dir not mapped: $dir";
    $_ = "$dir/$file";
    my $valid83 = qr/^([^.]{1,8})((?:[.][^.]{1,3})?)$/o;
    $file =~ /$valid83/ or die;
    while ($used{lc $_}++) {
      # Increase basename $FILE; $1 and $2 are matched by $VALID83.
      my($base, $ext) = ($1,$2);
      my($alpha, $num) = ($base =~ /^(.*?)(\d*)$/) or die;
      $alpha =~ s/^(.*).$/$1/ if $num =~ /^9*$/ && 8 == length $base;
      $num++;
      $file = $alpha.$num.$ext;
      $file =~ /$valid83/ or die;
      $_ = "$dir/$file";
    }
    $map{lc $o} = $_;
    $o =~ s{^\.\/}{\@V@/} or die;
    $_ =~ s{^\.\/}{\@V@/} or die;
    print "$o $_\n" if $o ne $_;
  }
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]