avr-binutils stable port information

Package: avr-binutils
Version: 2.19
Revision: 3
BuildDepends: fink (>= 0.24.12)
Maintainer: Matthias Ringwald
Source: mirror:gnu:binutils/binutils-%v.tar.bz2
Source-MD5: 17a52219dee5a76c1a9d9b0bfd337d66
PatchFile: %n.patch
PatchFile-MD5: 8c24f8e7d9c7950b66dff0331b6633c4

ConfigureParams: --target=avr --prefix=%p/share/avr --bindir=%p/bin --mandir=%p/share/man --infodir=%p/share/info --disable-nls

InstallScript: <<
make install DESTDIR=%d
rm -fr %i/share/avr/lib/
rm -fr %i/share/info
<<

DocFiles: README COPYING

Description: GNU binutils for ATMEL AVR micro controllers
DescPort: <<
Removed libiberty.a installation of avr-gcc & avr-binutils.
Avoided using /sw/avr. Its lib & include folders have been moved to /sw/share/avr and the binaries are put into /sw/bin.
Removed xxx.info files to avoid clashes with other potential toolchains.

opcodes/avr-dis.c: uses sprintf without formats (compile error on 10.6), using strcpy insteads
strings.c: uses stat64 which is deprecated in 10.6. stat64 provides 64 bit inodes which are not used anyway, use stat.
TODO: Native Language Support
<<

License: GPL
Homepage: http://www.gnu.org/software/binutils/

avr-binutils stable port .patch

--- binutils-2.19/opcodes/avr-dis.c 2007-07-05 11:49:00.000000000 +0200
+++ binutils-2.19-patched/opcodes/avr-dis.c 2009-09-12 09:34:15.000000000 +0200
@@ -109,7 +109,7 @@
case 0x100e: xyz = "-X"; break;
default: xyz = "??"; ok = 0;
}
- sprintf (buf, xyz);
+ strcpy(buf, xyz);

if (AVR_UNDEF_P (insn))
sprintf (comment, _("undefined"));
@@ -149,7 +149,7 @@
value of the address only once, but this would mean recoding
objdump_print_address() which would affect many targets. */
sprintf (buf, "%#lx", (unsigned long) *sym_addr);
- sprintf (comment, comment_start);
+ strcpy (comment, comment_start);
break;

case 'L':
@@ -158,7 +158,7 @@
sprintf (buf, ".%+-8d", rel_addr);
*sym = 1;
*sym_addr = pc + 2 + rel_addr;
- sprintf (comment, comment_start);
+ strcpy (comment, comment_start);
}
break;

@@ -169,7 +169,7 @@
sprintf (buf, ".%+-8d", rel_addr);
*sym = 1;
*sym_addr = pc + 2 + rel_addr;
- sprintf (comment, comment_start);
+ strcpy (comment, comment_start);
}
break;

--- binutils-2.19/binutils/strings.c 2008-08-25 06:38:13.000000000 +0200
+++ binutils-2.19-patched/binutils/strings.c 2009-09-12 09:59:00.000000000 +0200
@@ -85,13 +85,9 @@
typedef off_t file_off;
#define file_open(s,m) fopen(s, m)
#endif
-#ifdef HAVE_STAT64
-typedef struct stat64 statbuf;
-#define file_stat(f,s) stat64(f, s)
-#else
+// inode not used - don't try to used 64 bit inodes
typedef struct stat statbuf;
#define file_stat(f,s) stat(f, s)
-#endif

/* Radix for printing addresses (must be 8, 10 or 16). */
static int address_radix;

avr-binutils _unstable_ port .patch