change log for rtems (2011-03-21)

rtems-vc at rtems.org rtems-vc at rtems.org
Mon Mar 21 13:11:57 UTC 2011


 *sh*:
2011-03-21	Sebastian Huber <sebastian.huber at embedded-brains.de>

	* console.c: Make device file optional.

M  1.186  c/src/lib/libbsp/shared/ChangeLog
M   1.16  c/src/lib/libbsp/shared/console.c

diff -u rtems/c/src/lib/libbsp/shared/ChangeLog:1.185 rtems/c/src/lib/libbsp/shared/ChangeLog:1.186
--- rtems/c/src/lib/libbsp/shared/ChangeLog:1.185	Wed Mar 16 15:06:04 2011
+++ rtems/c/src/lib/libbsp/shared/ChangeLog	Mon Mar 21 03:19:19 2011
@@ -1,3 +1,7 @@
+2011-03-21	Sebastian Huber <sebastian.huber at embedded-brains.de>
+
+	* console.c: Make device file optional.
+
 2011-03-16	Jennifer Averett <jennifer.averett at OARcorp.com>
 
 	PR 1729/cpukit

diff -u rtems/c/src/lib/libbsp/shared/console.c:1.15 rtems/c/src/lib/libbsp/shared/console.c:1.16
--- rtems/c/src/lib/libbsp/shared/console.c:1.15	Mon Feb 28 09:11:48 2011
+++ rtems/c/src/lib/libbsp/shared/console.c	Mon Mar 21 03:19:19 2011
@@ -242,9 +242,11 @@
           rtems_fatal_error_occurred(sc);
         }
       }
-      sc = rtems_io_register_name(device->sDeviceName, major, minor);
-      if (sc != RTEMS_SUCCESSFUL) {
-        rtems_fatal_error_occurred(sc);
+      if (device->sDeviceName != NULL) {
+        sc = rtems_io_register_name(device->sDeviceName, major, minor);
+        if (sc != RTEMS_SUCCESSFUL) {
+          rtems_fatal_error_occurred(sc);
+        }
       }
     }
   }


 *sh*:
2011-03-21	Sebastian Huber <sebastian.huber at embedded-brains.de>

	PR 1770/bsps
	* shared/console/conscfg.c: Rely on default device file registration.

M    1.9  c/src/lib/libbsp/sparc64/ChangeLog
M    1.3  c/src/lib/libbsp/sparc64/shared/console/conscfg.c

diff -u rtems/c/src/lib/libbsp/sparc64/ChangeLog:1.8 rtems/c/src/lib/libbsp/sparc64/ChangeLog:1.9
--- rtems/c/src/lib/libbsp/sparc64/ChangeLog:1.8	Wed Feb  2 09:00:46 2011
+++ rtems/c/src/lib/libbsp/sparc64/ChangeLog	Mon Mar 21 03:21:41 2011
@@ -1,3 +1,8 @@
+2011-03-21	Sebastian Huber <sebastian.huber at embedded-brains.de>
+
+	PR 1770/bsps
+	* shared/console/conscfg.c: Rely on default device file registration.
+
 2011-02-02	Ralf Corsépius <ralf.corsepius at rtems.org>
 
 	* configure.ac: Require autoconf-2.68, automake-1.11.1.

diff -u rtems/c/src/lib/libbsp/sparc64/shared/console/conscfg.c:1.2 rtems/c/src/lib/libbsp/sparc64/shared/console/conscfg.c:1.3
--- rtems/c/src/lib/libbsp/sparc64/shared/console/conscfg.c:1.2	Tue Jul 27 10:55:07 2010
+++ rtems/c/src/lib/libbsp/sparc64/shared/console/conscfg.c	Mon Mar 21 03:21:41 2011
@@ -69,7 +69,7 @@
 
 console_tbl     Console_Port_Tbl[] = {
 {
-  "/dev/console",                          /* sDeviceName */
+   NULL,                                   /* sDeviceName */
    SERIAL_CUSTOM,                    	   /* deviceType */
    &pooled_functions,                      /* pDeviceFns */
    NULL,              						/* deviceProbe, assume it is there */


 *ralf*:
Update to zlib-1.2.5.

M    1.4  cpukit/zlib/ChangeLog.zlib
M    1.7  cpukit/zlib/adler32.c
M    1.6  cpukit/zlib/compress.c
M    1.9  cpukit/zlib/crc32.c
M    1.5  cpukit/zlib/deflate.h
M    1.6  cpukit/zlib/deflate.c
M    1.2  cpukit/zlib/gzguts.h
M    1.3  cpukit/zlib/gzlib.c
M    1.2  cpukit/zlib/gzread.c
M    1.2  cpukit/zlib/inffast.h
M    1.4  cpukit/zlib/inffast.c
M    1.5  cpukit/zlib/inftrees.h
M    1.6  cpukit/zlib/inftrees.c
M    1.2  cpukit/zlib/trees.h
M    1.6  cpukit/zlib/trees.c
M    1.6  cpukit/zlib/uncompr.c
M    1.5  cpukit/zlib/zlib.h
M    1.8  cpukit/zlib/zutil.h
M   1.10  cpukit/zlib/zutil.c

diff -u rtems/cpukit/zlib/ChangeLog.zlib:1.3 rtems/cpukit/zlib/ChangeLog.zlib:1.4
--- rtems/cpukit/zlib/ChangeLog.zlib:1.3	Mon Mar 22 13:42:48 2010
+++ rtems/cpukit/zlib/ChangeLog.zlib	Sat Mar 19 02:42:48 2011
@@ -1,6 +1,84 @@
 
                 ChangeLog file for zlib
 
+Changes in 1.2.5 (19 Apr 2010)
+- Disable visibility attribute in win32/Makefile.gcc [Bar-Lev]
+- Default to libdir as sharedlibdir in configure [Nieder]
+- Update copyright dates on modified source files
+- Update trees.c to be able to generate modified trees.h
+- Exit configure for MinGW, suggesting win32/Makefile.gcc
+
+Changes in 1.2.4.5 (18 Apr 2010)
+- Set sharedlibdir in configure [Torok]
+- Set LDFLAGS in Makefile.in [Bar-Lev]
+- Avoid mkdir objs race condition in Makefile.in [Bowler]
+- Add ZLIB_INTERNAL in front of internal inter-module functions and arrays
+- Define ZLIB_INTERNAL to hide internal functions and arrays for GNU C
+- Don't use hidden attribute when it is a warning generator (e.g. Solaris)
+
+Changes in 1.2.4.4 (18 Apr 2010)
+- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [Torok]
+- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty
+- Try to use bash or ksh regardless of functionality of /bin/sh
+- Fix configure incompatibility with NetBSD sh
+- Remove attempt to run under bash or ksh since have better NetBSD fix
+- Fix win32/Makefile.gcc for MinGW [Bar-Lev]
+- Add diagnostic messages when using CROSS_PREFIX in configure
+- Added --sharedlibdir option to configure [Weigelt]
+- Use hidden visibility attribute when available [Frysinger]
+
+Changes in 1.2.4.3 (10 Apr 2010)
+- Only use CROSS_PREFIX in configure for ar and ranlib if they exist
+- Use CROSS_PREFIX for nm [Bar-Lev]
+- Assume _LARGEFILE64_SOURCE defined is equivalent to true
+- Avoid use of undefined symbols in #if with && and ||
+- Make *64 prototypes in gzguts.h consistent with functions
+- Add -shared load option for MinGW in configure [Bowler]
+- Move z_off64_t to public interface, use instead of off64_t
+- Remove ! from shell test in configure (not portable to Solaris)
+- Change +0 macro tests to -0 for possibly increased portability
+
+Changes in 1.2.4.2 (9 Apr 2010)
+- Add consistent carriage returns to readme.txt's in masmx86 and masmx64
+- Really provide prototypes for *64 functions when building without LFS
+- Only define unlink() in minigzip.c if unistd.h not included
+- Update README to point to contrib/vstudio project files
+- Move projects/vc6 to old/ and remove projects/
+- Include stdlib.h in minigzip.c for setmode() definition under WinCE
+- Clean up assembler builds in win32/Makefile.msc [Rowe]
+- Include sys/types.h for Microsoft for off_t definition
+- Fix memory leak on error in gz_open()
+- Symbolize nm as $NM in configure [Weigelt]
+- Use TEST_LDSHARED instead of LDSHARED to link test programs [Weigelt]
+- Add +0 to _FILE_OFFSET_BITS and _LFS64_LARGEFILE in case not defined
+- Fix bug in gzeof() to take into account unused input data
+- Avoid initialization of structures with variables in puff.c
+- Updated win32/README-WIN32.txt [Rowe]
+
+Changes in 1.2.4.1 (28 Mar 2010)
+- Remove the use of [a-z] constructs for sed in configure [gentoo 310225]
+- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech]
+- Restore "for debugging" comment on sprintf() in gzlib.c
+- Remove fdopen for MVS from gzguts.h
+- Put new README-WIN32.txt in win32 [Rowe]
+- Add check for shell to configure and invoke another shell if needed
+- Fix big fat stinking bug in gzseek() on uncompressed files
+- Remove vestigial F_OPEN64 define in zutil.h
+- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE
+- Avoid errors on non-LFS systems when applications define LFS macros
+- Set EXE to ".exe" in configure for MINGW [Kahle]
+- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill]
+- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev]
+- Add DLL install in win32/makefile.gcc [Bar-Lev]
+- Allow Linux* or linux* from uname in configure [Bar-Lev]
+- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev]
+- Add cross-compilation prefixes to configure [Bar-Lev]
+- Match type exactly in gz_load() invocation in gzread.c
+- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func
+- Provide prototypes for *64 functions when building zlib without LFS
+- Don't use -lc when linking shared library on MinGW
+- Remove errno.h check in configure and vestigial errno code in zutil.h
+
 Changes in 1.2.4 (14 Mar 2010)
 - Fix VER3 extraction in configure for no fourth subversion
 - Update zlib.3, add docs to Makefile.in to make .pdf out of it
@@ -99,7 +177,7 @@
 - Correct email address in configure for system options
 - Update make_vms.com and add make_vms.com to contrib/minizip [Zinser]
 - Update zlib.map [Brown]
-- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Tšršk]
+- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Torok]
 - Apply various fixes to CMakeLists.txt [Lowman]
 - Add checks on len in gzread() and gzwrite()
 - Add error message for no more room for gzungetc()

diff -u rtems/cpukit/zlib/adler32.c:1.6 rtems/cpukit/zlib/adler32.c:1.7
--- rtems/cpukit/zlib/adler32.c:1.6	Sat Mar 27 09:39:19 2010
+++ rtems/cpukit/zlib/adler32.c	Sat Mar 19 02:42:48 2011
@@ -160,7 +160,6 @@
     return adler32_combine_(adler1, adler2, len2);
 }
 
-#if (defined(_LARGEFILE64_SOURCE)||(_FILE_OFFSET_BITS == 64))
 uLong ZEXPORT adler32_combine64(adler1, adler2, len2)
     uLong adler1;
     uLong adler2;
@@ -168,4 +167,3 @@
 {
     return adler32_combine_(adler1, adler2, len2);
 }
-#endif /* (defined(_LARGEFILE64_SOURCE)||(_FILE_OFFSET_BITS == 64)) */

diff -u rtems/cpukit/zlib/crc32.c:1.8 rtems/cpukit/zlib/crc32.c:1.9
--- rtems/cpukit/zlib/crc32.c:1.8	Sat Mar 27 09:39:19 2010
+++ rtems/cpukit/zlib/crc32.c	Sat Mar 19 02:42:48 2011
@@ -1,5 +1,5 @@
 /* crc32.c -- compute the CRC-32 of a data stream
- * Copyright (C) 1995-2006 Mark Adler
+ * Copyright (C) 1995-2006, 2010 Mark Adler
  * For conditions of distribution and use, see copyright notice in zlib.h
  *
  * Thanks to Rodney Brown <rbrown64 at csc.com.au> for his contribution of faster
@@ -433,7 +433,6 @@
     return crc32_combine_(crc1, crc2, len2);
 }
 
-#if (defined(_LARGEFILE64_SOURCE)||(_FILE_OFFSET_BITS == 64))
 uLong ZEXPORT crc32_combine64(crc1, crc2, len2)
     uLong crc1;
     uLong crc2;
@@ -441,4 +440,3 @@
 {
     return crc32_combine_(crc1, crc2, len2);
 }
-#endif /* (defined(_LARGEFILE64_SOURCE)||(_FILE_OFFSET_BITS == 64)) */

diff -u rtems/cpukit/zlib/deflate.h:1.4 rtems/cpukit/zlib/deflate.h:1.5
--- rtems/cpukit/zlib/deflate.h:1.4	Mon Mar 22 13:42:50 2010
+++ rtems/cpukit/zlib/deflate.h	Sat Mar 19 02:42:49 2011
@@ -1,5 +1,5 @@
 /* deflate.h -- internal compression state
- * Copyright (C) 1995-2009 Jean-loup Gailly
+ * Copyright (C) 1995-2010 Jean-loup Gailly
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
 
@@ -290,13 +290,13 @@
    memory checker errors from longest match routines */
 
         /* in trees.c */
-void _tr_init         OF((deflate_state *s));
-int  _tr_tally        OF((deflate_state *s, unsigned dist, unsigned lc));
-void _tr_flush_block  OF((deflate_state *s, charf *buf, ulg stored_len,
-                          int last));
-void _tr_align        OF((deflate_state *s));
-void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
-                          int last));
+void ZLIB_INTERNAL _tr_init OF((deflate_state *s));
+int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
+void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf,
+                        ulg stored_len, int last));
+void ZLIB_INTERNAL _tr_align OF((deflate_state *s));
+void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
+                        ulg stored_len, int last));
 
 #define d_code(dist) \
    ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
@@ -309,11 +309,11 @@
 /* Inline versions of _tr_tally for speed: */
 
 #if defined(GEN_TREES_H) || !defined(STDC)
-  extern uch _length_code[];
-  extern uch _dist_code[];
+  extern uch ZLIB_INTERNAL _length_code[];
+  extern uch ZLIB_INTERNAL _dist_code[];
 #else
-  extern const uch _length_code[];
-  extern const uch _dist_code[];
+  extern const uch ZLIB_INTERNAL _length_code[];
+  extern const uch ZLIB_INTERNAL _dist_code[];
 #endif
 
 # define _tr_tally_lit(s, c, flush) \

diff -u rtems/cpukit/zlib/deflate.c:1.5 rtems/cpukit/zlib/deflate.c:1.6
--- rtems/cpukit/zlib/deflate.c:1.5	Mon Mar 22 13:42:50 2010
+++ rtems/cpukit/zlib/deflate.c	Sat Mar 19 02:42:48 2011
@@ -52,7 +52,7 @@
 #include "deflate.h"
 
 const char deflate_copyright[] =
-   " deflate 1.2.4 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
+   " deflate 1.2.5 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
 /*
   If you use the zlib library in a product, an acknowledgment is welcome
   in the documentation of your product. If for some reason you cannot

diff -u rtems/cpukit/zlib/gzguts.h:1.1 rtems/cpukit/zlib/gzguts.h:1.2
--- rtems/cpukit/zlib/gzguts.h:1.1	Mon Mar 22 13:42:50 2010
+++ rtems/cpukit/zlib/gzguts.h	Sat Mar 19 02:42:49 2011
@@ -5,14 +5,18 @@
 
 #ifdef _LARGEFILE64_SOURCE
 #  ifndef _LARGEFILE_SOURCE
-#    define _LARGEFILE_SOURCE
+#    define _LARGEFILE_SOURCE 1
 #  endif
 #  ifdef _FILE_OFFSET_BITS
 #    undef _FILE_OFFSET_BITS
 #  endif
 #endif
 
-#define ZLIB_INTERNAL
+#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
+#  define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
+#else
+#  define ZLIB_INTERNAL
+#endif
 
 #include <stdio.h>
 #include "zlib.h"
@@ -44,7 +48,7 @@
 #endif
 
 /* get errno and strerror definition */
-#if defined UNDER_CE && defined NO_ERRNO_H
+#if defined UNDER_CE
 #  include <windows.h>
 #  define zstrerror() gz_strwinerror((DWORD)GetLastError())
 #else
@@ -56,16 +60,12 @@
 #  endif
 #endif
 
-/* MVS fdopen() */
-#ifdef __MVS__
-  #pragma map (fdopen , "\174\174FDOPEN")
-   FILE *fdopen(int, const char *);
-#endif
-
-#ifdef _LARGEFILE64_SOURCE
-#  define z_off64_t off64_t
-#else
-#  define z_off64_t z_off_t
+/* provide prototypes for these when building zlib without LFS */
+#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
+    ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+    ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
+    ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
+    ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
 #endif
 
 /* default i/o buffer size -- double this for output when reading */
@@ -116,9 +116,9 @@
 typedef gz_state FAR *gz_statep;
 
 /* shared functions */
-ZEXTERN void ZEXPORT gz_error OF((gz_statep, int, const char *));
-#if defined UNDER_CE && defined NO_ERRNO_H
-ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error));
+void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *));
+#if defined UNDER_CE
+char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
 #endif
 
 /* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
@@ -127,6 +127,6 @@
 #ifdef INT_MAX
 #  define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
 #else
-ZEXTERN unsigned ZEXPORT gz_intmax OF((void));
+unsigned ZLIB_INTERNAL gz_intmax OF((void));
 #  define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
 #endif

diff -u rtems/cpukit/zlib/gzlib.c:1.2 rtems/cpukit/zlib/gzlib.c:1.3
--- rtems/cpukit/zlib/gzlib.c:1.2	Sat Mar 27 09:39:19 2010
+++ rtems/cpukit/zlib/gzlib.c	Sat Mar 19 02:42:49 2011
@@ -5,7 +5,7 @@
 
 #include "gzguts.h"
 
-#ifdef _LARGEFILE64_SOURCE
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
 #  define LSEEK lseek64
 #else
 #  define LSEEK lseek
@@ -15,7 +15,7 @@
 local void gz_reset OF((gz_statep));
 local gzFile gz_open OF((const char *, int, const char *));
 
-#if defined UNDER_CE && defined NO_ERRNO_H
+#if defined UNDER_CE
 
 /* Map the Windows error number in ERROR to a locale-dependent error message
    string and return a pointer to it.  Typically, the values for ERROR come
@@ -26,7 +26,7 @@
 
    The gz_strwinerror function does not change the current setting of
    GetLastError. */
-char ZEXPORT *gz_strwinerror (error)
+char ZLIB_INTERNAL *gz_strwinerror (error)
      DWORD error;
 {
     static char buf[1024];
@@ -65,7 +65,7 @@
     return buf;
 }
 
-#endif /* UNDER_CE && NO_ERRNO_H */
+#endif /* UNDER_CE */
 
 /* Reset gzip file state */
 local void gz_reset(state)
@@ -172,6 +172,7 @@
                         O_APPEND))),
             0666);
     if (state->fd == -1) {
+        free(state->path);
         free(state);
         return NULL;
     }
@@ -199,7 +200,6 @@
     return gz_open(path, -1, mode);
 }
 
-#if (defined(_LARGEFILE64_SOURCE)||(_FILE_OFFSET_BITS == 64))
 /* -- see zlib.h -- */
 gzFile ZEXPORT gzopen64(path, mode)
     const char *path;
@@ -207,7 +207,6 @@
 {
     return gz_open(path, -1, mode);
 }
-#endif /* (defined(_LARGEFILE64_SOURCE)||(_FILE_OFFSET_BITS == 64)) */
 
 /* -- see zlib.h -- */
 gzFile ZEXPORT gzdopen(fd, mode)
@@ -219,7 +218,7 @@
 
     if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL)
         return NULL;
-    sprintf(path, "<fd:%d>", fd);
+    sprintf(path, "<fd:%d>", fd);   /* for debugging */
     gz = gz_open(path, fd, mode);
     free(path);
     return gz;
@@ -307,7 +306,7 @@
     /* if within raw area while reading, just go there */
     if (state->mode == GZ_READ && state->how == COPY &&
         state->pos + offset >= state->raw) {
-        ret = LSEEK(state->fd, offset, SEEK_CUR);
+        ret = LSEEK(state->fd, offset - state->have, SEEK_CUR);
         if (ret == -1)
             return -1;
         state->have = 0;
@@ -388,7 +387,6 @@
 }
 
 /* -- see zlib.h -- */
-
 z_off64_t ZEXPORT gzoffset64(file)
     gzFile file;
 {
@@ -435,7 +433,8 @@
         return 0;
 
     /* return end-of-file state */
-    return state->mode == GZ_READ ? (state->eof && state->have == 0) : 0;
+    return state->mode == GZ_READ ?
+        (state->eof && state->strm.avail_in == 0 && state->have == 0) : 0;
 }
 
 /* -- see zlib.h -- */
@@ -483,7 +482,7 @@
    memory).  Simply save the error message as a static string.  If there is an
    allocation failure constructing the error message, then convert the error to
    out of memory. */
-void ZEXPORT gz_error(state, err, msg)
+void ZLIB_INTERNAL gz_error(state, err, msg)
     gz_statep state;
     int err;
     const char *msg;
@@ -523,7 +522,7 @@
    available) -- we need to do this to cover cases where 2's complement not
    used, since C standard permits 1's complement and sign-bit representations,
    otherwise we could just use ((unsigned)-1) >> 1 */
-unsigned ZEXPORT gz_intmax()
+unsigned ZLIB_INTERNAL gz_intmax()
 {
     unsigned p, q;
 

diff -u rtems/cpukit/zlib/gzread.c:1.1 rtems/cpukit/zlib/gzread.c:1.2
--- rtems/cpukit/zlib/gzread.c:1.1	Mon Mar 22 13:42:51 2010
+++ rtems/cpukit/zlib/gzread.c	Sat Mar 19 02:42:49 2011
@@ -55,7 +55,8 @@
     if (state->err != Z_OK)
         return -1;
     if (state->eof == 0) {
-        if (gz_load(state, state->in, state->size, &(strm->avail_in)) == -1)
+        if (gz_load(state, state->in, state->size,
+                (unsigned *)&(strm->avail_in)) == -1)
             return -1;
         strm->next_in = state->in;
     }

diff -u rtems/cpukit/zlib/inffast.h:1.1 rtems/cpukit/zlib/inffast.h:1.2
--- rtems/cpukit/zlib/inffast.h:1.1	Fri Oct 28 02:17:22 2005
+++ rtems/cpukit/zlib/inffast.h	Sat Mar 19 02:42:49 2011
@@ -1,5 +1,5 @@
 /* inffast.h -- header to use inffast.c
- * Copyright (C) 1995-2003 Mark Adler
+ * Copyright (C) 1995-2003, 2010 Mark Adler
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
 
@@ -8,4 +8,4 @@
    subject to change. Applications should only use zlib.h.
  */
 
-void inflate_fast OF((z_streamp strm, unsigned start));
+void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));

diff -u rtems/cpukit/zlib/inffast.c:1.3 rtems/cpukit/zlib/inffast.c:1.4
--- rtems/cpukit/zlib/inffast.c:1.3	Mon Mar 22 13:42:51 2010
+++ rtems/cpukit/zlib/inffast.c	Sat Mar 19 02:42:49 2011
@@ -1,5 +1,5 @@
 /* inffast.c -- fast decoding
- * Copyright (C) 1995-2008 Mark Adler
+ * Copyright (C) 1995-2008, 2010 Mark Adler
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
 
@@ -64,7 +64,7 @@
       requires strm->avail_out >= 258 for each loop to avoid checking for
       output space.
  */
-void inflate_fast(strm, start)
+void ZLIB_INTERNAL inflate_fast(strm, start)
 z_streamp strm;
 unsigned start;         /* inflate()'s starting value for strm->avail_out */
 {

diff -u rtems/cpukit/zlib/inftrees.h:1.4 rtems/cpukit/zlib/inftrees.h:1.5
--- rtems/cpukit/zlib/inftrees.h:1.4	Mon Mar 22 13:42:51 2010
+++ rtems/cpukit/zlib/inftrees.h	Sat Mar 19 02:42:49 2011
@@ -1,5 +1,5 @@
 /* inftrees.h -- header to use inftrees.c
- * Copyright (C) 1995-2005 Mark Adler
+ * Copyright (C) 1995-2005, 2010 Mark Adler
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
 
@@ -57,6 +57,6 @@
     DISTS
 } codetype;
 
-extern int inflate_table OF((codetype type, unsigned short FAR *lens,
+int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
                              unsigned codes, code FAR * FAR *table,
                              unsigned FAR *bits, unsigned short FAR *work));

diff -u rtems/cpukit/zlib/inftrees.c:1.5 rtems/cpukit/zlib/inftrees.c:1.6
--- rtems/cpukit/zlib/inftrees.c:1.5	Mon Mar 22 13:42:51 2010
+++ rtems/cpukit/zlib/inftrees.c	Sat Mar 19 02:42:49 2011
@@ -9,7 +9,7 @@
 #define MAXBITS 15
 
 const char inflate_copyright[] =
-   " inflate 1.2.4 Copyright 1995-2010 Mark Adler ";
+   " inflate 1.2.5 Copyright 1995-2010 Mark Adler ";
 /*
   If you use the zlib library in a product, an acknowledgment is welcome
   in the documentation of your product. If for some reason you cannot
@@ -29,7 +29,7 @@
    table index bits.  It will differ if the request is greater than the
    longest code or if it is less than the shortest code.
  */
-int inflate_table(type, lens, codes, table, bits, work)
+int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work)
 codetype type;
 unsigned short FAR *lens;
 unsigned codes;
@@ -62,7 +62,7 @@
         35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
     static const unsigned short lext[31] = { /* Length codes 257..285 extra */
         16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
-        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 64, 195};
+        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 73, 195};
     static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
         1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
         257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,

diff -u rtems/cpukit/zlib/trees.h:1.1 rtems/cpukit/zlib/trees.h:1.2
--- rtems/cpukit/zlib/trees.h:1.1	Fri Oct 28 02:16:42 2005
+++ rtems/cpukit/zlib/trees.h	Sat Mar 19 02:42:49 2011
@@ -70,7 +70,7 @@
 {{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}}
 };
 
-const uch _dist_code[DIST_CODE_LEN] = {
+const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {
  0,  1,  2,  3,  4,  4,  5,  5,  6,  6,  6,  6,  7,  7,  7,  7,  8,  8,  8,  8,
  8,  8,  8,  8,  9,  9,  9,  9,  9,  9,  9,  9, 10, 10, 10, 10, 10, 10, 10, 10,
 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
@@ -99,7 +99,7 @@
 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
 };
 
-const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {
+const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {
  0,  1,  2,  3,  4,  5,  6,  7,  8,  8,  9,  9, 10, 10, 11, 11, 12, 12, 12, 12,
 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19,

diff -u rtems/cpukit/zlib/trees.c:1.5 rtems/cpukit/zlib/trees.c:1.6
--- rtems/cpukit/zlib/trees.c:1.5	Mon Mar 22 13:42:52 2010
+++ rtems/cpukit/zlib/trees.c	Sat Mar 19 02:42:49 2011
@@ -1,5 +1,5 @@
 /* trees.c -- output deflated data using Huffman coding
- * Copyright (C) 1995-2009 Jean-loup Gailly
+ * Copyright (C) 1995-2010 Jean-loup Gailly
  * detect_data_type() function provided freely by Cosmin Truta, 2006
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
@@ -351,13 +351,14 @@
                 static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5));
     }
 
-    fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n");
+    fprintf(header, "const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {\n");
     for (i = 0; i < DIST_CODE_LEN; i++) {
         fprintf(header, "%2u%s", _dist_code[i],
                 SEPARATOR(i, DIST_CODE_LEN-1, 20));
     }
 
-    fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n");
+    fprintf(header,
+        "const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {\n");
     for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) {
         fprintf(header, "%2u%s", _length_code[i],
                 SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20));
@@ -382,7 +383,7 @@
 /* ===========================================================================
  * Initialize the tree data structures for a new zlib stream.
  */
-void _tr_init(s)
+void ZLIB_INTERNAL _tr_init(s)
     deflate_state *s;
 {
     tr_static_init();
@@ -867,7 +868,7 @@
 /* ===========================================================================
  * Send a stored block
  */
-void _tr_stored_block(s, buf, stored_len, last)
+void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last)
     deflate_state *s;
     charf *buf;       /* input block */
     ulg stored_len;   /* length of input block */
@@ -892,7 +893,7 @@
  * To simplify the code, we assume the worst case of last real code encoded
  * on one bit only.
  */
-void _tr_align(s)
+void ZLIB_INTERNAL _tr_align(s)
     deflate_state *s;
 {
     send_bits(s, STATIC_TREES<<1, 3);
@@ -921,7 +922,7 @@
  * Determine the best encoding for the current block: dynamic trees, static
  * trees or store, and output the encoded block to the zip file.
  */
-void _tr_flush_block(s, buf, stored_len, last)
+void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
     deflate_state *s;
     charf *buf;       /* input block, or NULL if too old */
     ulg stored_len;   /* length of input block */
@@ -1022,7 +1023,7 @@
  * Save the match info and tally the frequency counts. Return true if
  * the current block must be flushed.
  */
-int _tr_tally (s, dist, lc)
+int ZLIB_INTERNAL _tr_tally (s, dist, lc)
     deflate_state *s;
     unsigned dist;  /* distance of matched string */
     unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */

diff -u rtems/cpukit/zlib/zlib.h:1.4 rtems/cpukit/zlib/zlib.h:1.5
--- rtems/cpukit/zlib/zlib.h:1.4	Sat Mar 27 09:39:19 2010
+++ rtems/cpukit/zlib/zlib.h	Sat Mar 19 02:42:49 2011
@@ -1,5 +1,5 @@
 /* zlib.h -- interface of the 'zlib' general purpose compression library
-  version 1.2.4, Mar 14th, 2010
+  version 1.2.5, April 19th, 2010
 
   Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
 
@@ -37,11 +37,11 @@
 extern "C" {
 #endif
 
-#define ZLIB_VERSION "1.2.4"
-#define ZLIB_VERNUM 0x1240
+#define ZLIB_VERSION "1.2.5"
+#define ZLIB_VERNUM 0x1250
 #define ZLIB_VER_MAJOR 1
 #define ZLIB_VER_MINOR 2
-#define ZLIB_VER_REVISION 4
+#define ZLIB_VER_REVISION 5
 #define ZLIB_VER_SUBREVISION 0
 
 /*
@@ -1556,29 +1556,35 @@
         inflateBackInit_((strm), (windowBits), (window), \
                                             ZLIB_VERSION, sizeof(z_stream))
 
-#ifdef _LARGEFILE64_SOURCE
+/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
+ * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
+ * both are true, the application gets the *64 functions, and the regular
+ * functions are changed to 64 bits) -- in case these are set on systems
+ * without large file support, _LFS64_LARGEFILE must also be true
+ */
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
    ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
-   ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int));
-   ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile));
-   ZEXTERN off64_t ZEXPORT gzoffset64 OF((gzFile));
-   ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off64_t));
-   ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t));
+   ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
+   ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
+   ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
+   ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
+   ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
 #endif
 
-#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS == 64
+#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
 #  define gzopen gzopen64
 #  define gzseek gzseek64
 #  define gztell gztell64
 #  define gzoffset gzoffset64
 #  define adler32_combine adler32_combine64
 #  define crc32_combine crc32_combine64
-#  ifndef _LARGEFILE64_SOURCE
+#  ifdef _LARGEFILE64_SOURCE
      ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
-     ZEXTERN off_t ZEXPORT gzseek64 OF((gzFile, off_t, int));
-     ZEXTERN off_t ZEXPORT gztell64 OF((gzFile));
-     ZEXTERN off_t ZEXPORT gzoffset64 OF((gzFile));
-     ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off_t));
-     ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off_t));
+     ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
+     ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
+     ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
+     ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
+     ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
 #  endif
 #else
    ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
@@ -1587,17 +1593,14 @@
    ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
    ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
    ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
-#  ifndef _LARGEFILE64_SOURCE
-     ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
-     ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
-     ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
-#  endif
 #endif
 
+/* hack for buggy compilers */
 #if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
-    struct internal_state {int dummy;}; /* hack for buggy compilers */
+    struct internal_state {int dummy;};
 #endif
 
+/* undocumented functions */
 ZEXTERN const char   * ZEXPORT zError           OF((int));
 ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp));
 ZEXTERN const uLongf * ZEXPORT get_crc_table    OF((void));

diff -u rtems/cpukit/zlib/zutil.h:1.7 rtems/cpukit/zlib/zutil.h:1.8
--- rtems/cpukit/zlib/zutil.h:1.7	Sat Mar 27 09:39:19 2010
+++ rtems/cpukit/zlib/zutil.h	Sat Mar 19 02:42:49 2011
@@ -13,7 +13,12 @@
 #ifndef ZUTIL_H
 #define ZUTIL_H
 
-#define ZLIB_INTERNAL
+#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
+#  define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
+#else
+#  define ZLIB_INTERNAL
+#endif
+
 #include "zlib.h"
 
 #ifdef STDC
@@ -24,19 +29,6 @@
 #  include <stdlib.h>
 #endif
 
-#if defined(UNDER_CE) && defined(NO_ERRNO_H)
-#  define zseterrno(ERR) SetLastError((DWORD)(ERR))
-#  define zerrno() ((int)GetLastError())
-#else
-#  ifdef NO_ERRNO_H
-     extern int errno;
-#  else
-#    include <errno.h>
-#  endif
-#  define zseterrno(ERR) do { errno = (ERR); } while (0)
-#  define zerrno() errno
-#endif
-
 #ifndef local
 #  define local static
 #endif
@@ -167,10 +159,10 @@
   #pragma warn -8066
 #endif
 
-#ifdef _LARGEFILE64_SOURCE
-#  define z_off64_t off64_t
-#else
-#  define z_off64_t z_off_t
+/* provide prototypes for these when building zlib without LFS */
+#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
+    ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
+    ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
 #endif
 
         /* common defaults */
@@ -183,12 +175,6 @@
 #  define F_OPEN(name, mode) fopen((name), (mode))
 #endif
 
-#ifdef _LARGEFILE64_SOURCE
-#  define F_OPEN64(name, mode) fopen64((name), (mode))
-#else
-#  define F_OPEN64(name, mode) fopen((name), (mode))
-#endif
-
          /* functions */
 
 #if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
@@ -250,16 +236,16 @@
 #    define zmemzero(dest, len) memset(dest, 0, len)
 #  endif
 #else
-   extern void zmemcpy  OF((Bytef* dest, const Bytef* source, uInt len));
-   extern int  zmemcmp  OF((const Bytef* s1, const Bytef* s2, uInt len));
-   extern void zmemzero OF((Bytef* dest, uInt len));
+   void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
+   int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
+   void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len));
 #endif
 
 /* Diagnostic functions */
 #ifdef DEBUG
 #  include <stdio.h>
-   extern int z_verbose;
-   extern void z_error    OF((char *m));
+   extern int ZLIB_INTERNAL z_verbose;
+   extern void ZLIB_INTERNAL z_error OF((char *m));
 #  define Assert(cond,msg) {if(!(cond)) z_error(msg);}
 #  define Trace(x) {if (z_verbose>=0) fprintf x ;}
 #  define Tracev(x) {if (z_verbose>0) fprintf x ;}
@@ -276,8 +262,9 @@
 #endif
 
 
-voidpf zcalloc OF((voidpf opaque, uInt items, uInt size));
-void   zcfree  OF((voidpf opaque, voidpf ptr));
+voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
+                        unsigned size));
+void ZLIB_INTERNAL zcfree  OF((voidpf opaque, voidpf ptr));
 
 #define ZALLOC(strm, items, size) \
            (*((strm)->zalloc))((strm)->opaque, (items), (size))

diff -u rtems/cpukit/zlib/zutil.c:1.9 rtems/cpukit/zlib/zutil.c:1.10
--- rtems/cpukit/zlib/zutil.c:1.9	Sat Mar 27 09:39:19 2010
+++ rtems/cpukit/zlib/zutil.c	Sat Mar 19 02:42:49 2011
@@ -1,5 +1,5 @@
 /* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * Copyright (C) 1995-2005, 2010 Jean-loup Gailly.
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
 
@@ -117,9 +117,9 @@
 #  ifndef verbose
 #    define verbose 0
 #  endif
-int z_verbose = verbose;
+int ZLIB_INTERNAL z_verbose = verbose;
 
-void z_error (m)
+void ZLIB_INTERNAL z_error (m)
     char *m;
 {
     fprintf(stderr, "%s\n", m);
@@ -146,7 +146,7 @@
 
 #ifndef HAVE_MEMCPY
 
-void zmemcpy(dest, source, len)
+void ZLIB_INTERNAL zmemcpy(dest, source, len)
     Bytef* dest;
     const Bytef* source;
     uInt  len;
@@ -157,7 +157,7 @@
     } while (--len != 0);
 }
 
-int zmemcmp(s1, s2, len)
+int ZLIB_INTERNAL zmemcmp(s1, s2, len)
     const Bytef* s1;
     const Bytef* s2;
     uInt  len;
@@ -170,7 +170,7 @@
     return 0;
 }
 
-void zmemzero(dest, len)
+void ZLIB_INTERNAL zmemzero(dest, len)
     Bytef* dest;
     uInt  len;
 {
@@ -213,7 +213,7 @@
  * a protected system like OS/2. Use Microsoft C instead.
  */
 
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
+voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size)
 {
     voidpf buf = opaque; /* just to make some compilers happy */
     ulg bsize = (ulg)items*size;
@@ -237,7 +237,7 @@
     return buf;
 }
 
-void  zcfree (voidpf opaque, voidpf ptr)
+void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
 {
     int n;
     if (*(ush*)&ptr != 0) { /* object < 64K */
@@ -272,13 +272,13 @@
 #  define _hfree   hfree
 #endif
 
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
+voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size)
 {
     if (opaque) opaque = 0; /* to make compiler happy */
     return _halloc((long)items, size);
 }
 
-void  zcfree (voidpf opaque, voidpf ptr)
+void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
 {
     if (opaque) opaque = 0; /* to make compiler happy */
     _hfree(ptr);
@@ -297,17 +297,17 @@
 extern void   free   OF((voidpf ptr));
 #endif
 
-voidpf zcalloc (opaque, items, size)
+voidpf ZLIB_INTERNAL zcalloc (opaque, items, size)
     voidpf opaque;
-    uInt items;
-    uInt size;
+    unsigned items;
+    unsigned size;
 {
     if (opaque) items += size - size; /* make compiler happy */
     return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
                               (voidpf)calloc(items, size);
 }
 
-void  zcfree (opaque, ptr)
+void ZLIB_INTERNAL zcfree (opaque, ptr)
     voidpf opaque;
     voidpf ptr;
 {


 *ralf*:
Generate zconf.h from zconf.h.in.

M    1.5  cpukit/zlib/Makefile.am

diff -u rtems/cpukit/zlib/Makefile.am:1.4 rtems/cpukit/zlib/Makefile.am:1.5
--- rtems/cpukit/zlib/Makefile.am:1.4	Mon Mar 22 13:42:49 2010
+++ rtems/cpukit/zlib/Makefile.am	Sat Mar 19 02:43:11 2011
@@ -24,5 +24,13 @@
 
 include_HEADERS = zlib.h zconf.h
 
+zconf.h: $(srcdir)/zconf.h.in
+	sed \
+	  -e 's,#ifdef Z_PREFIX.* may be ,#if 1 /* was ,' \
+	  -e 's,#ifdef HAVE_UNISTD_H.* may be ,#if 1 /* was ,' \
+	< $(srcdir)/zconf.h.in > zconf.h
+CLEANFILES = zconf.h
+EXTRA_DIST = zconf.h.in
+
 include $(srcdir)/preinstall.am
 include $(top_srcdir)/automake/local.am


 *ralf*:
Remove (Import cleanup).

R    1.1  cpukit/zlib/treebuild.xml
R    1.9  cpukit/zlib/zconf.h
R    1.1  cpukit/zlib/zconf.h.cmakein

 *ralf*:
2011-03-19	Ralf Corsépius <ralf.corsepius at rtems.org>

	* ChangeLog.zlib, adler32.c, compress.c, crc32.c,
	deflate.c, deflate.h, gzguts.h, gzlib.c, gzread.c,
	inffast.c, inffast.h, inftrees.c, inftrees.h,
	trees.c, trees.h, uncompr.c, zlib.h, zutil.c, zutil.h:
	Update to zlib-1.2.5.
	* Makefile.am: Generate zconf.h from zconf.h.in.
	* treebuild.xml, zconf.h.cmakein, zconf.h:
	Remove (Import cleanup).

M   1.20  cpukit/zlib/ChangeLog

diff -u rtems/cpukit/zlib/ChangeLog:1.19 rtems/cpukit/zlib/ChangeLog:1.20
--- rtems/cpukit/zlib/ChangeLog:1.19	Fri Mar 18 11:56:24 2011
+++ rtems/cpukit/zlib/ChangeLog	Sat Mar 19 02:43:56 2011
@@ -1,3 +1,14 @@
+2011-03-19	Ralf Corsépius <ralf.corsepius at rtems.org>
+
+	* ChangeLog.zlib, adler32.c, compress.c, crc32.c,
+	deflate.c, deflate.h, gzguts.h, gzlib.c, gzread.c,
+	inffast.c, inffast.h, inftrees.c, inftrees.h,
+	trees.c, trees.h, uncompr.c, zlib.h, zutil.c, zutil.h:
+	Update to zlib-1.2.5.
+	* Makefile.am: Generate zconf.h from zconf.h.in.
+	* treebuild.xml, zconf.h.cmakein, zconf.h:
+	Remove (Import cleanup).
+
 2011-03-18	Ralf Corsépius <ralf.corsepius at rtems.org>
 
 	* win32/README-WIN32.txt, old/visualc6/README.txt,


 *ralf* (on branch rtems-4-10-branch):
Add config.status, config.sub, config.log.

M    1.5  contrib/crossrpms/.cvsignore
M 1.3.8.1  contrib/crossrpms/.cvsignore
M 1.4.2.1  contrib/crossrpms/.cvsignore

diff -u rtems/contrib/crossrpms/.cvsignore:1.4 rtems/contrib/crossrpms/.cvsignore:1.5
--- rtems/contrib/crossrpms/.cvsignore:1.4	Mon Nov 30 02:49:41 2009
+++ rtems/contrib/crossrpms/.cvsignore	Sun Mar 20 01:52:50 2011
@@ -4,7 +4,9 @@
 aclocal.m4
 configure
 config.guess
+config.status
+config.sub
+config.log
 autom4te*
 missing
 install-sh
-

diff -u rtems/contrib/crossrpms/.cvsignore:1.3 rtems/contrib/crossrpms/.cvsignore:1.3.8.1
--- rtems/contrib/crossrpms/.cvsignore:1.3	Wed Aug  9 18:06:58 2006
+++ rtems/contrib/crossrpms/.cvsignore	Sun Mar 20 01:56:35 2011
@@ -3,8 +3,10 @@
 Makefile.in
 aclocal.m4
 configure
-config.*
+config.guess
+config.status
+config.sub
+config.log
 autom4te*
 missing
 install-sh
-

diff -u rtems/contrib/crossrpms/.cvsignore:1.4 rtems/contrib/crossrpms/.cvsignore:1.4.2.1
--- rtems/contrib/crossrpms/.cvsignore:1.4	Mon Nov 30 02:49:41 2009
+++ rtems/contrib/crossrpms/.cvsignore	Sun Mar 20 01:53:27 2011
@@ -4,7 +4,9 @@
 aclocal.m4
 configure
 config.guess
+config.status
+config.sub
+config.log
 autom4te*
 missing
 install-sh
-


 *ralf*:
Eliminate RPM_OS.

M   1.81  contrib/crossrpms/configure.ac

diff -u rtems/contrib/crossrpms/configure.ac:1.80 rtems/contrib/crossrpms/configure.ac:1.81
--- rtems/contrib/crossrpms/configure.ac:1.80	Thu Mar 10 00:56:14 2011
+++ rtems/contrib/crossrpms/configure.ac	Sun Mar 20 02:34:21 2011
@@ -117,23 +117,6 @@
 ])
 AC_SUBST(SPECSTRIP_OPTS)
 
-AS_IF([test "${host}" != "${build}"],[
-AC_MSG_CHECKING(for RPM OS)
-case "$host" in
-  i?86-*cygwin*) 	RPM_OS=cygwin ;;
-  i?86-*mingw*)		RPM_OS=mingw32 ;;
-  sparc-*solaris*)	RPM_OS=solaris2.7 ;;
-  i?86-*freebsd5*)	RPM_OS=freebsd5.2 ;;
-  i?86-*freebsd6.0)	RPM_OS=freebsd6.0 ;;
-  i?86-*freebsd6.1)	RPM_OS=freebsd6.1 ;;
-  *)
-    AC_MSG_ERROR([Unsupported host ${host}])
-    ;;
-esac
-AC_MSG_RESULT($RPM_OS)
-])
-AC_SUBST(RPM_OS)
-
 for f in $targets; do
 ac_cv_mytarget=`$SHELL "$ac_aux_dir/config.sub" $f` ||
   AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $f failed])


 *ralf*:
Add netbsd5.1.

M   1.41  contrib/crossrpms/Makefile.am
M   1.82  contrib/crossrpms/configure.ac

diff -u rtems/contrib/crossrpms/Makefile.am:1.40 rtems/contrib/crossrpms/Makefile.am:1.41
--- rtems/contrib/crossrpms/Makefile.am:1.40	Wed Mar  9 22:37:36 2011
+++ rtems/contrib/crossrpms/Makefile.am	Sun Mar 20 12:09:47 2011
@@ -13,6 +13,7 @@
 DIST_SUBDIRS += freebsd8.2
 DIST_SUBDIRS += mingw32
 DIST_SUBDIRS += netbsd5.0.2
+DIST_SUBDIRS += netbsd5.1
 DIST_SUBDIRS += solaris2.7
 DIST_SUBDIRS += rtems4.11
 

diff -u rtems/contrib/crossrpms/configure.ac:1.81 rtems/contrib/crossrpms/configure.ac:1.82
--- rtems/contrib/crossrpms/configure.ac:1.81	Sun Mar 20 02:34:21 2011
+++ rtems/contrib/crossrpms/configure.ac	Sun Mar 20 12:09:47 2011
@@ -159,6 +159,10 @@
 AC_CONFIG_FILES([netbsd5.0.2/i386/Makefile])
 AC_CONFIG_FILES([netbsd5.0.2/x86_64/Makefile])
 
+AC_CONFIG_FILES([netbsd5.1/Makefile])
+AC_CONFIG_FILES([netbsd5.1/i386/Makefile])
+AC_CONFIG_FILES([netbsd5.1/x86_64/Makefile])
+
 AC_CONFIG_FILES([rtems4.11/Makefile])
 AC_CONFIG_FILES([rtems4.11/arm/Makefile])
 AC_CONFIG_FILES([rtems4.11/avr/Makefile])


 *ralf*:
New.

A    1.1  contrib/crossrpms/netbsd5.1/.cvsignore
A    1.1  contrib/crossrpms/netbsd5.1/Makefile.am
A    1.1  contrib/crossrpms/netbsd5.1/binutils.am
A    1.1  contrib/crossrpms/netbsd5.1/gcc-prep.add
A    1.1  contrib/crossrpms/netbsd5.1/gcc.am
A    1.1  contrib/crossrpms/netbsd5.1/i386/.cvsignore
A    1.1  contrib/crossrpms/netbsd5.1/i386/Makefile.am
A    1.1  contrib/crossrpms/netbsd5.1/i386/binutils-sources.add
A    1.1  contrib/crossrpms/netbsd5.1/i386/gcc-sources.add
A    1.1  contrib/crossrpms/netbsd5.1/i386/i386-pc-netbsdelf5.1-binutils.spec
A    1.1  contrib/crossrpms/netbsd5.1/i386/i386-pc-netbsdelf5.1-gcc.spec
A    1.1  contrib/crossrpms/netbsd5.1/i386/i386-pc-netbsdelf5.1-libs.spec
A    1.1  contrib/crossrpms/netbsd5.1/i386/libs.add
A    1.1  contrib/crossrpms/netbsd5.1/i386/target-libs.add
A    1.1  contrib/crossrpms/netbsd5.1/libs.am
A    1.1  contrib/crossrpms/netbsd5.1/x86_64/.cvsignore
A    1.1  contrib/crossrpms/netbsd5.1/x86_64/Makefile.am
A    1.1  contrib/crossrpms/netbsd5.1/x86_64/amd64-pc-netbsdelf5.1-binutils.spec
A    1.1  contrib/crossrpms/netbsd5.1/x86_64/amd64-pc-netbsdelf5.1-gcc.spec
A    1.1  contrib/crossrpms/netbsd5.1/x86_64/amd64-pc-netbsdelf5.1-libs.spec
A    1.1  contrib/crossrpms/netbsd5.1/x86_64/binutils-sources.add
A    1.1  contrib/crossrpms/netbsd5.1/x86_64/gcc-sources.add
A    1.1  contrib/crossrpms/netbsd5.1/x86_64/libs.add
A    1.1  contrib/crossrpms/netbsd5.1/x86_64/target-libs.add

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/.cvsignore:1.1
--- /dev/null	Mon Mar 21 08:11:52 2011
+++ rtems/contrib/crossrpms/netbsd5.1/.cvsignore	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/Makefile.am:1.1
--- /dev/null	Mon Mar 21 08:11:52 2011
+++ rtems/contrib/crossrpms/netbsd5.1/Makefile.am	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,4 @@
+# $Id$
+
+SUBDIRS = i386 x86_64
+

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/binutils.am:1.1
--- /dev/null	Mon Mar 21 08:11:52 2011
+++ rtems/contrib/crossrpms/netbsd5.1/binutils.am	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,30 @@
+EXTRA_DIST += binutils-sources.add
+
+BINUTILS_OPTS =
+
+BINUTILS_SUBPACKAGES = $(top_srcdir)/common/common.add
+BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/binutils.add
+BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/prep.add
+BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/build.add
+BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/install.add
+BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/rpm-install.add
+BINUTILS_SUBPACKAGES += $(top_srcdir)/common/clean.add
+BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/target-binutils.add
+BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/base-binutils.add
+
+$(TARGET)-binutils.spec.in: $(BINUTILS_SUBPACKAGES) Makefile.am $(srcdir)/binutils-sources.add $(srcdir)/../binutils.am
+	cat $(BINUTILS_SUBPACKAGES) | sed \
+	  -e "/[@]SOURCES[@]/r $(srcdir)/binutils-sources.add" \
+	  -e "/[@]SOURCES[@]/d" \
+	  -e "s/[@]BINUTILS_VERS[@]/$(BINUTILS_VERS)/g" \
+	  -e "s/[@]BINUTILS_PKGVERS[@]/$(BINUTILS_PKGVERS)/g" \
+	  -e "s/[@]BINUTILS_RPMREL[@]/$(BINUTILS_RPMREL)%{?dist}/g" \
+	  | $(MKSPEC0) > $(TARGET)-binutils.spec.in
+CLEANFILES += $(TARGET)-binutils.spec.in
+
+ at rpmprefix@$(TARGET)-binutils.spec: $(TARGET)-binutils.spec.in
+	$(MKSPEC) $(TARGET)-binutils.spec.in | $(SPECSTRIP) $(BINUTILS_OPTS) > $@
+CLEANFILES += @rpmprefix@$(TARGET)-binutils.spec
+noinst_DATA += @rpmprefix@$(TARGET)-binutils.spec
+
+EXTRA_DIST += $(BINUTILS_SUBPACKAGES)

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/gcc.am:1.1
--- /dev/null	Mon Mar 21 08:11:52 2011
+++ rtems/contrib/crossrpms/netbsd5.1/gcc.am	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,40 @@
+EXTRA_DIST += $(srcdir)/../gcc-prep.add
+EXTRA_DIST += $(srcdir)/gcc-sources.add
+
+GCC_OPTS =
+
+GCC_SUBPACKAGES = $(top_srcdir)/common/common.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/gccnewlib.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/prep.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/build.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/install.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/rpm-install.add
+GCC_SUBPACKAGES += $(top_srcdir)/common/clean.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/target-gcc.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/base-gcc.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/target-c++.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/target-gfortran.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/base-gfortran.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/target-objc.add
+
+$(TARGET)-gcc.spec.in: $(GCC_SUBPACKAGES) Makefile.am $(srcdir)/gcc-sources.add $(srcdir)/../gcc-prep.add $(srcdir)/../gcc.am
+	cat $(GCC_SUBPACKAGES) | sed \
+	  -e "/[@]SOURCES[@]/r $(srcdir)/gcc-sources.add" \
+	  -e "/[@]SOURCES[@]/d" \
+	  -e "/[@]PREP[@]/r $(srcdir)/../gcc-prep.add" \
+	  -e "/[@]PREP[@]/d" \
+	  -e "s/[@]GCC_VERS[@]/$(GCC_VERS)/g" \
+	  -e "s/[@]GCC_PKGVERS[@]/$(GCC_PKGVERS)/g" \
+	  -e "s/[@]GCC_RPMREL[@]/$(GCC_RPMREL)%{?dist}/g" \
+	  -e "/[@]tool_target[@]-newlib/d" \
+	  -e "/[@]tool_target[@]-w32api-sys-root/d" \
+	  -e "/--with-newlib/d" \
+	  | $(MKSPEC0) > $(TARGET)-gcc.spec.in
+CLEANFILES += $(TARGET)-gcc.spec.in
+
+ at rpmprefix@$(TARGET)-gcc.spec: $(TARGET)-gcc.spec.in
+	$(MKSPEC) $(TARGET)-gcc.spec.in | $(SPECSTRIP) $(GCC_OPTS) > $@
+CLEANFILES += @rpmprefix@$(TARGET)-gcc.spec
+noinst_DATA += @rpmprefix@$(TARGET)-gcc.spec
+
+EXTRA_DIST += $(GCC_SUBPACKAGES)

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/i386/.cvsignore:1.1
--- /dev/null	Mon Mar 21 08:11:53 2011
+++ rtems/contrib/crossrpms/netbsd5.1/i386/.cvsignore	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,4 @@
+Makefile
+Makefile.in
+rtems*.spec
+*.spec.in

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/i386/Makefile.am:1.1
--- /dev/null	Mon Mar 21 08:11:53 2011
+++ rtems/contrib/crossrpms/netbsd5.1/i386/Makefile.am	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,23 @@
+# $Id$
+
+TARGET = i386-pc-netbsdelf5.1
+
+include $(top_srcdir)/mkspec.am
+
+NETBSD_VERS = 5.1
+NETBSD_RPMREL = 0.20110320.0
+EXTRA_DIST += libs.add
+EXTRA_DIST += target-libs.add
+include ../libs.am
+
+BINUTILS_VERS = 2.21
+BINUTILS_PKGVERS = $(BINUTILS_VERS)
+BINUTILS_RPMREL = 0.20110320.0
+include ../binutils.am
+BINUTILS_OPTS +=
+
+GCC_VERS = 4.5.0
+GCC_PKGVERS = $(GCC_VERS)
+GCC_RPMREL = 0.20110320.0
+include ../gcc.am
+GCC_OPTS += --languages=c,cxx,fortran,objc

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/i386/binutils-sources.add:1.1
--- /dev/null	Mon Mar 21 08:11:53 2011
+++ rtems/contrib/crossrpms/netbsd5.1/i386/binutils-sources.add	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,2 @@
+Source0: http://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
+ at PATCH0@

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/i386/gcc-sources.add:1.1
--- /dev/null	Mon Mar 21 08:11:53 2011
+++ rtems/contrib/crossrpms/netbsd5.1/i386/gcc-sources.add	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,35 @@
+Source0: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.0"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
+%endif
+%{?_without_sources:NoSource:	0}
+
+%if %build_cxx
+Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+ at PATCH1@
+%{?_without_sources:NoSource:	1}
+
+%endif
+%if %build_fortran
+Source2:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
+ at PATCH2@
+%{?_without_sources:NoSource:	2}
+
+%endif
+%if %build_gcj
+Source3:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-java-%{gcc_pkgvers}.tar.bz2
+ at PATCH3@
+%{?_without_sources:NoSource:	3}
+
+%endif
+%if %build_gnat
+Source4:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-ada-%{gcc_pkgvers}.tar.bz2
+ at PATCH4@
+%{?_without_sources:NoSource:	4}
+
+%endif
+%if %build_objc
+Source5:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-objc-%{gcc_pkgvers}.tar.bz2
+ at PATCH5@
+%{?_without_sources:NoSource:	5}
+%endif

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/i386/i386-pc-netbsdelf5.1-binutils.spec:1.1
--- /dev/null	Mon Mar 21 08:11:53 2011
+++ rtems/contrib/crossrpms/netbsd5.1/i386/i386-pc-netbsdelf5.1-binutils.spec	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,170 @@
+#
+# Please send bugfixes or comments to
+# 	http://www.rtems.org/bugzilla
+#
+
+
+%ifos cygwin cygwin32 mingw mingw32
+%define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
+%else
+%define _exeext %{nil}
+%endif
+
+%ifos cygwin cygwin32
+%define optflags -O3 -pipe -march=i486 -funroll-loops
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
+%endif
+
+%if "%{_build}" != "%{_host}"
+%define _host_rpmprefix %{_host}-
+%else
+%define _host_rpmprefix %{nil}
+%endif
+
+%define binutils_pkgvers 2.21
+%define binutils_version 2.21
+%define binutils_rpmvers %{expand:%(echo "2.21" | tr - _ )}
+
+Name:		i386-pc-netbsdelf5.1-binutils
+Summary:	Binutils for target i386-pc-netbsdelf5.1
+Group:		Development/Tools
+Version:	%{binutils_rpmvers}
+Release:	0.20110320.0%{?dist}
+License:	GPL/LGPL
+URL: 		http://sources.redhat.com/binutils
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires:	%{_host_rpmprefix}gcc
+
+%if "%{binutils_version}" >= "2.18"
+# Bug in bfd: Doesn't build without texinfo installed
+BuildRequires:	texinfo >= 4.2
+%else
+%endif
+BuildRequires:	flex
+BuildRequires:	bison
+
+Source0: http://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
+
+%description
+Cross binutils for target i386-pc-netbsdelf5.1
+%prep
+%setup -q -c -T -n %{name}-%{version}
+
+%setup -q -D -T -n %{name}-%{version} -a0
+cd binutils-%{binutils_pkgvers}
+%{?PATCH0:%patch0 -p1}
+cd ..
+
+%build
+  mkdir -p build
+  cd build
+%if "%{_build}" != "%{_host}"
+  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
+%endif
+  CFLAGS="$RPM_OPT_FLAGS" \
+  ../binutils-%{binutils_pkgvers}/configure \
+    --build=%_build --host=%_host \
+    --target=i386-pc-netbsdelf5.1 \
+    --verbose --disable-nls \
+    --without-included-gettext \
+    --disable-win32-registry \
+    --disable-werror \
+    --with-sysroot=%{_prefix}/i386-pc-netbsdelf5.1/sys-root \
+    --prefix=%{_prefix} --bindir=%{_bindir} \
+    --exec-prefix=%{_exec_prefix} \
+    --includedir=%{_includedir} --libdir=%{_libdir} \
+    --mandir=%{_mandir} --infodir=%{_infodir}
+
+  make %{?_smp_mflags} all
+  cd ..
+
+%install
+  rm -rf $RPM_BUILD_ROOT
+
+  cd build
+  make DESTDIR=$RPM_BUILD_ROOT install
+
+
+# Conflict with a native binutils' infos
+  rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+# We don't ship host files
+  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
+
+# manpages without corresponding tools
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i386-pc-netbsdelf5.1-dlltool%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i386-pc-netbsdelf5.1-dlltool*
+  fi
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i386-pc-netbsdelf5.1-nlmconv%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i386-pc-netbsdelf5.1-nlmconv*
+  fi
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i386-pc-netbsdelf5.1-windres%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i386-pc-netbsdelf5.1-windres*
+  fi
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i386-pc-netbsdelf5.1-windmc%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i386-pc-netbsdelf5.1-windmc*
+  fi
+
+  cd ..
+
+# Extract %%__os_install_post into os_install_post~
+cat << \EOF > os_install_post~
+%__os_install_post
+EOF
+
+# Generate customized brp-*scripts
+cat os_install_post~ | while read a x y; do
+case $a in
+# Prevent brp-strip* from trying to handle foreign binaries
+*/brp-strip*)
+  b=$(basename $a)
+  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
+  chmod a+x $b
+  ;;
+esac
+done
+
+sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
+< os_install_post~ > os_install_post 
+%define __os_install_post . ./os_install_post
+
+%clean
+  rm -rf $RPM_BUILD_ROOT
+
+# ==============================================================
+# i386-pc-netbsdelf5.1-binutils
+# ==============================================================
+# %package -n i386-pc-netbsdelf5.1-binutils
+# Summary:      rtems binutils for i386-pc-netbsdelf5.1
+# Group: Development/Tools
+# %if %build_infos
+# Requires: binutils-common
+# %endif
+
+%description -n i386-pc-netbsdelf5.1-binutils
+GNU binutils targetting i386-pc-netbsdelf5.1.
+
+%files -n i386-pc-netbsdelf5.1-binutils
+%defattr(-,root,root)
+
+%{_mandir}/man1/i386-pc-netbsdelf5.1-*.1*
+
+%{_bindir}/i386-pc-netbsdelf5.1-*
+
+%dir %{_exec_prefix}/i386-pc-netbsdelf5.1
+%dir %{_exec_prefix}/i386-pc-netbsdelf5.1/bin
+%{_exec_prefix}/i386-pc-netbsdelf5.1/bin/*
+
+%dir %{_exec_prefix}/i386-pc-netbsdelf5.1/lib
+%{_exec_prefix}/i386-pc-netbsdelf5.1/lib/ldscripts
+

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/i386/i386-pc-netbsdelf5.1-gcc.spec:1.1
--- /dev/null	Mon Mar 21 08:11:53 2011
+++ rtems/contrib/crossrpms/netbsd5.1/i386/i386-pc-netbsdelf5.1-gcc.spec	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,788 @@
+#
+# Please send bugfixes or comments to
+# 	http://www.rtems.org/bugzilla
+#
+
+
+%ifos cygwin cygwin32 mingw mingw32
+%define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
+%else
+%define _exeext %{nil}
+%endif
+
+%ifos cygwin cygwin32
+%define optflags -O3 -pipe -march=i486 -funroll-loops
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
+%endif
+
+%if "%{_build}" != "%{_host}"
+%define _host_rpmprefix %{_host}-
+%else
+%define _host_rpmprefix %{nil}
+%endif
+
+
+%define gcc_pkgvers 4.5.0
+%define gcc_version 4.5.0
+%define gcc_rpmvers %{expand:%(echo "4.5.0" | tr - _ )}
+
+
+Name:         	i386-pc-netbsdelf5.1-gcc
+Summary:      	i386-pc-netbsdelf5.1 gcc
+
+Group:	      	Development/Tools
+Version:        %{gcc_rpmvers}
+Release:      	0.20110320.0%{?dist}
+License:      	GPL
+URL:		http://gcc.gnu.org
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+%define _use_internal_dependency_generator 0
+
+BuildRequires:  %{_host_rpmprefix}gcc
+
+# FIXME: Disable lto for now, to avoid dependencies on libelf
+%bcond_with lto
+
+# FIXME: Disable python gdb scripts
+# ATM, no idea how to package them
+%bcond_with pygdb
+
+# FIXME: Disable GCC-plugin
+# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
+%bcond_with plugin
+
+# EXPERIMENTAL: Use gcc's stdint.h instead of newlib's
+# Should be applicable to gcc >= 4.5.0
+%bcond_with gcc_stdint
+
+# versions of libraries, we conditionally bundle if necessary
+%global mpc_version	0.8.1
+%global mpfr_version	2.4.2
+%global gmp_version	4.3.2
+%global libelf_version  0.8.13
+
+# versions of libraries these distros are known to ship
+%if 0%{?fc15}
+%global mpc_provided 0.8.3
+%global mpfr_provided 3.0.0
+%global gmp_provided 4.3.2
+%endif
+
+%if 0%{?fc14}
+%global mpc_provided 0.8.1
+%global mpfr_provided 2.4.2
+%global gmp_provided 4.3.1
+%endif
+
+%if 0%{?fc13}
+%global mpc_provided 0.8.1
+%global mpfr_provided 2.4.2
+%global gmp_provided 4.3.1
+%endif
+
+%if 0%{?el6}
+%global mpc_provided %{nil}
+%global mpfr_provided 2.4.1
+%global gmp_provided 4.3.1
+%endif
+
+%if 0%{?el5}
+%global mpc_provided %{nil}
+%global mpfr_provided %{nil}
+%global gmp_provided 4.1.4
+%endif
+
+%if 0%{?suse11_2}
+%global mpc_provided 0.7
+%global mpfr_provided 2.4.1
+%global gmp_provided 4.3.1
+%endif
+
+%if 0%{?suse11_3}
+%global mpc_provided 0.8.1
+%global mpfr_provided 2.4.2
+%global gmp_provided 4.3.2
+%endif
+
+%if 0%{?suse11_4}
+%global mpc_provided 0.8.2
+%global mpfr_provided 3.0.0
+%global gmp_provided 5.0.1
+%endif
+
+%if 0%{?cygwin}
+%global mpc_provided 0.8
+%global mpfr_provided 2.4.1
+%global gmp_provided 4.3.1
+%endif
+
+%if 0%{?mingw32}
+%global mpc_provided 0.8.1
+%global mpfr_provided 2.4.1
+%global gmp_provided 4.3.2
+%endif
+
+%if "%{gcc_version}" >= "4.2.0"
+%define gmp_required		4.1
+%define mpfr_required		2.2.1
+%endif
+
+%if "%{gcc_version}" >= "4.3.0"
+%define gmp_required		4.1
+%define mpfr_required		2.3.1
+%endif
+
+%if "%{gcc_version}" >= "4.3.3"
+%define cloog_required 		0.15
+%endif
+
+%if "%{gcc_version}" >= "4.4.0"
+%define mpfr_required		2.3.2
+%endif
+
+%if "%{gcc_version}" >= "4.5.0"
+%define mpc_required 		0.8
+%if %{with lto}
+%define libelf_required 	0.8.12
+%endif
+%endif
+
+%if %{defined mpc_required}
+%if "%{mpc_provided}" >= "%{mpc_required}"
+%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
+%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
+%if "%{_build}" != "%{_host}"
+BuildRequires:  %{_host_rpmprefix}mpc-devel >= %{mpc_required}
+%endif
+%else
+%define _build_mpc 1
+%define gmp_required 		4.2
+%endif
+%endif
+
+%if %{defined gmp_required}
+%if "%{gmp_provided}" >= "%{gmp_required}"
+BuildRequires: gmp-devel >= %{gmp_required}
+%if "%{_build}" != "%{_host}"
+BuildRequires:  %{_host_rpmprefix}gmp-devel >= %{gmp_required}
+%endif
+%else
+%define _build_gmp 1
+%endif
+%endif
+
+%if %{defined libelf_required}
+%if "%{libelf_provided}" >= "%{libelf_required}"
+BuildRequires: libelf-devel >= %{libelf_required}
+%if "%{_build}" != "%{_host}"
+BuildRequires:  %{_host_rpmprefix}libelf-devel >= %{libelf_required}
+%endif
+%else
+%define _build_libelf 1
+%endif
+%endif
+
+
+%if %{defined cloog_required}
+%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
+%{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
+%{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
+%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
+%{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
+%{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
+%{?suse11_2:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
+%endif
+
+
+%if %{defined mpfr_required}
+%if "%{mpfr_provided}" >= "%{mpfr_required}"
+BuildRequires: mpfr-devel >= %{mpfr_required}
+%if "%{_build}" != "%{_host}"
+BuildRequires:  %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
+%endif
+%else
+%define _build_mpfr 1
+%endif
+%endif
+
+%if "%{_build}" != "%{_host}"
+BuildRequires:  i386-pc-netbsdelf5.1-gcc = %{gcc_rpmvers}
+%endif
+
+%if "%{gcc_version}" >= "4.2.0"
+BuildRequires:	flex bison
+%endif
+
+
+BuildRequires:	texinfo >= 4.2
+BuildRequires:	i386-pc-netbsdelf5.1-binutils
+BuildRequires:	i386-pc-netbsdelf5.1-sys-root
+
+Requires:	i386-pc-netbsdelf5.1-binutils
+Requires:	i386-pc-netbsdelf5.1-sys-root
+Requires:	i386-pc-netbsdelf5.1-gcc-libgcc = %{gcc_rpmvers}-%{release}
+
+%if "%{gcc_version}" >= "4.5.0"
+BuildRequires:  zlib-devel
+%if "%{_build}" != "%{_host}"
+BuildRequires:  %{_host_rpmprefix}zlib-devel
+%endif
+%else
+%endif
+
+%global _gcclibdir %{_prefix}/lib
+
+Source0: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.0"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
+%endif
+%{?_without_sources:NoSource:	0}
+
+Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+%{?_without_sources:NoSource:	1}
+
+Source2:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
+%{?_without_sources:NoSource:	2}
+
+Source5:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-objc-%{gcc_pkgvers}.tar.bz2
+%{?_without_sources:NoSource:	5}
+
+%if 0%{?_build_mpfr}
+Source60:    http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
+%endif
+
+%if 0%{?_build_mpc}
+Source61:    http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
+%endif
+
+%if 0%{?_build_gmp}
+Source62:    ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
+%endif
+
+%if 0%{?_build_libelf}
+Source63:    http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
+%endif
+
+%description
+Cross gcc for i386-pc-netbsdelf5.1.
+
+%prep
+%setup -c -T -n %{name}-%{version}
+
+%setup -q -T -D -n %{name}-%{version} -a0
+cd gcc-%{gcc_pkgvers}
+%{?PATCH0:%patch0 -p1}
+cd ..
+
+%setup -q -T -D -n %{name}-%{version} -a1
+cd gcc-%{gcc_pkgvers}
+%{?PATCH1:%patch1 -p1}
+cd ..
+
+%setup -q -T -D -n %{name}-%{version} -a2
+%{?PATCH2:%patch2 -p0}
+
+
+
+%setup -q -T -D -n %{name}-%{version} -a5
+%{?PATCH5:%patch5 -p0}
+
+%if %{with gcc_stdint}
+sed -i -e '/thread_file=.*rtems/,/use_gcc_stdint=wrap/ { s/use_gcc_stdint=wrap/use_gcc_stdint=provide/}' gcc-%{gcc_pkgvers}/gcc/config.gcc
+%endif
+
+
+%if 0%{?_build_mpfr}
+%setup -q -T -D -n %{name}-%{version} -a60
+%{?PATCH60:%patch60 -p1}
+  # Build mpfr one-tree style
+  ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
+%endif
+
+%if 0%{?_build_mpc}
+%setup -q -T -D -n %{name}-%{version} -a61
+%{?PATCH61:%patch61 -p1}
+  # Build mpc one-tree style
+  ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
+%endif
+
+%if 0%{?_build_gmp}
+%setup -q -T -D -n %{name}-%{version} -a62
+%{?PATCH62:%patch62 -p1}
+  # Build gmp one-tree style
+  ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
+%endif
+
+%if 0%{?_build_libelf}
+%setup -q -T -D -n %{name}-%{version} -a63
+%{?PATCH63:%patch63 -p1}
+  # Build libelf one-tree style
+  ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
+%endif
+
+
+  # Fix timestamps
+  cd gcc-%{gcc_pkgvers}
+  contrib/gcc_update --touch
+  cd ..
+%build
+  mkdir -p build
+
+  cd build
+
+  languages="c"
+  languages="$languages,c++"
+  case i386-pc-netbsdelf5.1 in
+  *-rtems4.11) optargs="$optargs --enable-libstdcxx-time";;
+  esac
+  languages="$languages,fortran"
+  languages="$languages,objc"
+%if "%{_build}" != "%{_host}"
+  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
+  CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
+%else
+# gcc is not ready to be compiled with -std=gnu99
+  CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
+%endif
+  ../gcc-%{gcc_pkgvers}/configure \
+    --prefix=%{_prefix} \
+    --bindir=%{_bindir} \
+    --exec_prefix=%{_exec_prefix} \
+    --includedir=%{_includedir} \
+    --libdir=%{_gcclibdir} \
+    --libexecdir=%{_libexecdir} \
+    --mandir=%{_mandir} \
+    --infodir=%{_infodir} \
+    --datadir=%{_datadir} \
+    --build=%_build --host=%_host \
+    --target=i386-pc-netbsdelf5.1 \
+    --disable-libstdcxx-pch \
+    --with-gnu-as --with-gnu-ld --verbose \
+    --with-system-zlib \
+    --disable-nls --without-included-gettext \
+    --disable-win32-registry \
+    --enable-version-specific-runtime-libs \
+    --enable-threads \
+    --with-sysroot=%{_exec_prefix}/i386-pc-netbsdelf5.1/sys-root \
+    %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
+    %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
+    --enable-languages="$languages" $optargs
+
+%if "%_host" != "%_build"
+  # Bug in gcc-3.2.1:
+  # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
+  mkdir -p gcc/include
+  cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
+%endif
+
+  make %{?_smp_mflags} all
+  cd ..
+
+%install
+  rm -rf $RPM_BUILD_ROOT
+
+  cd build
+
+  make DESTDIR=$RPM_BUILD_ROOT install
+  cd ..
+
+
+%if "%{gcc_version}" <= "4.1.2"
+# Misplaced header file
+  if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
+    mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
+      $RPM_BUILD_ROOT%{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}/include/
+  fi
+%endif
+
+  # host library
+%if "%{gcc_version}" >= "4.2.0"
+  # libiberty doesn't honor --libdir, but always installs to a 
+  # magically guessed _libdir
+  rm -f  ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
+%else
+  # libiberty installs to --libdir=...
+  rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
+%endif
+
+  # We use the version from binutils
+  rm -f $RPM_BUILD_ROOT%{_bindir}/i386-pc-netbsdelf5.1-c++filt%{_exeext}
+
+
+# Conflict with a native GCC's infos
+  rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+# Conflict with a native GCC's man pages
+  rm -rf $RPM_BUILD_ROOT%{_mandir}/man7
+
+  # Bug in gcc-3.4.0pre
+  rm -f $RPM_BUILD_ROOT%{_bindir}/i386-pc-netbsdelf5.1-i386-pc-netbsdelf5.1-gcjh%{_exeext}
+
+  # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
+  # the fixinclude-install-tools
+  rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}/install-tools
+  rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}/install-tools
+
+  # Bug in gcc > 4.1.0: Installs an unused, empty directory
+  if test -d ${RPM_BUILD_ROOT}%{_prefix}/i386-pc-netbsdelf5.1/include/bits; then
+    rmdir ${RPM_BUILD_ROOT}%{_prefix}/i386-pc-netbsdelf5.1/include/bits
+  fi
+
+  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
+%if ! %{with pygdb}
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
+  fi
+%endif
+
+  # Collect multilib subdirectories
+  multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
+
+
+  rm -f dirs ;
+  echo "%defattr(-,root,root,-)" >> dirs
+  TGTDIR="%{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}"
+  for i in $multilibs; do
+    case $i in
+    \.) ;; # ignore, handled elsewhere
+    *)  echo "%dir ${TGTDIR}/$i" >> dirs
+      ;;
+    esac
+  done
+
+  # Collect files to go into different packages
+  cp dirs build/files.gcc
+  cp dirs build/files.gfortran
+  cp dirs build/files.objc
+  cp dirs build/files.gcj
+  cp dirs build/files.g++
+
+  TGTDIR="%{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}"
+  f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
+  for i in $f; do
+    case $i in
+    *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
+    *f771) ;;
+    *f951) ;;
+    *cc1) ;;
+    *cc1obj) ;;
+    *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
+    *collect2) ;;
+    *libobjc*) echo "$i" >> build/files.objc ;;
+    *include/objc*) ;;
+    *include/g++*);;
+    *include/c++*);;
+    *include-fixed/*);;
+    *finclude/*);;
+    *adainclude*);;
+    *adalib*);;
+    *gnat1);;
+    *jc1) ;;
+    *jvgenmain) ;;
+    */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
+    %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
+    %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
+    */libstdc++.*) echo "$i" >> build/files.g++ ;;
+    */libsupc++.*) echo "$i" >> build/files.g++ ;;
+    *) echo "$i" >> build/files.gcc ;;
+    esac
+  done
+
+  TGTDIR="%{_exec_prefix}/i386-pc-netbsdelf5.1/lib"
+  f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
+  for i in $f; do
+    case $i in
+    *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
+    *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
+# all other files belong to newlib
+    *) echo "$i" >> build/files.newlib ;; 
+    esac
+  done
+# Extract %%__os_install_post into os_install_post~
+cat << \EOF > os_install_post~
+%__os_install_post
+EOF
+
+# Generate customized brp-*scripts
+cat os_install_post~ | while read a x y; do
+case $a in
+# Prevent brp-strip* from trying to handle foreign binaries
+*/brp-strip*)
+  b=$(basename $a)
+  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
+  chmod a+x $b
+  ;;
+esac
+done
+
+sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
+< os_install_post~ > os_install_post 
+%define __os_install_post . ./os_install_post
+
+
+cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
+#!/bin/sh
+grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/i386-pc-netbsdelf5.1/(lib|include|sys-root)' \
+  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/'} | %__find_provides
+EOF
+chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
+%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
+
+cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
+#!/bin/sh
+grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/i386-pc-netbsdelf5.1/(lib|include|sys-root)' \
+  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/'} | %__find_requires
+EOF
+chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
+%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
+
+%ifnarch noarch
+# Extract %%__debug_install_post into debug_install_post~
+cat << \EOF > debug_install_post~
+%__debug_install_post
+EOF
+
+# Generate customized debug_install_post script
+cat debug_install_post~ | while read a x y; do
+case $a in
+# Prevent find-debuginfo.sh* from trying to handle foreign binaries
+*/find-debuginfo.sh)
+  b=$(basename $a)
+  sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
+  chmod a+x $b
+  ;;
+esac
+done
+
+sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
+< debug_install_post~ > debug_install_post 
+%define __debug_install_post . ./debug_install_post
+
+%endif
+
+%clean
+  rm -rf $RPM_BUILD_ROOT
+
+# ==============================================================
+# i386-pc-netbsdelf5.1-gcc
+# ==============================================================
+# %package -n i386-pc-netbsdelf5.1-gcc
+# Summary:        GNU cc compiler for i386-pc-netbsdelf5.1
+# Group:          Development/Tools
+# Version:        %{gcc_rpmvers}
+# Requires:       i386-pc-netbsdelf5.1-binutils
+# License:	GPL
+
+# %if %build_infos
+# Requires:      gcc-common
+# %endif
+
+%description -n i386-pc-netbsdelf5.1-gcc
+GNU cc compiler for i386-pc-netbsdelf5.1.
+
+# ==============================================================
+# i386-pc-netbsdelf5.1-gcc-libgcc
+# ==============================================================
+%package -n i386-pc-netbsdelf5.1-gcc-libgcc
+Summary:        libgcc for i386-pc-netbsdelf5.1-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	GPL
+
+%description -n i386-pc-netbsdelf5.1-gcc-libgcc
+libgcc i386-pc-netbsdelf5.1-gcc.
+
+
+%files -n i386-pc-netbsdelf5.1-gcc
+%defattr(-,root,root)
+
+%{_mandir}/man1/i386-pc-netbsdelf5.1-gcc.1*
+%{_mandir}/man1/i386-pc-netbsdelf5.1-cpp.1*
+%{_mandir}/man1/i386-pc-netbsdelf5.1-gcov.1*
+
+%{_bindir}/i386-pc-netbsdelf5.1-cpp%{_exeext}
+%{_bindir}/i386-pc-netbsdelf5.1-gcc%{_exeext}
+%{_bindir}/i386-pc-netbsdelf5.1-gcc-%{gcc_version}%{_exeext}
+%{_bindir}/i386-pc-netbsdelf5.1-gcov%{_exeext}
+%{_bindir}/i386-pc-netbsdelf5.1-gccbug
+
+%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/i386-pc-netbsdelf5.1
+%dir %{_libexecdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}
+%{_libexecdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}/cc1%{_exeext}
+%{_libexecdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}/collect2%{_exeext}
+%if "%{gcc_version}" >= "4.5.0"
+%{?with_lto:%{_libexecdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}/lto%{_exeext}}
+%{_libexecdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}/lto-wrapper%{_exeext}
+%endif
+
+%files -n i386-pc-netbsdelf5.1-gcc-libgcc -f build/files.gcc
+%defattr(-,root,root)
+%dir %{_gcclibdir}/gcc
+%dir %{_gcclibdir}/gcc/i386-pc-netbsdelf5.1
+%dir %{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}
+%dir %{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}/include
+
+%if "%{gcc_version}" > "4.0.3"
+%dir %{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}/include/ssp
+%endif
+
+%if "%{gcc_version}" >= "4.3.0"
+%{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}/include-fixed
+%endif
+
+# ==============================================================
+# i386-pc-netbsdelf5.1-gcc-c++
+# ==============================================================
+%package -n i386-pc-netbsdelf5.1-gcc-c++
+Summary:	GCC c++ compiler for i386-pc-netbsdelf5.1
+Group:		Development/Tools
+Version:        %{gcc_rpmvers}
+License:	GPL
+Requires:       i386-pc-netbsdelf5.1-gcc-libstdc++ = %{gcc_rpmvers}-%{release}
+
+%if "%{_build}" != "%{_host}"
+BuildRequires:  i386-pc-netbsdelf5.1-gcc-c++ = %{gcc_rpmvers}
+%endif
+
+Requires:       i386-pc-netbsdelf5.1-gcc = %{gcc_rpmvers}-%{release}
+
+%description -n i386-pc-netbsdelf5.1-gcc-c++
+GCC c++ compiler for i386-pc-netbsdelf5.1.
+
+
+%package -n i386-pc-netbsdelf5.1-gcc-libstdc++
+Summary:	libstdc++ for i386-pc-netbsdelf5.1
+Group:		Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	GPL
+
+%description -n i386-pc-netbsdelf5.1-gcc-libstdc++
+%{summary}
+
+
+%files -n i386-pc-netbsdelf5.1-gcc-c++
+%defattr(-,root,root)
+
+%{_mandir}/man1/i386-pc-netbsdelf5.1-g++.1*
+
+%{_bindir}/i386-pc-netbsdelf5.1-c++%{_exeext}
+%{_bindir}/i386-pc-netbsdelf5.1-g++%{_exeext}
+
+%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/i386-pc-netbsdelf5.1
+%dir %{_libexecdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}
+%{_libexecdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}/cc1plus%{_exeext}
+
+
+%files -n i386-pc-netbsdelf5.1-gcc-libstdc++ -f build/files.g++
+%defattr(-,root,root)
+%dir %{_gcclibdir}/gcc
+%dir %{_gcclibdir}/gcc/i386-pc-netbsdelf5.1
+%dir %{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}
+%dir %{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}/include
+%{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}/include/c++
+
+# ==============================================================
+# i386-pc-netbsdelf5.1-gcc-gfortran
+# ==============================================================
+%package -n i386-pc-netbsdelf5.1-gcc-gfortran
+Summary:	Fortran 95 support for i386-pc-netbsdelf5.1-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+License:	GPL
+
+Requires:       i386-pc-netbsdelf5.1-gcc = %{gcc_rpmvers}-%{release}
+Requires:       i386-pc-netbsdelf5.1-gcc-libgfortran = %{gcc_rpmvers}-%{release}
+
+%description -n i386-pc-netbsdelf5.1-gcc-gfortran
+GCC fortran compiler for i386-pc-netbsdelf5.1.
+
+%files -n i386-pc-netbsdelf5.1-gcc-gfortran
+%defattr(-,root,root)
+%{_bindir}/i386-pc-netbsdelf5.1-gfortran%{_exeext}
+
+%{_mandir}/man1/i386-pc-netbsdelf5.1-gfortran.1*
+
+%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/i386-pc-netbsdelf5.1
+%dir %{_libexecdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}
+%{_libexecdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}/f951%{_exeext}
+
+# ==============================================================
+# i386-pc-netbsdelf5.1-gcc-libgfortran
+# ==============================================================
+%package -n i386-pc-netbsdelf5.1-gcc-libgfortran
+Summary:	Fortran 95 support libraries for i386-pc-netbsdelf5.1-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	GPL
+
+%description -n i386-pc-netbsdelf5.1-gcc-libgfortran
+%{summary}
+
+%files -n i386-pc-netbsdelf5.1-gcc-libgfortran -f build/files.gfortran
+%defattr(-,root,root)
+%dir %{_gcclibdir}/gcc
+%dir %{_gcclibdir}/gcc/i386-pc-netbsdelf5.1
+%dir %{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}
+%if "%{gcc_version}" >= "4.2.0"
+%{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}/finclude
+%endif
+
+# ==============================================================
+# i386-pc-netbsdelf5.1-gcc-objc
+# ==============================================================
+%package -n i386-pc-netbsdelf5.1-gcc-objc
+Summary:        Objective C support for i386-pc-netbsdelf5.1-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+License:	GPL
+
+Requires:       i386-pc-netbsdelf5.1-gcc = %{gcc_rpmvers}-%{release}
+Requires:       i386-pc-netbsdelf5.1-gcc-libobjc = %{gcc_rpmvers}-%{release}
+
+%description -n i386-pc-netbsdelf5.1-gcc-objc
+GCC objc compiler for i386-pc-netbsdelf5.1.
+
+%files -n i386-pc-netbsdelf5.1-gcc-objc
+%defattr(-,root,root)
+%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/i386-pc-netbsdelf5.1
+%dir %{_libexecdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}
+%{_libexecdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}/cc1obj%{_exeext}
+
+# ==============================================================
+# i386-pc-netbsdelf5.1-gcc-libobjc
+# ==============================================================
+%package -n i386-pc-netbsdelf5.1-gcc-libobjc
+Summary:        Objective C support for i386-pc-netbsdelf5.1-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	GPL
+
+%description -n i386-pc-netbsdelf5.1-gcc-libobjc
+Support libraries for GCC's objc compiler for i386-pc-netbsdelf5.1.
+
+%files -n i386-pc-netbsdelf5.1-gcc-libobjc -f build/files.objc
+%defattr(-,root,root)
+%dir %{_gcclibdir}/gcc
+%dir %{_gcclibdir}/gcc/i386-pc-netbsdelf5.1
+%dir %{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}
+%dir %{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}/include
+%{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/%{gcc_version}/include/objc
+

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/i386/i386-pc-netbsdelf5.1-libs.spec:1.1
--- /dev/null	Mon Mar 21 08:11:53 2011
+++ rtems/contrib/crossrpms/netbsd5.1/i386/i386-pc-netbsdelf5.1-libs.spec	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,163 @@
+#
+# Please send bugfixes or comments to
+# 	http://www.rtems.org/bugzilla
+#
+
+
+%ifos cygwin cygwin32 mingw mingw32
+%define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
+%else
+%define _exeext %{nil}
+%endif
+
+%ifos cygwin cygwin32
+%define optflags -O3 -pipe -march=i486 -funroll-loops
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
+%endif
+
+%if "%{_build}" != "%{_host}"
+%define _host_rpmprefix %{_host}-
+%else
+%define _host_rpmprefix %{nil}
+%endif
+
+%define netbsd_version 5.1
+%define netbsd_rpmvers %{expand:%(echo 5.1 | tr - _)}
+
+%define _use_internal_dependency_generator 0
+%define __debug_install_post %{nil}
+
+Name:		i386-pc-netbsdelf5.1
+Release:	0.20110320.0%{?dist}
+License:	NetBSD
+Group:		Development/Tools
+
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:	noarch
+
+Version:      	%netbsd_rpmvers
+Summary:      	i386-pc-netbsdelf5.1 Libraries
+
+Source0:	ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-5.0.2/i386/binary/sets/base.tgz
+Source1:	ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-5.0.2/i386/binary/sets/comp.tgz
+
+%description
+i386-pc-netbsdelf5.1 libraries.
+
+%prep
+%setup -q -c -T -n %{name}-%{version} -a 0 -a 1
+
+%build
+  # Setup sys-root (Usable for gcc >= 3.4)
+  mkdir -p i386-pc-netbsdelf5.1/sys-root
+  %{__tar} cf - lib usr/lib usr/include | ( cd i386-pc-netbsdelf5.1/sys-root ; %{__tar} xf -)
+
+  pushd i386-pc-netbsdelf5.1/sys-root/usr/lib > /dev/null
+  # missing files
+  rm -f lib*_p.*
+  # not needed
+  rm -rf aout compat
+
+  # Fix up symlinks
+  find -type l -exec ls -l {} \; | \
+    while read a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aA ; do \
+    case $aA in
+    /lib* ) # link
+       rm $a8;
+       b=`basename $aA`
+       ln -s ../../lib/$b $a8
+       ;;
+    esac
+  done
+  popd > /dev/null
+
+%install
+  rm -rf $RPM_BUILD_ROOT
+  mkdir -p $RPM_BUILD_ROOT%{_prefix}
+  cp -a i386-pc-netbsdelf5.1 $RPM_BUILD_ROOT%{_prefix}
+
+# Extract %%__os_install_post into os_install_post~
+cat << \EOF > os_install_post~
+%__os_install_post
+EOF
+
+# Generate customized brp-*scripts
+cat os_install_post~ | while read a x y; do
+case $a in
+# Prevent brp-strip* from trying to handle foreign binaries
+*/brp-strip*)
+  b=$(basename $a)
+  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
+  chmod a+x $b
+  ;;
+esac
+done
+
+sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
+< os_install_post~ > os_install_post 
+%define __os_install_post . ./os_install_post
+
+
+cat << EOF > %{_builddir}/%{name}-%{netbsd_rpmvers}/find-provides
+#!/bin/sh
+grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/i386-pc-netbsdelf5.1/(lib|include|sys-root)' \
+  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/'} | %__find_provides
+EOF
+chmod +x %{_builddir}/%{name}-%{netbsd_rpmvers}/find-provides
+%define __find_provides %{_builddir}/%{name}-%{netbsd_rpmvers}/find-provides
+
+cat << EOF > %{_builddir}/%{name}-%{netbsd_rpmvers}/find-requires
+#!/bin/sh
+grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/i386-pc-netbsdelf5.1/(lib|include|sys-root)' \
+  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/i386-pc-netbsdelf5.1/'} | %__find_requires
+EOF
+chmod +x %{_builddir}/%{name}-%{netbsd_rpmvers}/find-requires
+%define __find_requires %{_builddir}/%{name}-%{netbsd_rpmvers}/find-requires
+
+%ifnarch noarch
+# Extract %%__debug_install_post into debug_install_post~
+cat << \EOF > debug_install_post~
+%__debug_install_post
+EOF
+
+# Generate customized debug_install_post script
+cat debug_install_post~ | while read a x y; do
+case $a in
+# Prevent find-debuginfo.sh* from trying to handle foreign binaries
+*/find-debuginfo.sh)
+  b=$(basename $a)
+  sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
+  chmod a+x $b
+  ;;
+esac
+done
+
+sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
+< debug_install_post~ > debug_install_post 
+%define __debug_install_post . ./debug_install_post
+
+%endif
+
+%clean
+  rm -rf $RPM_BUILD_ROOT
+
+%package sys-root
+Group: Development/Tools
+Summary: i386-pc-netbsdelf5.1 target files for gcc >= 3.4
+
+%description sys-root
+i386-pc-netbsdelf5.1 target files for gcc >= 3.4
+
+%files sys-root
+%defattr(-,root,root,-)
+%dir %{_prefix}/i386-pc-netbsdelf5.1
+%{_prefix}/i386-pc-netbsdelf5.1/sys-root

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/i386/libs.add:1.1
--- /dev/null	Mon Mar 21 08:11:53 2011
+++ rtems/contrib/crossrpms/netbsd5.1/i386/libs.add	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,55 @@
+%define netbsd_version @NETBSD_VERS@
+%define netbsd_rpmvers %{expand:%(echo @NETBSD_VERS@ | tr - _)}
+
+%define _use_internal_dependency_generator 0
+%define __debug_install_post %{nil}
+
+Name:		@rpmprefix@@tool_target@
+Release:	@NETBSD_RPMREL@
+License:	NetBSD
+Group:		Development/Tools
+
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:	noarch
+
+Version:      	%netbsd_rpmvers
+Summary:      	@tool_target@ Libraries
+
+Source0:	ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-5.0.2/i386/binary/sets/base.tgz
+Source1:	ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-5.0.2/i386/binary/sets/comp.tgz
+
+%description
+ at tool_target@ libraries.
+
+%prep
+%setup -q -c -T -n %{name}-%{version} -a 0 -a 1
+
+%build
+  # Setup sys-root (Usable for gcc >= 3.4)
+  mkdir -p @tool_target@/sys-root
+  %{__tar} cf - lib usr/lib usr/include | ( cd @tool_target@/sys-root ; %{__tar} xf -)
+
+  pushd @tool_target@/sys-root/usr/lib > /dev/null
+  # missing files
+  rm -f lib*_p.*
+  # not needed
+  rm -rf aout compat
+
+  # Fix up symlinks
+  find -type l -exec ls -l {} \; | \
+    while read a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aA ; do \
+    case $aA in
+    /lib* ) # link
+       rm $a8;
+       b=`basename $aA`
+       ln -s ../../lib/$b $a8
+       ;;
+    esac
+  done
+  popd > /dev/null
+
+%install
+  rm -rf $RPM_BUILD_ROOT
+  mkdir -p $RPM_BUILD_ROOT%{_prefix}
+  cp -a @tool_target@ $RPM_BUILD_ROOT%{_prefix}
+

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/i386/target-libs.add:1.1
--- /dev/null	Mon Mar 21 08:11:53 2011
+++ rtems/contrib/crossrpms/netbsd5.1/i386/target-libs.add	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,11 @@
+%package sys-root
+Group: Development/Tools
+Summary: @tool_target@ target files for gcc >= 3.4
+
+%description sys-root
+ at tool_target@ target files for gcc >= 3.4
+
+%files sys-root
+%defattr(-,root,root,-)
+%dir %{_prefix}/@tool_target@
+%{_prefix}/@tool_target@/sys-root

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/libs.am:1.1
--- /dev/null	Mon Mar 21 08:11:53 2011
+++ rtems/contrib/crossrpms/netbsd5.1/libs.am	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,18 @@
+LIBS_SUBPACKAGES = $(top_srcdir)/common/common.add
+LIBS_SUBPACKAGES += $(srcdir)/libs.add
+LIBS_SUBPACKAGES += $(top_srcdir)/gcc/rpm-install.add
+LIBS_SUBPACKAGES += $(top_srcdir)/common/clean.add
+LIBS_SUBPACKAGES += $(srcdir)/target-libs.add
+
+$(TARGET)-libs.spec.in: $(LIBS_SUBPACKAGES) Makefile.am
+	cat $(LIBS_SUBPACKAGES) | sed \
+	  -e "s/[@]NETBSD_VERS[@]/$(NETBSD_VERS)/g" \
+	  -e "s/[@]NETBSD_RPMREL[@]/$(NETBSD_RPMREL)%{?dist}/g" \
+	  -e "s,%{gcc_rpmvers},%{netbsd_rpmvers},g" \
+	> $(TARGET)-libs.spec.in
+CLEANFILES += $(TARGET)-libs.spec.in
+	                      
+ at rpmprefix@$(TARGET)-libs.spec: $(TARGET)-libs.spec.in $(srcdir)/../libs.am
+	$(MKSPEC) $(TARGET)-libs.spec.in | $(SPECSTRIP) > $@
+CLEANFILES += @rpmprefix@$(TARGET)-libs.spec
+noinst_DATA += @rpmprefix@$(TARGET)-libs.spec

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/x86_64/.cvsignore:1.1
--- /dev/null	Mon Mar 21 08:11:53 2011
+++ rtems/contrib/crossrpms/netbsd5.1/x86_64/.cvsignore	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,4 @@
+Makefile
+Makefile.in
+rtems*.spec
+*.spec.in

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/x86_64/Makefile.am:1.1
--- /dev/null	Mon Mar 21 08:11:54 2011
+++ rtems/contrib/crossrpms/netbsd5.1/x86_64/Makefile.am	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,23 @@
+# $Id$
+
+TARGET = amd64-pc-netbsdelf5.1
+
+include $(top_srcdir)/mkspec.am
+
+NETBSD_VERS = 5.1
+NETBSD_RPMREL = 0.20110320.0
+EXTRA_DIST += libs.add
+EXTRA_DIST += target-libs.add
+include ../libs.am
+
+BINUTILS_VERS = 2.21
+BINUTILS_PKGVERS = $(BINUTILS_VERS)
+BINUTILS_RPMREL = 0.20110320.0
+include ../binutils.am
+BINUTILS_OPTS +=
+
+GCC_VERS = 4.5.0
+GCC_PKGVERS = $(GCC_VERS)
+GCC_RPMREL = 0.20110320.0
+include ../gcc.am
+GCC_OPTS += --languages=c,cxx,fortran,objc

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/x86_64/amd64-pc-netbsdelf5.1-binutils.spec:1.1
--- /dev/null	Mon Mar 21 08:11:54 2011
+++ rtems/contrib/crossrpms/netbsd5.1/x86_64/amd64-pc-netbsdelf5.1-binutils.spec	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,170 @@
+#
+# Please send bugfixes or comments to
+# 	http://www.rtems.org/bugzilla
+#
+
+
+%ifos cygwin cygwin32 mingw mingw32
+%define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
+%else
+%define _exeext %{nil}
+%endif
+
+%ifos cygwin cygwin32
+%define optflags -O3 -pipe -march=i486 -funroll-loops
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
+%endif
+
+%if "%{_build}" != "%{_host}"
+%define _host_rpmprefix %{_host}-
+%else
+%define _host_rpmprefix %{nil}
+%endif
+
+%define binutils_pkgvers 2.21
+%define binutils_version 2.21
+%define binutils_rpmvers %{expand:%(echo "2.21" | tr - _ )}
+
+Name:		amd64-pc-netbsdelf5.1-binutils
+Summary:	Binutils for target amd64-pc-netbsdelf5.1
+Group:		Development/Tools
+Version:	%{binutils_rpmvers}
+Release:	0.20110320.0%{?dist}
+License:	GPL/LGPL
+URL: 		http://sources.redhat.com/binutils
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires:	%{_host_rpmprefix}gcc
+
+%if "%{binutils_version}" >= "2.18"
+# Bug in bfd: Doesn't build without texinfo installed
+BuildRequires:	texinfo >= 4.2
+%else
+%endif
+BuildRequires:	flex
+BuildRequires:	bison
+
+Source0: http://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
+
+%description
+Cross binutils for target amd64-pc-netbsdelf5.1
+%prep
+%setup -q -c -T -n %{name}-%{version}
+
+%setup -q -D -T -n %{name}-%{version} -a0
+cd binutils-%{binutils_pkgvers}
+%{?PATCH0:%patch0 -p1}
+cd ..
+
+%build
+  mkdir -p build
+  cd build
+%if "%{_build}" != "%{_host}"
+  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
+%endif
+  CFLAGS="$RPM_OPT_FLAGS" \
+  ../binutils-%{binutils_pkgvers}/configure \
+    --build=%_build --host=%_host \
+    --target=amd64-pc-netbsdelf5.1 \
+    --verbose --disable-nls \
+    --without-included-gettext \
+    --disable-win32-registry \
+    --disable-werror \
+    --with-sysroot=%{_prefix}/amd64-pc-netbsdelf5.1/sys-root \
+    --prefix=%{_prefix} --bindir=%{_bindir} \
+    --exec-prefix=%{_exec_prefix} \
+    --includedir=%{_includedir} --libdir=%{_libdir} \
+    --mandir=%{_mandir} --infodir=%{_infodir}
+
+  make %{?_smp_mflags} all
+  cd ..
+
+%install
+  rm -rf $RPM_BUILD_ROOT
+
+  cd build
+  make DESTDIR=$RPM_BUILD_ROOT install
+
+
+# Conflict with a native binutils' infos
+  rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+# We don't ship host files
+  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
+
+# manpages without corresponding tools
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/amd64-pc-netbsdelf5.1-dlltool%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/amd64-pc-netbsdelf5.1-dlltool*
+  fi
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/amd64-pc-netbsdelf5.1-nlmconv%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/amd64-pc-netbsdelf5.1-nlmconv*
+  fi
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/amd64-pc-netbsdelf5.1-windres%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/amd64-pc-netbsdelf5.1-windres*
+  fi
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/amd64-pc-netbsdelf5.1-windmc%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/amd64-pc-netbsdelf5.1-windmc*
+  fi
+
+  cd ..
+
+# Extract %%__os_install_post into os_install_post~
+cat << \EOF > os_install_post~
+%__os_install_post
+EOF
+
+# Generate customized brp-*scripts
+cat os_install_post~ | while read a x y; do
+case $a in
+# Prevent brp-strip* from trying to handle foreign binaries
+*/brp-strip*)
+  b=$(basename $a)
+  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
+  chmod a+x $b
+  ;;
+esac
+done
+
+sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
+< os_install_post~ > os_install_post 
+%define __os_install_post . ./os_install_post
+
+%clean
+  rm -rf $RPM_BUILD_ROOT
+
+# ==============================================================
+# amd64-pc-netbsdelf5.1-binutils
+# ==============================================================
+# %package -n amd64-pc-netbsdelf5.1-binutils
+# Summary:      rtems binutils for amd64-pc-netbsdelf5.1
+# Group: Development/Tools
+# %if %build_infos
+# Requires: binutils-common
+# %endif
+
+%description -n amd64-pc-netbsdelf5.1-binutils
+GNU binutils targetting amd64-pc-netbsdelf5.1.
+
+%files -n amd64-pc-netbsdelf5.1-binutils
+%defattr(-,root,root)
+
+%{_mandir}/man1/amd64-pc-netbsdelf5.1-*.1*
+
+%{_bindir}/amd64-pc-netbsdelf5.1-*
+
+%dir %{_exec_prefix}/amd64-pc-netbsdelf5.1
+%dir %{_exec_prefix}/amd64-pc-netbsdelf5.1/bin
+%{_exec_prefix}/amd64-pc-netbsdelf5.1/bin/*
+
+%dir %{_exec_prefix}/amd64-pc-netbsdelf5.1/lib
+%{_exec_prefix}/amd64-pc-netbsdelf5.1/lib/ldscripts
+

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/x86_64/amd64-pc-netbsdelf5.1-gcc.spec:1.1
--- /dev/null	Mon Mar 21 08:11:54 2011
+++ rtems/contrib/crossrpms/netbsd5.1/x86_64/amd64-pc-netbsdelf5.1-gcc.spec	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,788 @@
+#
+# Please send bugfixes or comments to
+# 	http://www.rtems.org/bugzilla
+#
+
+
+%ifos cygwin cygwin32 mingw mingw32
+%define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
+%else
+%define _exeext %{nil}
+%endif
+
+%ifos cygwin cygwin32
+%define optflags -O3 -pipe -march=i486 -funroll-loops
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
+%endif
+
+%if "%{_build}" != "%{_host}"
+%define _host_rpmprefix %{_host}-
+%else
+%define _host_rpmprefix %{nil}
+%endif
+
+
+%define gcc_pkgvers 4.5.0
+%define gcc_version 4.5.0
+%define gcc_rpmvers %{expand:%(echo "4.5.0" | tr - _ )}
+
+
+Name:         	amd64-pc-netbsdelf5.1-gcc
+Summary:      	amd64-pc-netbsdelf5.1 gcc
+
+Group:	      	Development/Tools
+Version:        %{gcc_rpmvers}
+Release:      	0.20110320.0%{?dist}
+License:      	GPL
+URL:		http://gcc.gnu.org
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+%define _use_internal_dependency_generator 0
+
+BuildRequires:  %{_host_rpmprefix}gcc
+
+# FIXME: Disable lto for now, to avoid dependencies on libelf
+%bcond_with lto
+
+# FIXME: Disable python gdb scripts
+# ATM, no idea how to package them
+%bcond_with pygdb
+
+# FIXME: Disable GCC-plugin
+# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
+%bcond_with plugin
+
+# EXPERIMENTAL: Use gcc's stdint.h instead of newlib's
+# Should be applicable to gcc >= 4.5.0
+%bcond_with gcc_stdint
+
+# versions of libraries, we conditionally bundle if necessary
+%global mpc_version	0.8.1
+%global mpfr_version	2.4.2
+%global gmp_version	4.3.2
+%global libelf_version  0.8.13
+
+# versions of libraries these distros are known to ship
+%if 0%{?fc15}
+%global mpc_provided 0.8.3
+%global mpfr_provided 3.0.0
+%global gmp_provided 4.3.2
+%endif
+
+%if 0%{?fc14}
+%global mpc_provided 0.8.1
+%global mpfr_provided 2.4.2
+%global gmp_provided 4.3.1
+%endif
+
+%if 0%{?fc13}
+%global mpc_provided 0.8.1
+%global mpfr_provided 2.4.2
+%global gmp_provided 4.3.1
+%endif
+
+%if 0%{?el6}
+%global mpc_provided %{nil}
+%global mpfr_provided 2.4.1
+%global gmp_provided 4.3.1
+%endif
+
+%if 0%{?el5}
+%global mpc_provided %{nil}
+%global mpfr_provided %{nil}
+%global gmp_provided 4.1.4
+%endif
+
+%if 0%{?suse11_2}
+%global mpc_provided 0.7
+%global mpfr_provided 2.4.1
+%global gmp_provided 4.3.1
+%endif
+
+%if 0%{?suse11_3}
+%global mpc_provided 0.8.1
+%global mpfr_provided 2.4.2
+%global gmp_provided 4.3.2
+%endif
+
+%if 0%{?suse11_4}
+%global mpc_provided 0.8.2
+%global mpfr_provided 3.0.0
+%global gmp_provided 5.0.1
+%endif
+
+%if 0%{?cygwin}
+%global mpc_provided 0.8
+%global mpfr_provided 2.4.1
+%global gmp_provided 4.3.1
+%endif
+
+%if 0%{?mingw32}
+%global mpc_provided 0.8.1
+%global mpfr_provided 2.4.1
+%global gmp_provided 4.3.2
+%endif
+
+%if "%{gcc_version}" >= "4.2.0"
+%define gmp_required		4.1
+%define mpfr_required		2.2.1
+%endif
+
+%if "%{gcc_version}" >= "4.3.0"
+%define gmp_required		4.1
+%define mpfr_required		2.3.1
+%endif
+
+%if "%{gcc_version}" >= "4.3.3"
+%define cloog_required 		0.15
+%endif
+
+%if "%{gcc_version}" >= "4.4.0"
+%define mpfr_required		2.3.2
+%endif
+
+%if "%{gcc_version}" >= "4.5.0"
+%define mpc_required 		0.8
+%if %{with lto}
+%define libelf_required 	0.8.12
+%endif
+%endif
+
+%if %{defined mpc_required}
+%if "%{mpc_provided}" >= "%{mpc_required}"
+%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
+%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
+%if "%{_build}" != "%{_host}"
+BuildRequires:  %{_host_rpmprefix}mpc-devel >= %{mpc_required}
+%endif
+%else
+%define _build_mpc 1
+%define gmp_required 		4.2
+%endif
+%endif
+
+%if %{defined gmp_required}
+%if "%{gmp_provided}" >= "%{gmp_required}"
+BuildRequires: gmp-devel >= %{gmp_required}
+%if "%{_build}" != "%{_host}"
+BuildRequires:  %{_host_rpmprefix}gmp-devel >= %{gmp_required}
+%endif
+%else
+%define _build_gmp 1
+%endif
+%endif
+
+%if %{defined libelf_required}
+%if "%{libelf_provided}" >= "%{libelf_required}"
+BuildRequires: libelf-devel >= %{libelf_required}
+%if "%{_build}" != "%{_host}"
+BuildRequires:  %{_host_rpmprefix}libelf-devel >= %{libelf_required}
+%endif
+%else
+%define _build_libelf 1
+%endif
+%endif
+
+
+%if %{defined cloog_required}
+%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
+%{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
+%{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
+%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
+%{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
+%{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
+%{?suse11_2:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
+%endif
+
+
+%if %{defined mpfr_required}
+%if "%{mpfr_provided}" >= "%{mpfr_required}"
+BuildRequires: mpfr-devel >= %{mpfr_required}
+%if "%{_build}" != "%{_host}"
+BuildRequires:  %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
+%endif
+%else
+%define _build_mpfr 1
+%endif
+%endif
+
+%if "%{_build}" != "%{_host}"
+BuildRequires:  amd64-pc-netbsdelf5.1-gcc = %{gcc_rpmvers}
+%endif
+
+%if "%{gcc_version}" >= "4.2.0"
+BuildRequires:	flex bison
+%endif
+
+
+BuildRequires:	texinfo >= 4.2
+BuildRequires:	amd64-pc-netbsdelf5.1-binutils
+BuildRequires:	amd64-pc-netbsdelf5.1-sys-root
+
+Requires:	amd64-pc-netbsdelf5.1-binutils
+Requires:	amd64-pc-netbsdelf5.1-sys-root
+Requires:	amd64-pc-netbsdelf5.1-gcc-libgcc = %{gcc_rpmvers}-%{release}
+
+%if "%{gcc_version}" >= "4.5.0"
+BuildRequires:  zlib-devel
+%if "%{_build}" != "%{_host}"
+BuildRequires:  %{_host_rpmprefix}zlib-devel
+%endif
+%else
+%endif
+
+%global _gcclibdir %{_prefix}/lib
+
+Source0: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.0"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
+%endif
+%{?_without_sources:NoSource:	0}
+
+Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+%{?_without_sources:NoSource:	1}
+
+Source2:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
+%{?_without_sources:NoSource:	2}
+
+Source5:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-objc-%{gcc_pkgvers}.tar.bz2
+%{?_without_sources:NoSource:	5}
+
+%if 0%{?_build_mpfr}
+Source60:    http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
+%endif
+
+%if 0%{?_build_mpc}
+Source61:    http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
+%endif
+
+%if 0%{?_build_gmp}
+Source62:    ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
+%endif
+
+%if 0%{?_build_libelf}
+Source63:    http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
+%endif
+
+%description
+Cross gcc for amd64-pc-netbsdelf5.1.
+
+%prep
+%setup -c -T -n %{name}-%{version}
+
+%setup -q -T -D -n %{name}-%{version} -a0
+cd gcc-%{gcc_pkgvers}
+%{?PATCH0:%patch0 -p1}
+cd ..
+
+%setup -q -T -D -n %{name}-%{version} -a1
+cd gcc-%{gcc_pkgvers}
+%{?PATCH1:%patch1 -p1}
+cd ..
+
+%setup -q -T -D -n %{name}-%{version} -a2
+%{?PATCH2:%patch2 -p0}
+
+
+
+%setup -q -T -D -n %{name}-%{version} -a5
+%{?PATCH5:%patch5 -p0}
+
+%if %{with gcc_stdint}
+sed -i -e '/thread_file=.*rtems/,/use_gcc_stdint=wrap/ { s/use_gcc_stdint=wrap/use_gcc_stdint=provide/}' gcc-%{gcc_pkgvers}/gcc/config.gcc
+%endif
+
+
+%if 0%{?_build_mpfr}
+%setup -q -T -D -n %{name}-%{version} -a60
+%{?PATCH60:%patch60 -p1}
+  # Build mpfr one-tree style
+  ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
+%endif
+
+%if 0%{?_build_mpc}
+%setup -q -T -D -n %{name}-%{version} -a61
+%{?PATCH61:%patch61 -p1}
+  # Build mpc one-tree style
+  ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
+%endif
+
+%if 0%{?_build_gmp}
+%setup -q -T -D -n %{name}-%{version} -a62
+%{?PATCH62:%patch62 -p1}
+  # Build gmp one-tree style
+  ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
+%endif
+
+%if 0%{?_build_libelf}
+%setup -q -T -D -n %{name}-%{version} -a63
+%{?PATCH63:%patch63 -p1}
+  # Build libelf one-tree style
+  ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
+%endif
+
+
+  # Fix timestamps
+  cd gcc-%{gcc_pkgvers}
+  contrib/gcc_update --touch
+  cd ..
+%build
+  mkdir -p build
+
+  cd build
+
+  languages="c"
+  languages="$languages,c++"
+  case amd64-pc-netbsdelf5.1 in
+  *-rtems4.11) optargs="$optargs --enable-libstdcxx-time";;
+  esac
+  languages="$languages,fortran"
+  languages="$languages,objc"
+%if "%{_build}" != "%{_host}"
+  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
+  CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
+%else
+# gcc is not ready to be compiled with -std=gnu99
+  CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
+%endif
+  ../gcc-%{gcc_pkgvers}/configure \
+    --prefix=%{_prefix} \
+    --bindir=%{_bindir} \
+    --exec_prefix=%{_exec_prefix} \
+    --includedir=%{_includedir} \
+    --libdir=%{_gcclibdir} \
+    --libexecdir=%{_libexecdir} \
+    --mandir=%{_mandir} \
+    --infodir=%{_infodir} \
+    --datadir=%{_datadir} \
+    --build=%_build --host=%_host \
+    --target=amd64-pc-netbsdelf5.1 \
+    --disable-libstdcxx-pch \
+    --with-gnu-as --with-gnu-ld --verbose \
+    --with-system-zlib \
+    --disable-nls --without-included-gettext \
+    --disable-win32-registry \
+    --enable-version-specific-runtime-libs \
+    --enable-threads \
+    --with-sysroot=%{_exec_prefix}/amd64-pc-netbsdelf5.1/sys-root \
+    %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
+    %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
+    --enable-languages="$languages" $optargs
+
+%if "%_host" != "%_build"
+  # Bug in gcc-3.2.1:
+  # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
+  mkdir -p gcc/include
+  cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
+%endif
+
+  make %{?_smp_mflags} all
+  cd ..
+
+%install
+  rm -rf $RPM_BUILD_ROOT
+
+  cd build
+
+  make DESTDIR=$RPM_BUILD_ROOT install
+  cd ..
+
+
+%if "%{gcc_version}" <= "4.1.2"
+# Misplaced header file
+  if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
+    mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
+      $RPM_BUILD_ROOT%{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}/include/
+  fi
+%endif
+
+  # host library
+%if "%{gcc_version}" >= "4.2.0"
+  # libiberty doesn't honor --libdir, but always installs to a 
+  # magically guessed _libdir
+  rm -f  ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
+%else
+  # libiberty installs to --libdir=...
+  rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
+%endif
+
+  # We use the version from binutils
+  rm -f $RPM_BUILD_ROOT%{_bindir}/amd64-pc-netbsdelf5.1-c++filt%{_exeext}
+
+
+# Conflict with a native GCC's infos
+  rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+# Conflict with a native GCC's man pages
+  rm -rf $RPM_BUILD_ROOT%{_mandir}/man7
+
+  # Bug in gcc-3.4.0pre
+  rm -f $RPM_BUILD_ROOT%{_bindir}/amd64-pc-netbsdelf5.1-amd64-pc-netbsdelf5.1-gcjh%{_exeext}
+
+  # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
+  # the fixinclude-install-tools
+  rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}/install-tools
+  rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}/install-tools
+
+  # Bug in gcc > 4.1.0: Installs an unused, empty directory
+  if test -d ${RPM_BUILD_ROOT}%{_prefix}/amd64-pc-netbsdelf5.1/include/bits; then
+    rmdir ${RPM_BUILD_ROOT}%{_prefix}/amd64-pc-netbsdelf5.1/include/bits
+  fi
+
+  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
+%if ! %{with pygdb}
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
+  fi
+%endif
+
+  # Collect multilib subdirectories
+  multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
+
+
+  rm -f dirs ;
+  echo "%defattr(-,root,root,-)" >> dirs
+  TGTDIR="%{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}"
+  for i in $multilibs; do
+    case $i in
+    \.) ;; # ignore, handled elsewhere
+    *)  echo "%dir ${TGTDIR}/$i" >> dirs
+      ;;
+    esac
+  done
+
+  # Collect files to go into different packages
+  cp dirs build/files.gcc
+  cp dirs build/files.gfortran
+  cp dirs build/files.objc
+  cp dirs build/files.gcj
+  cp dirs build/files.g++
+
+  TGTDIR="%{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}"
+  f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
+  for i in $f; do
+    case $i in
+    *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
+    *f771) ;;
+    *f951) ;;
+    *cc1) ;;
+    *cc1obj) ;;
+    *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
+    *collect2) ;;
+    *libobjc*) echo "$i" >> build/files.objc ;;
+    *include/objc*) ;;
+    *include/g++*);;
+    *include/c++*);;
+    *include-fixed/*);;
+    *finclude/*);;
+    *adainclude*);;
+    *adalib*);;
+    *gnat1);;
+    *jc1) ;;
+    *jvgenmain) ;;
+    */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
+    %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
+    %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
+    */libstdc++.*) echo "$i" >> build/files.g++ ;;
+    */libsupc++.*) echo "$i" >> build/files.g++ ;;
+    *) echo "$i" >> build/files.gcc ;;
+    esac
+  done
+
+  TGTDIR="%{_exec_prefix}/amd64-pc-netbsdelf5.1/lib"
+  f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
+  for i in $f; do
+    case $i in
+    *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
+    *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
+# all other files belong to newlib
+    *) echo "$i" >> build/files.newlib ;; 
+    esac
+  done
+# Extract %%__os_install_post into os_install_post~
+cat << \EOF > os_install_post~
+%__os_install_post
+EOF
+
+# Generate customized brp-*scripts
+cat os_install_post~ | while read a x y; do
+case $a in
+# Prevent brp-strip* from trying to handle foreign binaries
+*/brp-strip*)
+  b=$(basename $a)
+  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
+  chmod a+x $b
+  ;;
+esac
+done
+
+sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
+< os_install_post~ > os_install_post 
+%define __os_install_post . ./os_install_post
+
+
+cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
+#!/bin/sh
+grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/amd64-pc-netbsdelf5.1/(lib|include|sys-root)' \
+  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/'} | %__find_provides
+EOF
+chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
+%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
+
+cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
+#!/bin/sh
+grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/amd64-pc-netbsdelf5.1/(lib|include|sys-root)' \
+  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/'} | %__find_requires
+EOF
+chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
+%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
+
+%ifnarch noarch
+# Extract %%__debug_install_post into debug_install_post~
+cat << \EOF > debug_install_post~
+%__debug_install_post
+EOF
+
+# Generate customized debug_install_post script
+cat debug_install_post~ | while read a x y; do
+case $a in
+# Prevent find-debuginfo.sh* from trying to handle foreign binaries
+*/find-debuginfo.sh)
+  b=$(basename $a)
+  sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
+  chmod a+x $b
+  ;;
+esac
+done
+
+sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
+< debug_install_post~ > debug_install_post 
+%define __debug_install_post . ./debug_install_post
+
+%endif
+
+%clean
+  rm -rf $RPM_BUILD_ROOT
+
+# ==============================================================
+# amd64-pc-netbsdelf5.1-gcc
+# ==============================================================
+# %package -n amd64-pc-netbsdelf5.1-gcc
+# Summary:        GNU cc compiler for amd64-pc-netbsdelf5.1
+# Group:          Development/Tools
+# Version:        %{gcc_rpmvers}
+# Requires:       amd64-pc-netbsdelf5.1-binutils
+# License:	GPL
+
+# %if %build_infos
+# Requires:      gcc-common
+# %endif
+
+%description -n amd64-pc-netbsdelf5.1-gcc
+GNU cc compiler for amd64-pc-netbsdelf5.1.
+
+# ==============================================================
+# amd64-pc-netbsdelf5.1-gcc-libgcc
+# ==============================================================
+%package -n amd64-pc-netbsdelf5.1-gcc-libgcc
+Summary:        libgcc for amd64-pc-netbsdelf5.1-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	GPL
+
+%description -n amd64-pc-netbsdelf5.1-gcc-libgcc
+libgcc amd64-pc-netbsdelf5.1-gcc.
+
+
+%files -n amd64-pc-netbsdelf5.1-gcc
+%defattr(-,root,root)
+
+%{_mandir}/man1/amd64-pc-netbsdelf5.1-gcc.1*
+%{_mandir}/man1/amd64-pc-netbsdelf5.1-cpp.1*
+%{_mandir}/man1/amd64-pc-netbsdelf5.1-gcov.1*
+
+%{_bindir}/amd64-pc-netbsdelf5.1-cpp%{_exeext}
+%{_bindir}/amd64-pc-netbsdelf5.1-gcc%{_exeext}
+%{_bindir}/amd64-pc-netbsdelf5.1-gcc-%{gcc_version}%{_exeext}
+%{_bindir}/amd64-pc-netbsdelf5.1-gcov%{_exeext}
+%{_bindir}/amd64-pc-netbsdelf5.1-gccbug
+
+%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/amd64-pc-netbsdelf5.1
+%dir %{_libexecdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}
+%{_libexecdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}/cc1%{_exeext}
+%{_libexecdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}/collect2%{_exeext}
+%if "%{gcc_version}" >= "4.5.0"
+%{?with_lto:%{_libexecdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}/lto%{_exeext}}
+%{_libexecdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}/lto-wrapper%{_exeext}
+%endif
+
+%files -n amd64-pc-netbsdelf5.1-gcc-libgcc -f build/files.gcc
+%defattr(-,root,root)
+%dir %{_gcclibdir}/gcc
+%dir %{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1
+%dir %{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}
+%dir %{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}/include
+
+%if "%{gcc_version}" > "4.0.3"
+%dir %{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}/include/ssp
+%endif
+
+%if "%{gcc_version}" >= "4.3.0"
+%{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}/include-fixed
+%endif
+
+# ==============================================================
+# amd64-pc-netbsdelf5.1-gcc-c++
+# ==============================================================
+%package -n amd64-pc-netbsdelf5.1-gcc-c++
+Summary:	GCC c++ compiler for amd64-pc-netbsdelf5.1
+Group:		Development/Tools
+Version:        %{gcc_rpmvers}
+License:	GPL
+Requires:       amd64-pc-netbsdelf5.1-gcc-libstdc++ = %{gcc_rpmvers}-%{release}
+
+%if "%{_build}" != "%{_host}"
+BuildRequires:  amd64-pc-netbsdelf5.1-gcc-c++ = %{gcc_rpmvers}
+%endif
+
+Requires:       amd64-pc-netbsdelf5.1-gcc = %{gcc_rpmvers}-%{release}
+
+%description -n amd64-pc-netbsdelf5.1-gcc-c++
+GCC c++ compiler for amd64-pc-netbsdelf5.1.
+
+
+%package -n amd64-pc-netbsdelf5.1-gcc-libstdc++
+Summary:	libstdc++ for amd64-pc-netbsdelf5.1
+Group:		Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	GPL
+
+%description -n amd64-pc-netbsdelf5.1-gcc-libstdc++
+%{summary}
+
+
+%files -n amd64-pc-netbsdelf5.1-gcc-c++
+%defattr(-,root,root)
+
+%{_mandir}/man1/amd64-pc-netbsdelf5.1-g++.1*
+
+%{_bindir}/amd64-pc-netbsdelf5.1-c++%{_exeext}
+%{_bindir}/amd64-pc-netbsdelf5.1-g++%{_exeext}
+
+%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/amd64-pc-netbsdelf5.1
+%dir %{_libexecdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}
+%{_libexecdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}/cc1plus%{_exeext}
+
+
+%files -n amd64-pc-netbsdelf5.1-gcc-libstdc++ -f build/files.g++
+%defattr(-,root,root)
+%dir %{_gcclibdir}/gcc
+%dir %{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1
+%dir %{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}
+%dir %{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}/include
+%{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}/include/c++
+
+# ==============================================================
+# amd64-pc-netbsdelf5.1-gcc-gfortran
+# ==============================================================
+%package -n amd64-pc-netbsdelf5.1-gcc-gfortran
+Summary:	Fortran 95 support for amd64-pc-netbsdelf5.1-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+License:	GPL
+
+Requires:       amd64-pc-netbsdelf5.1-gcc = %{gcc_rpmvers}-%{release}
+Requires:       amd64-pc-netbsdelf5.1-gcc-libgfortran = %{gcc_rpmvers}-%{release}
+
+%description -n amd64-pc-netbsdelf5.1-gcc-gfortran
+GCC fortran compiler for amd64-pc-netbsdelf5.1.
+
+%files -n amd64-pc-netbsdelf5.1-gcc-gfortran
+%defattr(-,root,root)
+%{_bindir}/amd64-pc-netbsdelf5.1-gfortran%{_exeext}
+
+%{_mandir}/man1/amd64-pc-netbsdelf5.1-gfortran.1*
+
+%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/amd64-pc-netbsdelf5.1
+%dir %{_libexecdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}
+%{_libexecdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}/f951%{_exeext}
+
+# ==============================================================
+# amd64-pc-netbsdelf5.1-gcc-libgfortran
+# ==============================================================
+%package -n amd64-pc-netbsdelf5.1-gcc-libgfortran
+Summary:	Fortran 95 support libraries for amd64-pc-netbsdelf5.1-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	GPL
+
+%description -n amd64-pc-netbsdelf5.1-gcc-libgfortran
+%{summary}
+
+%files -n amd64-pc-netbsdelf5.1-gcc-libgfortran -f build/files.gfortran
+%defattr(-,root,root)
+%dir %{_gcclibdir}/gcc
+%dir %{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1
+%dir %{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}
+%if "%{gcc_version}" >= "4.2.0"
+%{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}/finclude
+%endif
+
+# ==============================================================
+# amd64-pc-netbsdelf5.1-gcc-objc
+# ==============================================================
+%package -n amd64-pc-netbsdelf5.1-gcc-objc
+Summary:        Objective C support for amd64-pc-netbsdelf5.1-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+License:	GPL
+
+Requires:       amd64-pc-netbsdelf5.1-gcc = %{gcc_rpmvers}-%{release}
+Requires:       amd64-pc-netbsdelf5.1-gcc-libobjc = %{gcc_rpmvers}-%{release}
+
+%description -n amd64-pc-netbsdelf5.1-gcc-objc
+GCC objc compiler for amd64-pc-netbsdelf5.1.
+
+%files -n amd64-pc-netbsdelf5.1-gcc-objc
+%defattr(-,root,root)
+%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/amd64-pc-netbsdelf5.1
+%dir %{_libexecdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}
+%{_libexecdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}/cc1obj%{_exeext}
+
+# ==============================================================
+# amd64-pc-netbsdelf5.1-gcc-libobjc
+# ==============================================================
+%package -n amd64-pc-netbsdelf5.1-gcc-libobjc
+Summary:        Objective C support for amd64-pc-netbsdelf5.1-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	GPL
+
+%description -n amd64-pc-netbsdelf5.1-gcc-libobjc
+Support libraries for GCC's objc compiler for amd64-pc-netbsdelf5.1.
+
+%files -n amd64-pc-netbsdelf5.1-gcc-libobjc -f build/files.objc
+%defattr(-,root,root)
+%dir %{_gcclibdir}/gcc
+%dir %{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1
+%dir %{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}
+%dir %{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}/include
+%{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/%{gcc_version}/include/objc
+

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/x86_64/amd64-pc-netbsdelf5.1-libs.spec:1.1
--- /dev/null	Mon Mar 21 08:11:54 2011
+++ rtems/contrib/crossrpms/netbsd5.1/x86_64/amd64-pc-netbsdelf5.1-libs.spec	Sun Mar 20 12:11:52 2011
@@ -0,0 +1,163 @@
+#
+# Please send bugfixes or comments to
+# 	http://www.rtems.org/bugzilla
+#
+
+
+%ifos cygwin cygwin32 mingw mingw32
+%define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
+%else
+%define _exeext %{nil}
+%endif
+
+%ifos cygwin cygwin32
+%define optflags -O3 -pipe -march=i486 -funroll-loops
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
+%endif
+
+%if "%{_build}" != "%{_host}"
+%define _host_rpmprefix %{_host}-
+%else
+%define _host_rpmprefix %{nil}
+%endif
+
+%define netbsd_version 5.1
+%define netbsd_rpmvers %{expand:%(echo 5.1 | tr - _)}
+
+%define _use_internal_dependency_generator 0
+%define __debug_install_post %{nil}
+
+Name:		amd64-pc-netbsdelf5.1
+Release:	0.20110320.0%{?dist}
+License:	NetBSD
+Group:		Development/Tools
+
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:	noarch
+
+Version:      	%netbsd_rpmvers
+Summary:      	amd64-pc-netbsdelf5.1 Libraries
+
+Source0:	ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-5.0.2/amd64/binary/sets/base.tgz
+Source1:	ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-5.0.2/amd64/binary/sets/comp.tgz
+
+%description
+amd64-pc-netbsdelf5.1 libraries.
+
+%prep
+%setup -q -c -T -n %{name}-%{version} -a 0 -a 1
+
+%build
+  # Setup sys-root (Usable for gcc >= 3.4)
+  mkdir -p amd64-pc-netbsdelf5.1/sys-root
+  %{__tar} cf - lib usr/lib usr/include | ( cd amd64-pc-netbsdelf5.1/sys-root ; %{__tar} xf -)
+
+  pushd amd64-pc-netbsdelf5.1/sys-root/usr/lib > /dev/null
+  # missing files
+  rm -f lib*_p.*
+  # not needed
+  rm -rf aout compat
+
+  # Fix up symlinks
+  find -type l -exec ls -l {} \; | \
+    while read a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aA ; do \
+    case $aA in
+    /lib* ) # link
+       rm $a8;
+       b=`basename $aA`
+       ln -s ../../lib/$b $a8
+       ;;
+    esac
+  done
+  popd > /dev/null
+
+%install
+  rm -rf $RPM_BUILD_ROOT
+  mkdir -p $RPM_BUILD_ROOT%{_prefix}
+  cp -a amd64-pc-netbsdelf5.1 $RPM_BUILD_ROOT%{_prefix}
+
+# Extract %%__os_install_post into os_install_post~
+cat << \EOF > os_install_post~
+%__os_install_post
+EOF
+
+# Generate customized brp-*scripts
+cat os_install_post~ | while read a x y; do
+case $a in
+# Prevent brp-strip* from trying to handle foreign binaries
+*/brp-strip*)
+  b=$(basename $a)
+  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
+  chmod a+x $b
+  ;;
+esac
+done
+
+sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
+< os_install_post~ > os_install_post 
+%define __os_install_post . ./os_install_post
+
+
+cat << EOF > %{_builddir}/%{name}-%{netbsd_rpmvers}/find-provides
+#!/bin/sh
+grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/amd64-pc-netbsdelf5.1/(lib|include|sys-root)' \
+  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/'} | %__find_provides
+EOF
+chmod +x %{_builddir}/%{name}-%{netbsd_rpmvers}/find-provides
+%define __find_provides %{_builddir}/%{name}-%{netbsd_rpmvers}/find-provides
+
+cat << EOF > %{_builddir}/%{name}-%{netbsd_rpmvers}/find-requires
+#!/bin/sh
+grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/amd64-pc-netbsdelf5.1/(lib|include|sys-root)' \
+  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/amd64-pc-netbsdelf5.1/'} | %__find_requires
+EOF
+chmod +x %{_builddir}/%{name}-%{netbsd_rpmvers}/find-requires
+%define __find_requires %{_builddir}/%{name}-%{netbsd_rpmvers}/find-requires
+
+%ifnarch noarch
+# Extract %%__debug_install_post into debug_install_post~
+cat << \EOF > debug_install_post~
+%__debug_install_post
+EOF
+
+# Generate customized debug_install_post script
+cat debug_install_post~ | while read a x y; do
+case $a in
+# Prevent find-debuginfo.sh* from trying to handle foreign binaries
+*/find-debuginfo.sh)
+  b=$(basename $a)
+  sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
+  chmod a+x $b
+  ;;
+esac
+done
+
+sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
+< debug_install_post~ > debug_install_post 
+%define __debug_install_post . ./debug_install_post
+
+%endif
+
+%clean
+  rm -rf $RPM_BUILD_ROOT
+
+%package sys-root
+Group: Development/Tools
+Summary: amd64-pc-netbsdelf5.1 target files for gcc >= 3.4
+
+%description sys-root
+amd64-pc-netbsdelf5.1 target files for gcc >= 3.4
+
+%files sys-root
+%defattr(-,root,root,-)
+%dir %{_prefix}/amd64-pc-netbsdelf5.1
+%{_prefix}/amd64-pc-netbsdelf5.1/sys-root

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/x86_64/binutils-sources.add:1.1
--- /dev/null	Mon Mar 21 08:11:54 2011
+++ rtems/contrib/crossrpms/netbsd5.1/x86_64/binutils-sources.add	Sun Mar 20 12:11:53 2011
@@ -0,0 +1,2 @@
+Source0: http://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
+ at PATCH0@

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/x86_64/gcc-sources.add:1.1
--- /dev/null	Mon Mar 21 08:11:54 2011
+++ rtems/contrib/crossrpms/netbsd5.1/x86_64/gcc-sources.add	Sun Mar 20 12:11:53 2011
@@ -0,0 +1,35 @@
+Source0: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.0"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
+%endif
+%{?_without_sources:NoSource:	0}
+
+%if %build_cxx
+Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+ at PATCH1@
+%{?_without_sources:NoSource:	1}
+
+%endif
+%if %build_fortran
+Source2:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
+ at PATCH2@
+%{?_without_sources:NoSource:	2}
+
+%endif
+%if %build_gcj
+Source3:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-java-%{gcc_pkgvers}.tar.bz2
+ at PATCH3@
+%{?_without_sources:NoSource:	3}
+
+%endif
+%if %build_gnat
+Source4:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-ada-%{gcc_pkgvers}.tar.bz2
+ at PATCH4@
+%{?_without_sources:NoSource:	4}
+
+%endif
+%if %build_objc
+Source5:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-objc-%{gcc_pkgvers}.tar.bz2
+ at PATCH5@
+%{?_without_sources:NoSource:	5}
+%endif

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/x86_64/libs.add:1.1
--- /dev/null	Mon Mar 21 08:11:54 2011
+++ rtems/contrib/crossrpms/netbsd5.1/x86_64/libs.add	Sun Mar 20 12:11:53 2011
@@ -0,0 +1,55 @@
+%define netbsd_version @NETBSD_VERS@
+%define netbsd_rpmvers %{expand:%(echo @NETBSD_VERS@ | tr - _)}
+
+%define _use_internal_dependency_generator 0
+%define __debug_install_post %{nil}
+
+Name:		@rpmprefix@@tool_target@
+Release:	@NETBSD_RPMREL@
+License:	NetBSD
+Group:		Development/Tools
+
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:	noarch
+
+Version:      	%netbsd_rpmvers
+Summary:      	@tool_target@ Libraries
+
+Source0:	ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-5.0.2/amd64/binary/sets/base.tgz
+Source1:	ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-5.0.2/amd64/binary/sets/comp.tgz
+
+%description
+ at tool_target@ libraries.
+
+%prep
+%setup -q -c -T -n %{name}-%{version} -a 0 -a 1
+
+%build
+  # Setup sys-root (Usable for gcc >= 3.4)
+  mkdir -p @tool_target@/sys-root
+  %{__tar} cf - lib usr/lib usr/include | ( cd @tool_target@/sys-root ; %{__tar} xf -)
+
+  pushd @tool_target@/sys-root/usr/lib > /dev/null
+  # missing files
+  rm -f lib*_p.*
+  # not needed
+  rm -rf aout compat
+
+  # Fix up symlinks
+  find -type l -exec ls -l {} \; | \
+    while read a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aA ; do \
+    case $aA in
+    /lib* ) # link
+       rm $a8;
+       b=`basename $aA`
+       ln -s ../../lib/$b $a8
+       ;;
+    esac
+  done
+  popd > /dev/null
+
+%install
+  rm -rf $RPM_BUILD_ROOT
+  mkdir -p $RPM_BUILD_ROOT%{_prefix}
+  cp -a @tool_target@ $RPM_BUILD_ROOT%{_prefix}
+

diff -u /dev/null rtems/contrib/crossrpms/netbsd5.1/x86_64/target-libs.add:1.1
--- /dev/null	Mon Mar 21 08:11:54 2011
+++ rtems/contrib/crossrpms/netbsd5.1/x86_64/target-libs.add	Sun Mar 20 12:11:53 2011
@@ -0,0 +1,11 @@
+%package sys-root
+Group: Development/Tools
+Summary: @tool_target@ target files for gcc >= 3.4
+
+%description sys-root
+ at tool_target@ target files for gcc >= 3.4
+
+%files sys-root
+%defattr(-,root,root,-)
+%dir %{_prefix}/@tool_target@
+%{_prefix}/@tool_target@/sys-root


 *ralf*:
Preps for gcc-4.5.2.

M    1.3  contrib/crossrpms/freebsd6.4/i586/gcc-sources.add
M    1.2  contrib/crossrpms/freebsd7.3/i586/gcc-sources.add
M    1.2  contrib/crossrpms/freebsd8.1/i586/gcc-sources.add
M    1.2  contrib/crossrpms/freebsd8.1/x86_64/gcc-sources.add
M    1.2  contrib/crossrpms/freebsd8.2/i586/gcc-sources.add
M    1.2  contrib/crossrpms/freebsd8.2/x86_64/gcc-sources.add
M    1.4  contrib/crossrpms/netbsd5.0.2/i386/gcc-sources.add
M    1.3  contrib/crossrpms/netbsd5.0.2/x86_64/gcc-sources.add
M    1.2  contrib/crossrpms/netbsd5.1/i386/gcc-sources.add
M    1.2  contrib/crossrpms/netbsd5.1/x86_64/gcc-sources.add

diff -u rtems/contrib/crossrpms/freebsd6.4/i586/gcc-sources.add:1.2 rtems/contrib/crossrpms/freebsd6.4/i586/gcc-sources.add:1.3
--- rtems/contrib/crossrpms/freebsd6.4/i586/gcc-sources.add:1.2	Wed Aug 26 11:55:52 2009
+++ rtems/contrib/crossrpms/freebsd6.4/i586/gcc-sources.add	Mon Mar 21 03:43:54 2011
@@ -1,10 +1,17 @@
 Source0: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
- at PATCH0@
+%if "%{gcc_version}" == "4.5.0"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
+%endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 %if %build_cxx
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
- at PATCH1@
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 %endif

diff -u rtems/contrib/crossrpms/freebsd7.3/i586/gcc-sources.add:1.1 rtems/contrib/crossrpms/freebsd7.3/i586/gcc-sources.add:1.2
--- rtems/contrib/crossrpms/freebsd7.3/i586/gcc-sources.add:1.1	Thu Apr 15 21:58:45 2010
+++ rtems/contrib/crossrpms/freebsd7.3/i586/gcc-sources.add	Mon Mar 21 03:43:54 2011
@@ -1,10 +1,17 @@
 Source0: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
- at PATCH0@
+%if "%{gcc_version}" == "4.5.0"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
+%endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 %if %build_cxx
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
- at PATCH1@
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 %endif

diff -u rtems/contrib/crossrpms/freebsd8.1/i586/gcc-sources.add:1.1 rtems/contrib/crossrpms/freebsd8.1/i586/gcc-sources.add:1.2
--- rtems/contrib/crossrpms/freebsd8.1/i586/gcc-sources.add:1.1	Mon Jul 26 23:37:58 2010
+++ rtems/contrib/crossrpms/freebsd8.1/i586/gcc-sources.add	Mon Mar 21 03:43:54 2011
@@ -1,10 +1,17 @@
 Source0: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
- at PATCH0@
+%if "%{gcc_version}" == "4.5.0"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
+%endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 %if %build_cxx
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
- at PATCH1@
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 %endif

diff -u rtems/contrib/crossrpms/freebsd8.1/x86_64/gcc-sources.add:1.1 rtems/contrib/crossrpms/freebsd8.1/x86_64/gcc-sources.add:1.2
--- rtems/contrib/crossrpms/freebsd8.1/x86_64/gcc-sources.add:1.1	Mon Jul 26 23:37:58 2010
+++ rtems/contrib/crossrpms/freebsd8.1/x86_64/gcc-sources.add	Mon Mar 21 03:43:54 2011
@@ -1,10 +1,17 @@
 Source0: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
- at PATCH0@
+%if "%{gcc_version}" == "4.5.0"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
+%endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 %if %build_cxx
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
- at PATCH1@
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 %endif

diff -u rtems/contrib/crossrpms/freebsd8.2/i586/gcc-sources.add:1.1 rtems/contrib/crossrpms/freebsd8.2/i586/gcc-sources.add:1.2
--- rtems/contrib/crossrpms/freebsd8.2/i586/gcc-sources.add:1.1	Sun Feb 27 16:01:39 2011
+++ rtems/contrib/crossrpms/freebsd8.2/i586/gcc-sources.add	Mon Mar 21 03:43:54 2011
@@ -1,10 +1,17 @@
 Source0: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
- at PATCH0@
+%if "%{gcc_version}" == "4.5.0"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
+%endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 %if %build_cxx
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
- at PATCH1@
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 %endif

diff -u rtems/contrib/crossrpms/freebsd8.2/x86_64/gcc-sources.add:1.1 rtems/contrib/crossrpms/freebsd8.2/x86_64/gcc-sources.add:1.2
--- rtems/contrib/crossrpms/freebsd8.2/x86_64/gcc-sources.add:1.1	Sun Feb 27 16:01:39 2011
+++ rtems/contrib/crossrpms/freebsd8.2/x86_64/gcc-sources.add	Mon Mar 21 03:43:54 2011
@@ -1,10 +1,17 @@
 Source0: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
- at PATCH0@
+%if "%{gcc_version}" == "4.5.0"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
+%endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 %if %build_cxx
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
- at PATCH1@
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 %endif

diff -u rtems/contrib/crossrpms/netbsd5.0.2/i386/gcc-sources.add:1.3 rtems/contrib/crossrpms/netbsd5.0.2/i386/gcc-sources.add:1.4
--- rtems/contrib/crossrpms/netbsd5.0.2/i386/gcc-sources.add:1.3	Wed Jun  9 02:29:01 2010
+++ rtems/contrib/crossrpms/netbsd5.0.2/i386/gcc-sources.add	Mon Mar 21 03:43:54 2011
@@ -2,11 +2,16 @@
 %if "%{gcc_version}" == "4.5.0"
 Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
 %endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 %if %build_cxx
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
- at PATCH1@
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 %endif

diff -u rtems/contrib/crossrpms/netbsd5.0.2/x86_64/gcc-sources.add:1.2 rtems/contrib/crossrpms/netbsd5.0.2/x86_64/gcc-sources.add:1.3
--- rtems/contrib/crossrpms/netbsd5.0.2/x86_64/gcc-sources.add:1.2	Wed Jun  9 02:29:01 2010
+++ rtems/contrib/crossrpms/netbsd5.0.2/x86_64/gcc-sources.add	Mon Mar 21 03:43:54 2011
@@ -2,11 +2,16 @@
 %if "%{gcc_version}" == "4.5.0"
 Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
 %endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 %if %build_cxx
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
- at PATCH1@
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 %endif

diff -u rtems/contrib/crossrpms/netbsd5.1/i386/gcc-sources.add:1.1 rtems/contrib/crossrpms/netbsd5.1/i386/gcc-sources.add:1.2
--- rtems/contrib/crossrpms/netbsd5.1/i386/gcc-sources.add:1.1	Sun Mar 20 12:11:52 2011
+++ rtems/contrib/crossrpms/netbsd5.1/i386/gcc-sources.add	Mon Mar 21 03:43:54 2011
@@ -2,11 +2,16 @@
 %if "%{gcc_version}" == "4.5.0"
 Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
 %endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 %if %build_cxx
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
- at PATCH1@
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 %endif

diff -u rtems/contrib/crossrpms/netbsd5.1/x86_64/gcc-sources.add:1.1 rtems/contrib/crossrpms/netbsd5.1/x86_64/gcc-sources.add:1.2
--- rtems/contrib/crossrpms/netbsd5.1/x86_64/gcc-sources.add:1.1	Sun Mar 20 12:11:53 2011
+++ rtems/contrib/crossrpms/netbsd5.1/x86_64/gcc-sources.add	Mon Mar 21 03:43:54 2011
@@ -2,11 +2,16 @@
 %if "%{gcc_version}" == "4.5.0"
 Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
 %endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 %if %build_cxx
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
- at PATCH1@
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 %endif


 *ralf*:
GCC_VERS = 4.5.2.
GCC_RPMREL = 0.20110321.1.

M   1.17  contrib/crossrpms/freebsd6.4/i586/Makefile.am
M    1.8  contrib/crossrpms/freebsd7.3/i586/Makefile.am
M    1.5  contrib/crossrpms/freebsd8.1/i586/Makefile.am
M    1.5  contrib/crossrpms/freebsd8.1/x86_64/Makefile.am
M    1.3  contrib/crossrpms/freebsd8.2/i586/Makefile.am
M    1.3  contrib/crossrpms/freebsd8.2/x86_64/Makefile.am
M   1.13  contrib/crossrpms/netbsd5.0.2/i386/Makefile.am
M    1.8  contrib/crossrpms/netbsd5.0.2/x86_64/Makefile.am
M    1.2  contrib/crossrpms/netbsd5.1/i386/Makefile.am
M    1.2  contrib/crossrpms/netbsd5.1/x86_64/Makefile.am

diff -u rtems/contrib/crossrpms/freebsd6.4/i586/Makefile.am:1.16 rtems/contrib/crossrpms/freebsd6.4/i586/Makefile.am:1.17
--- rtems/contrib/crossrpms/freebsd6.4/i586/Makefile.am:1.16	Wed Mar  9 22:30:29 2011
+++ rtems/contrib/crossrpms/freebsd6.4/i586/Makefile.am	Mon Mar 21 03:47:07 2011
@@ -16,8 +16,8 @@
 include ../binutils.am
 BINUTILS_OPTS +=
 
-GCC_VERS = 4.5.0
+GCC_VERS = 4.5.2
 GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 0.20110310.0
+GCC_RPMREL = 0.20110321.1
 include ../gcc.am
 GCC_OPTS += --languages=cxx,fortran,objc

diff -u rtems/contrib/crossrpms/freebsd7.3/i586/Makefile.am:1.7 rtems/contrib/crossrpms/freebsd7.3/i586/Makefile.am:1.8
--- rtems/contrib/crossrpms/freebsd7.3/i586/Makefile.am:1.7	Wed Mar  9 22:39:06 2011
+++ rtems/contrib/crossrpms/freebsd7.3/i586/Makefile.am	Mon Mar 21 03:47:07 2011
@@ -16,8 +16,8 @@
 include ../binutils.am
 BINUTILS_OPTS +=
 
-GCC_VERS = 4.5.0
+GCC_VERS = 4.5.2
 GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 0.20110310.0
+GCC_RPMREL = 0.20110321.1
 include ../gcc.am
 GCC_OPTS += --languages=cxx,fortran,objc

diff -u rtems/contrib/crossrpms/freebsd8.1/i586/Makefile.am:1.4 rtems/contrib/crossrpms/freebsd8.1/i586/Makefile.am:1.5
--- rtems/contrib/crossrpms/freebsd8.1/i586/Makefile.am:1.4	Wed Mar  9 22:39:06 2011
+++ rtems/contrib/crossrpms/freebsd8.1/i586/Makefile.am	Mon Mar 21 03:47:08 2011
@@ -16,8 +16,8 @@
 include ../binutils.am
 BINUTILS_OPTS +=
 
-GCC_VERS = 4.5.0
+GCC_VERS = 4.5.2
 GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 0.20110310.0
+GCC_RPMREL = 0.20110321.1
 include ../gcc.am
 GCC_OPTS += --languages=cxx,fortran,objc

diff -u rtems/contrib/crossrpms/freebsd8.1/x86_64/Makefile.am:1.4 rtems/contrib/crossrpms/freebsd8.1/x86_64/Makefile.am:1.5
--- rtems/contrib/crossrpms/freebsd8.1/x86_64/Makefile.am:1.4	Wed Mar  9 22:39:06 2011
+++ rtems/contrib/crossrpms/freebsd8.1/x86_64/Makefile.am	Mon Mar 21 03:47:08 2011
@@ -16,8 +16,8 @@
 include ../binutils.am
 BINUTILS_OPTS +=
 
-GCC_VERS = 4.5.0
+GCC_VERS = 4.5.2
 GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 0.20110310.0
+GCC_RPMREL = 0.20110321.1
 include ../gcc.am
 GCC_OPTS += --languages=cxx,fortran,objc

diff -u rtems/contrib/crossrpms/freebsd8.2/i586/Makefile.am:1.2 rtems/contrib/crossrpms/freebsd8.2/i586/Makefile.am:1.3
--- rtems/contrib/crossrpms/freebsd8.2/i586/Makefile.am:1.2	Wed Mar  9 22:39:06 2011
+++ rtems/contrib/crossrpms/freebsd8.2/i586/Makefile.am	Mon Mar 21 03:47:08 2011
@@ -16,8 +16,8 @@
 include ../binutils.am
 BINUTILS_OPTS +=
 
-GCC_VERS = 4.5.0
+GCC_VERS = 4.5.2
 GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 0.20110310.0
+GCC_RPMREL = 0.20110321.1
 include ../gcc.am
 GCC_OPTS += --languages=cxx,fortran,objc

diff -u rtems/contrib/crossrpms/freebsd8.2/x86_64/Makefile.am:1.2 rtems/contrib/crossrpms/freebsd8.2/x86_64/Makefile.am:1.3
--- rtems/contrib/crossrpms/freebsd8.2/x86_64/Makefile.am:1.2	Wed Mar  9 22:39:06 2011
+++ rtems/contrib/crossrpms/freebsd8.2/x86_64/Makefile.am	Mon Mar 21 03:47:08 2011
@@ -16,8 +16,8 @@
 include ../binutils.am
 BINUTILS_OPTS +=
 
-GCC_VERS = 4.5.0
+GCC_VERS = 4.5.2
 GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 0.20110310.0
+GCC_RPMREL = 0.20110321.1
 include ../gcc.am
 GCC_OPTS += --languages=cxx,fortran,objc

diff -u rtems/contrib/crossrpms/netbsd5.0.2/i386/Makefile.am:1.12 rtems/contrib/crossrpms/netbsd5.0.2/i386/Makefile.am:1.13
--- rtems/contrib/crossrpms/netbsd5.0.2/i386/Makefile.am:1.12	Thu Mar 10 00:52:30 2011
+++ rtems/contrib/crossrpms/netbsd5.0.2/i386/Makefile.am	Mon Mar 21 03:47:08 2011
@@ -16,8 +16,8 @@
 include ../binutils.am
 BINUTILS_OPTS +=
 
-GCC_VERS = 4.5.0
+GCC_VERS = 4.5.2
 GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 0.20110310.0
+GCC_RPMREL = 0.20110321.1
 include ../gcc.am
 GCC_OPTS += --languages=c,cxx,fortran,objc

diff -u rtems/contrib/crossrpms/netbsd5.0.2/x86_64/Makefile.am:1.7 rtems/contrib/crossrpms/netbsd5.0.2/x86_64/Makefile.am:1.8
--- rtems/contrib/crossrpms/netbsd5.0.2/x86_64/Makefile.am:1.7	Thu Mar 10 00:52:30 2011
+++ rtems/contrib/crossrpms/netbsd5.0.2/x86_64/Makefile.am	Mon Mar 21 03:47:08 2011
@@ -16,8 +16,8 @@
 include ../binutils.am
 BINUTILS_OPTS +=
 
-GCC_VERS = 4.5.0
+GCC_VERS = 4.5.2
 GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 0.20110310.0
+GCC_RPMREL = 0.20110321.1
 include ../gcc.am
 GCC_OPTS += --languages=c,cxx,fortran,objc

diff -u rtems/contrib/crossrpms/netbsd5.1/i386/Makefile.am:1.1 rtems/contrib/crossrpms/netbsd5.1/i386/Makefile.am:1.2
--- rtems/contrib/crossrpms/netbsd5.1/i386/Makefile.am:1.1	Sun Mar 20 12:11:52 2011
+++ rtems/contrib/crossrpms/netbsd5.1/i386/Makefile.am	Mon Mar 21 03:47:08 2011
@@ -16,8 +16,8 @@
 include ../binutils.am
 BINUTILS_OPTS +=
 
-GCC_VERS = 4.5.0
+GCC_VERS = 4.5.2
 GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 0.20110320.0
+GCC_RPMREL = 0.20110321.1
 include ../gcc.am
 GCC_OPTS += --languages=c,cxx,fortran,objc

diff -u rtems/contrib/crossrpms/netbsd5.1/x86_64/Makefile.am:1.1 rtems/contrib/crossrpms/netbsd5.1/x86_64/Makefile.am:1.2
--- rtems/contrib/crossrpms/netbsd5.1/x86_64/Makefile.am:1.1	Sun Mar 20 12:11:52 2011
+++ rtems/contrib/crossrpms/netbsd5.1/x86_64/Makefile.am	Mon Mar 21 03:47:08 2011
@@ -16,8 +16,8 @@
 include ../binutils.am
 BINUTILS_OPTS +=
 
-GCC_VERS = 4.5.0
+GCC_VERS = 4.5.2
 GCC_PKGVERS = $(GCC_VERS)
-GCC_RPMREL = 0.20110320.0
+GCC_RPMREL = 0.20110321.1
 include ../gcc.am
 GCC_OPTS += --languages=c,cxx,fortran,objc


 *ralf*:
Regenerate.

M   1.14  contrib/crossrpms/freebsd6.4/i586/i586-pc-freebsd6.4-gcc.spec
M    1.9  contrib/crossrpms/freebsd7.3/i586/i586-pc-freebsd7.3-gcc.spec
M    1.5  contrib/crossrpms/freebsd8.1/i586/i586-pc-freebsd8.1-gcc.spec
M    1.5  contrib/crossrpms/freebsd8.1/x86_64/amd64-pc-freebsd8.1-gcc.spec
M    1.3  contrib/crossrpms/freebsd8.2/i586/i586-pc-freebsd8.2-gcc.spec
M    1.3  contrib/crossrpms/freebsd8.2/x86_64/amd64-pc-freebsd8.2-gcc.spec
M   1.13  contrib/crossrpms/netbsd5.0.2/i386/i386-pc-netbsdelf5.0.2-gcc.spec
M    1.7  contrib/crossrpms/netbsd5.0.2/x86_64/amd64-pc-netbsdelf5.0.2-gcc.spec
M    1.2  contrib/crossrpms/netbsd5.1/i386/i386-pc-netbsdelf5.1-gcc.spec
M    1.2  contrib/crossrpms/netbsd5.1/x86_64/amd64-pc-netbsdelf5.1-gcc.spec
M    1.8  cpukit/zlib/preinstall.am

diff -u rtems/contrib/crossrpms/freebsd6.4/i586/i586-pc-freebsd6.4-gcc.spec:1.13 rtems/contrib/crossrpms/freebsd6.4/i586/i586-pc-freebsd6.4-gcc.spec:1.14
--- rtems/contrib/crossrpms/freebsd6.4/i586/i586-pc-freebsd6.4-gcc.spec:1.13	Wed Mar  9 22:30:41 2011
+++ rtems/contrib/crossrpms/freebsd6.4/i586/i586-pc-freebsd6.4-gcc.spec	Mon Mar 21 03:48:28 2011
@@ -31,9 +31,9 @@
 %endif
 
 
-%define gcc_pkgvers 4.5.0
-%define gcc_version 4.5.0
-%define gcc_rpmvers %{expand:%(echo "4.5.0" | tr - _ )}
+%define gcc_pkgvers 4.5.2
+%define gcc_version 4.5.2
+%define gcc_rpmvers %{expand:%(echo "4.5.2" | tr - _ )}
 
 
 Name:         	i586-pc-freebsd6.4-gcc
@@ -41,7 +41,7 @@
 
 Group:	      	Development/Tools
 Version:        %{gcc_rpmvers}
-Release:      	0.20110310.0%{?dist}
+Release:      	0.20110321.1%{?dist}
 License:      	GPL
 URL:		http://gcc.gnu.org
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -243,9 +243,18 @@
 %global _gcclibdir %{_prefix}/lib
 
 Source0: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.0"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
+%endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 Source2:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
@@ -339,6 +348,9 @@
 
   languages="c"
   languages="$languages,c++"
+  case i586-pc-freebsd6.4 in
+  *-rtems4.11) optargs="$optargs --enable-libstdcxx-time";;
+  esac
   languages="$languages,fortran"
   languages="$languages,objc"
 %if "%{_build}" != "%{_host}"

diff -u rtems/contrib/crossrpms/freebsd7.3/i586/i586-pc-freebsd7.3-gcc.spec:1.8 rtems/contrib/crossrpms/freebsd7.3/i586/i586-pc-freebsd7.3-gcc.spec:1.9
--- rtems/contrib/crossrpms/freebsd7.3/i586/i586-pc-freebsd7.3-gcc.spec:1.8	Wed Mar  9 22:39:28 2011
+++ rtems/contrib/crossrpms/freebsd7.3/i586/i586-pc-freebsd7.3-gcc.spec	Mon Mar 21 03:48:28 2011
@@ -31,9 +31,9 @@
 %endif
 
 
-%define gcc_pkgvers 4.5.0
-%define gcc_version 4.5.0
-%define gcc_rpmvers %{expand:%(echo "4.5.0" | tr - _ )}
+%define gcc_pkgvers 4.5.2
+%define gcc_version 4.5.2
+%define gcc_rpmvers %{expand:%(echo "4.5.2" | tr - _ )}
 
 
 Name:         	i586-pc-freebsd7.3-gcc
@@ -41,7 +41,7 @@
 
 Group:	      	Development/Tools
 Version:        %{gcc_rpmvers}
-Release:      	0.20110310.0%{?dist}
+Release:      	0.20110321.1%{?dist}
 License:      	GPL
 URL:		http://gcc.gnu.org
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -243,9 +243,18 @@
 %global _gcclibdir %{_prefix}/lib
 
 Source0: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.0"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
+%endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 Source2:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
@@ -339,6 +348,9 @@
 
   languages="c"
   languages="$languages,c++"
+  case i586-pc-freebsd7.3 in
+  *-rtems4.11) optargs="$optargs --enable-libstdcxx-time";;
+  esac
   languages="$languages,fortran"
   languages="$languages,objc"
 %if "%{_build}" != "%{_host}"

diff -u rtems/contrib/crossrpms/freebsd8.1/i586/i586-pc-freebsd8.1-gcc.spec:1.4 rtems/contrib/crossrpms/freebsd8.1/i586/i586-pc-freebsd8.1-gcc.spec:1.5
--- rtems/contrib/crossrpms/freebsd8.1/i586/i586-pc-freebsd8.1-gcc.spec:1.4	Wed Mar  9 22:39:28 2011
+++ rtems/contrib/crossrpms/freebsd8.1/i586/i586-pc-freebsd8.1-gcc.spec	Mon Mar 21 03:48:28 2011
@@ -31,9 +31,9 @@
 %endif
 
 
-%define gcc_pkgvers 4.5.0
-%define gcc_version 4.5.0
-%define gcc_rpmvers %{expand:%(echo "4.5.0" | tr - _ )}
+%define gcc_pkgvers 4.5.2
+%define gcc_version 4.5.2
+%define gcc_rpmvers %{expand:%(echo "4.5.2" | tr - _ )}
 
 
 Name:         	i586-pc-freebsd8.1-gcc
@@ -41,7 +41,7 @@
 
 Group:	      	Development/Tools
 Version:        %{gcc_rpmvers}
-Release:      	0.20110310.0%{?dist}
+Release:      	0.20110321.1%{?dist}
 License:      	GPL
 URL:		http://gcc.gnu.org
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -243,9 +243,18 @@
 %global _gcclibdir %{_prefix}/lib
 
 Source0: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.0"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
+%endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 Source2:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
@@ -339,6 +348,9 @@
 
   languages="c"
   languages="$languages,c++"
+  case i586-pc-freebsd8.1 in
+  *-rtems4.11) optargs="$optargs --enable-libstdcxx-time";;
+  esac
   languages="$languages,fortran"
   languages="$languages,objc"
 %if "%{_build}" != "%{_host}"

diff -u rtems/contrib/crossrpms/freebsd8.1/x86_64/amd64-pc-freebsd8.1-gcc.spec:1.4 rtems/contrib/crossrpms/freebsd8.1/x86_64/amd64-pc-freebsd8.1-gcc.spec:1.5
--- rtems/contrib/crossrpms/freebsd8.1/x86_64/amd64-pc-freebsd8.1-gcc.spec:1.4	Wed Mar  9 22:39:36 2011
+++ rtems/contrib/crossrpms/freebsd8.1/x86_64/amd64-pc-freebsd8.1-gcc.spec	Mon Mar 21 03:48:28 2011
@@ -31,9 +31,9 @@
 %endif
 
 
-%define gcc_pkgvers 4.5.0
-%define gcc_version 4.5.0
-%define gcc_rpmvers %{expand:%(echo "4.5.0" | tr - _ )}
+%define gcc_pkgvers 4.5.2
+%define gcc_version 4.5.2
+%define gcc_rpmvers %{expand:%(echo "4.5.2" | tr - _ )}
 
 
 Name:         	amd64-pc-freebsd8.1-gcc
@@ -41,7 +41,7 @@
 
 Group:	      	Development/Tools
 Version:        %{gcc_rpmvers}
-Release:      	0.20110310.0%{?dist}
+Release:      	0.20110321.1%{?dist}
 License:      	GPL
 URL:		http://gcc.gnu.org
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -243,9 +243,18 @@
 %global _gcclibdir %{_prefix}/lib
 
 Source0: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.0"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
+%endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 Source2:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
@@ -339,6 +348,9 @@
 
   languages="c"
   languages="$languages,c++"
+  case amd64-pc-freebsd8.1 in
+  *-rtems4.11) optargs="$optargs --enable-libstdcxx-time";;
+  esac
   languages="$languages,fortran"
   languages="$languages,objc"
 %if "%{_build}" != "%{_host}"

diff -u rtems/contrib/crossrpms/freebsd8.2/i586/i586-pc-freebsd8.2-gcc.spec:1.2 rtems/contrib/crossrpms/freebsd8.2/i586/i586-pc-freebsd8.2-gcc.spec:1.3
--- rtems/contrib/crossrpms/freebsd8.2/i586/i586-pc-freebsd8.2-gcc.spec:1.2	Wed Mar  9 22:39:28 2011
+++ rtems/contrib/crossrpms/freebsd8.2/i586/i586-pc-freebsd8.2-gcc.spec	Mon Mar 21 03:48:28 2011
@@ -31,9 +31,9 @@
 %endif
 
 
-%define gcc_pkgvers 4.5.0
-%define gcc_version 4.5.0
-%define gcc_rpmvers %{expand:%(echo "4.5.0" | tr - _ )}
+%define gcc_pkgvers 4.5.2
+%define gcc_version 4.5.2
+%define gcc_rpmvers %{expand:%(echo "4.5.2" | tr - _ )}
 
 
 Name:         	i586-pc-freebsd8.2-gcc
@@ -41,7 +41,7 @@
 
 Group:	      	Development/Tools
 Version:        %{gcc_rpmvers}
-Release:      	0.20110310.0%{?dist}
+Release:      	0.20110321.1%{?dist}
 License:      	GPL
 URL:		http://gcc.gnu.org
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -243,9 +243,18 @@
 %global _gcclibdir %{_prefix}/lib
 
 Source0: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.0"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
+%endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 Source2:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
@@ -339,6 +348,9 @@
 
   languages="c"
   languages="$languages,c++"
+  case i586-pc-freebsd8.2 in
+  *-rtems4.11) optargs="$optargs --enable-libstdcxx-time";;
+  esac
   languages="$languages,fortran"
   languages="$languages,objc"
 %if "%{_build}" != "%{_host}"

diff -u rtems/contrib/crossrpms/freebsd8.2/x86_64/amd64-pc-freebsd8.2-gcc.spec:1.2 rtems/contrib/crossrpms/freebsd8.2/x86_64/amd64-pc-freebsd8.2-gcc.spec:1.3
--- rtems/contrib/crossrpms/freebsd8.2/x86_64/amd64-pc-freebsd8.2-gcc.spec:1.2	Thu Mar 10 01:03:20 2011
+++ rtems/contrib/crossrpms/freebsd8.2/x86_64/amd64-pc-freebsd8.2-gcc.spec	Mon Mar 21 03:48:28 2011
@@ -31,9 +31,9 @@
 %endif
 
 
-%define gcc_pkgvers 4.5.0
-%define gcc_version 4.5.0
-%define gcc_rpmvers %{expand:%(echo "4.5.0" | tr - _ )}
+%define gcc_pkgvers 4.5.2
+%define gcc_version 4.5.2
+%define gcc_rpmvers %{expand:%(echo "4.5.2" | tr - _ )}
 
 
 Name:         	amd64-pc-freebsd8.2-gcc
@@ -41,7 +41,7 @@
 
 Group:	      	Development/Tools
 Version:        %{gcc_rpmvers}
-Release:      	0.20110310.0%{?dist}
+Release:      	0.20110321.1%{?dist}
 License:      	GPL
 URL:		http://gcc.gnu.org
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -243,9 +243,18 @@
 %global _gcclibdir %{_prefix}/lib
 
 Source0: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.0"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
+%endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 Source2:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
@@ -339,6 +348,9 @@
 
   languages="c"
   languages="$languages,c++"
+  case amd64-pc-freebsd8.2 in
+  *-rtems4.11) optargs="$optargs --enable-libstdcxx-time";;
+  esac
   languages="$languages,fortran"
   languages="$languages,objc"
 %if "%{_build}" != "%{_host}"

diff -u rtems/contrib/crossrpms/netbsd5.0.2/i386/i386-pc-netbsdelf5.0.2-gcc.spec:1.12 rtems/contrib/crossrpms/netbsd5.0.2/i386/i386-pc-netbsdelf5.0.2-gcc.spec:1.13
--- rtems/contrib/crossrpms/netbsd5.0.2/i386/i386-pc-netbsdelf5.0.2-gcc.spec:1.12	Wed Mar  9 23:22:06 2011
+++ rtems/contrib/crossrpms/netbsd5.0.2/i386/i386-pc-netbsdelf5.0.2-gcc.spec	Mon Mar 21 03:48:28 2011
@@ -31,9 +31,9 @@
 %endif
 
 
-%define gcc_pkgvers 4.5.0
-%define gcc_version 4.5.0
-%define gcc_rpmvers %{expand:%(echo "4.5.0" | tr - _ )}
+%define gcc_pkgvers 4.5.2
+%define gcc_version 4.5.2
+%define gcc_rpmvers %{expand:%(echo "4.5.2" | tr - _ )}
 
 
 Name:         	i386-pc-netbsdelf5.0.2-gcc
@@ -41,7 +41,7 @@
 
 Group:	      	Development/Tools
 Version:        %{gcc_rpmvers}
-Release:      	0.20110310.0%{?dist}
+Release:      	0.20110321.1%{?dist}
 License:      	GPL
 URL:		http://gcc.gnu.org
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -246,9 +246,15 @@
 %if "%{gcc_version}" == "4.5.0"
 Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
 %endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 Source2:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
@@ -342,6 +348,9 @@
 
   languages="c"
   languages="$languages,c++"
+  case i386-pc-netbsdelf5.0.2 in
+  *-rtems4.11) optargs="$optargs --enable-libstdcxx-time";;
+  esac
   languages="$languages,fortran"
   languages="$languages,objc"
 %if "%{_build}" != "%{_host}"

diff -u rtems/contrib/crossrpms/netbsd5.0.2/x86_64/amd64-pc-netbsdelf5.0.2-gcc.spec:1.6 rtems/contrib/crossrpms/netbsd5.0.2/x86_64/amd64-pc-netbsdelf5.0.2-gcc.spec:1.7
--- rtems/contrib/crossrpms/netbsd5.0.2/x86_64/amd64-pc-netbsdelf5.0.2-gcc.spec:1.6	Wed Mar  9 23:22:06 2011
+++ rtems/contrib/crossrpms/netbsd5.0.2/x86_64/amd64-pc-netbsdelf5.0.2-gcc.spec	Mon Mar 21 03:48:28 2011
@@ -31,9 +31,9 @@
 %endif
 
 
-%define gcc_pkgvers 4.5.0
-%define gcc_version 4.5.0
-%define gcc_rpmvers %{expand:%(echo "4.5.0" | tr - _ )}
+%define gcc_pkgvers 4.5.2
+%define gcc_version 4.5.2
+%define gcc_rpmvers %{expand:%(echo "4.5.2" | tr - _ )}
 
 
 Name:         	amd64-pc-netbsdelf5.0.2-gcc
@@ -41,7 +41,7 @@
 
 Group:	      	Development/Tools
 Version:        %{gcc_rpmvers}
-Release:      	0.20110310.0%{?dist}
+Release:      	0.20110321.1%{?dist}
 License:      	GPL
 URL:		http://gcc.gnu.org
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -246,9 +246,15 @@
 %if "%{gcc_version}" == "4.5.0"
 Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
 %endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 Source2:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
@@ -342,6 +348,9 @@
 
   languages="c"
   languages="$languages,c++"
+  case amd64-pc-netbsdelf5.0.2 in
+  *-rtems4.11) optargs="$optargs --enable-libstdcxx-time";;
+  esac
   languages="$languages,fortran"
   languages="$languages,objc"
 %if "%{_build}" != "%{_host}"

diff -u rtems/contrib/crossrpms/netbsd5.1/i386/i386-pc-netbsdelf5.1-gcc.spec:1.1 rtems/contrib/crossrpms/netbsd5.1/i386/i386-pc-netbsdelf5.1-gcc.spec:1.2
--- rtems/contrib/crossrpms/netbsd5.1/i386/i386-pc-netbsdelf5.1-gcc.spec:1.1	Sun Mar 20 12:11:52 2011
+++ rtems/contrib/crossrpms/netbsd5.1/i386/i386-pc-netbsdelf5.1-gcc.spec	Mon Mar 21 03:48:28 2011
@@ -31,9 +31,9 @@
 %endif
 
 
-%define gcc_pkgvers 4.5.0
-%define gcc_version 4.5.0
-%define gcc_rpmvers %{expand:%(echo "4.5.0" | tr - _ )}
+%define gcc_pkgvers 4.5.2
+%define gcc_version 4.5.2
+%define gcc_rpmvers %{expand:%(echo "4.5.2" | tr - _ )}
 
 
 Name:         	i386-pc-netbsdelf5.1-gcc
@@ -41,7 +41,7 @@
 
 Group:	      	Development/Tools
 Version:        %{gcc_rpmvers}
-Release:      	0.20110320.0%{?dist}
+Release:      	0.20110321.1%{?dist}
 License:      	GPL
 URL:		http://gcc.gnu.org
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -246,9 +246,15 @@
 %if "%{gcc_version}" == "4.5.0"
 Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
 %endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 Source2:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-fortran-%{gcc_pkgvers}.tar.bz2

diff -u rtems/contrib/crossrpms/netbsd5.1/x86_64/amd64-pc-netbsdelf5.1-gcc.spec:1.1 rtems/contrib/crossrpms/netbsd5.1/x86_64/amd64-pc-netbsdelf5.1-gcc.spec:1.2
--- rtems/contrib/crossrpms/netbsd5.1/x86_64/amd64-pc-netbsdelf5.1-gcc.spec:1.1	Sun Mar 20 12:11:52 2011
+++ rtems/contrib/crossrpms/netbsd5.1/x86_64/amd64-pc-netbsdelf5.1-gcc.spec	Mon Mar 21 03:48:28 2011
@@ -31,9 +31,9 @@
 %endif
 
 
-%define gcc_pkgvers 4.5.0
-%define gcc_version 4.5.0
-%define gcc_rpmvers %{expand:%(echo "4.5.0" | tr - _ )}
+%define gcc_pkgvers 4.5.2
+%define gcc_version 4.5.2
+%define gcc_rpmvers %{expand:%(echo "4.5.2" | tr - _ )}
 
 
 Name:         	amd64-pc-netbsdelf5.1-gcc
@@ -41,7 +41,7 @@
 
 Group:	      	Development/Tools
 Version:        %{gcc_rpmvers}
-Release:      	0.20110320.0%{?dist}
+Release:      	0.20110321.1%{?dist}
 License:      	GPL
 URL:		http://gcc.gnu.org
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -246,9 +246,15 @@
 %if "%{gcc_version}" == "4.5.0"
 Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.0-rtems4.11-20100609.diff
 %endif
+%if "%{gcc_version}" == "4.5.2"
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.2-rtems4.11-20110220.diff
+%endif
 %{?_without_sources:NoSource:	0}
 
 Source1: 	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+%if "%{gcc_version}" == "4.5.2" 
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.2-rtems4.11-20110131.diff
+%endif
 %{?_without_sources:NoSource:	1}
 
 Source2:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-fortran-%{gcc_pkgvers}.tar.bz2

diff -u rtems/cpukit/zlib/preinstall.am:1.7 rtems/cpukit/zlib/preinstall.am:1.8
--- rtems/cpukit/zlib/preinstall.am:1.7	Mon Jan  8 02:43:28 2007
+++ rtems/cpukit/zlib/preinstall.am	Sat Mar 19 02:44:05 2011
@@ -11,7 +11,7 @@
 all-local: $(TMPINSTALL_FILES)
 
 TMPINSTALL_FILES =
-CLEANFILES = $(TMPINSTALL_FILES)
+CLEANFILES += $(TMPINSTALL_FILES)
 
 all-am: $(PREINSTALL_FILES)
 


 *ralf*:
Abandon freebsd8.1

M   1.42  contrib/crossrpms/Makefile.am
M   1.83  contrib/crossrpms/configure.ac

diff -u rtems/contrib/crossrpms/Makefile.am:1.41 rtems/contrib/crossrpms/Makefile.am:1.42
--- rtems/contrib/crossrpms/Makefile.am:1.41	Sun Mar 20 12:09:47 2011
+++ rtems/contrib/crossrpms/Makefile.am	Mon Mar 21 06:17:26 2011
@@ -9,7 +9,6 @@
 DIST_SUBDIRS  = cygwin
 DIST_SUBDIRS += freebsd6.4
 DIST_SUBDIRS += freebsd7.3
-DIST_SUBDIRS += freebsd8.1
 DIST_SUBDIRS += freebsd8.2
 DIST_SUBDIRS += mingw32
 DIST_SUBDIRS += netbsd5.0.2

diff -u rtems/contrib/crossrpms/configure.ac:1.82 rtems/contrib/crossrpms/configure.ac:1.83
--- rtems/contrib/crossrpms/configure.ac:1.82	Sun Mar 20 12:09:47 2011
+++ rtems/contrib/crossrpms/configure.ac	Mon Mar 21 06:17:26 2011
@@ -147,10 +147,6 @@
 AC_CONFIG_FILES([freebsd7.3/Makefile])
 AC_CONFIG_FILES([freebsd7.3/i586/Makefile])
 
-AC_CONFIG_FILES([freebsd8.1/Makefile])
-AC_CONFIG_FILES([freebsd8.1/i586/Makefile])
-AC_CONFIG_FILES([freebsd8.1/x86_64/Makefile])
-
 AC_CONFIG_FILES([freebsd8.2/Makefile])
 AC_CONFIG_FILES([freebsd8.2/i586/Makefile])
 AC_CONFIG_FILES([freebsd8.2/x86_64/Makefile])


 *ralf*:
Abandon.

R    1.1  contrib/crossrpms/freebsd8.1/.cvsignore
R    1.1  contrib/crossrpms/freebsd8.1/Makefile.am
R    1.1  contrib/crossrpms/freebsd8.1/binutils.am
R    1.1  contrib/crossrpms/freebsd8.1/gcc-prep.add
R    1.1  contrib/crossrpms/freebsd8.1/gcc.am
R    1.1  contrib/crossrpms/freebsd8.1/i586/.cvsignore
R    1.5  contrib/crossrpms/freebsd8.1/i586/Makefile.am
R    1.1  contrib/crossrpms/freebsd8.1/i586/binutils-sources.add
R    1.2  contrib/crossrpms/freebsd8.1/i586/gcc-sources.add
R    1.2  contrib/crossrpms/freebsd8.1/i586/i586-pc-freebsd8.1-binutils.spec
R    1.5  contrib/crossrpms/freebsd8.1/i586/i586-pc-freebsd8.1-gcc.spec
R    1.1  contrib/crossrpms/freebsd8.1/i586/i586-pc-freebsd8.1-libs.spec
R    1.1  contrib/crossrpms/freebsd8.1/i586/libs.add
R    1.1  contrib/crossrpms/freebsd8.1/i586/target-libs.add
R    1.1  contrib/crossrpms/freebsd8.1/libs.am
R    1.1  contrib/crossrpms/freebsd8.1/x86_64/.cvsignore
R    1.5  contrib/crossrpms/freebsd8.1/x86_64/Makefile.am
R    1.2  contrib/crossrpms/freebsd8.1/x86_64/amd64-pc-freebsd8.1-binutils.spec
R    1.5  contrib/crossrpms/freebsd8.1/x86_64/amd64-pc-freebsd8.1-gcc.spec
R    1.1  contrib/crossrpms/freebsd8.1/x86_64/amd64-pc-freebsd8.1-libs.spec
R    1.1  contrib/crossrpms/freebsd8.1/x86_64/binutils-sources.add
R    1.2  contrib/crossrpms/freebsd8.1/x86_64/gcc-sources.add
R    1.1  contrib/crossrpms/freebsd8.1/x86_64/libs.add
R    1.1  contrib/crossrpms/freebsd8.1/x86_64/target-libs.add


--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20110321/92311e1a/attachment.html>


More information about the vc mailing list