Move all patches to the rtems-tools.git repo.

All patches are now downloaded. No patches or source is held
in the RTEMS Source Builder repo.

As part of this the build sets now have a single rtems_arch define
and the base RTEMS 4.11 build set now creates the _target macro.
With this change a method to manage RTEMS specific patches has been
put in place where build sets can define patches. This avoids needing
special configuration files.
This commit is contained in:
Chris Johns 2013-03-11 10:58:40 +11:00
parent 5cba075c71
commit 48e1cd44ee
50 changed files with 176 additions and 209670 deletions

1
rtems/.gitignore vendored
View File

@ -1,5 +1,6 @@
*~ *~
sources sources
patches
tar tar
build build
*.txt *.txt

View File

@ -2,10 +2,10 @@
# Tools Set for RTEMS ARM 4.11 Stable # Tools Set for RTEMS ARM 4.11 Stable
# #
%define _target arm-rtems4.11
%define release 1 %define release 1
%define rtems_arch arm
# #
# The RTEMS 4.11 base defines. # The RTEMS 4.11 base defines.
# #
@ -19,7 +19,7 @@
# #
# Patch to enable EABI # Patch to enable EABI
# #
Patch2: gcc-4.7-arm-to-eabi-20120511.diff %define rtems_gcc_patch2 %{rtems_gcc_patches}/arm/gcc-4.7-arm-to-eabi-20120511.diff
# #
# Tools configuration. # Tools configuration.

View File

@ -4,6 +4,8 @@
%define release 1 %define release 1
%define rtems_arch none
# #
# The RTEMS 4.11 base defines. # The RTEMS 4.11 base defines.
# #

View File

@ -2,10 +2,10 @@
# Tools Set for RTEMS AVR 4.11 Stable # Tools Set for RTEMS AVR 4.11 Stable
# #
%define _target avr-rtems4.11
%define release 1 %define release 1
%define rtems_arch avr
# #
# The RTEMS 4.11 base defines. # The RTEMS 4.11 base defines.
# #

View File

@ -2,10 +2,10 @@
# Tools Set for RTEMS BFIN 4.11 Stable # Tools Set for RTEMS BFIN 4.11 Stable
# #
%define _target bfin-rtems4.11
%define release 1 %define release 1
%define rtems_arch bfin
# #
# The RTEMS 4.11 base defines. # The RTEMS 4.11 base defines.
# #

View File

@ -2,10 +2,10 @@
# Tools Set for RTEMS H8300 4.11 Stable # Tools Set for RTEMS H8300 4.11 Stable
# #
%define _target h8300-rtems4.11
%define release 1 %define release 1
%define rtems_arch h8300
# #
# The RTEMS 4.11 base defines. # The RTEMS 4.11 base defines.
# #

View File

@ -2,10 +2,10 @@
# Tools Set for RTEMS i386 4.11 Stable # Tools Set for RTEMS i386 4.11 Stable
# #
%define _target i386-rtems4.11
%define release 1 %define release 1
%define rtems_arch i386
# #
# The RTEMS 4.11 base defines. # The RTEMS 4.11 base defines.
# #

View File

@ -2,10 +2,10 @@
# Tools Set for RTEMS LM32 4.11 Stable # Tools Set for RTEMS LM32 4.11 Stable
# #
%define _target lm32-rtems4.11
%define release 1 %define release 1
%define rtems_arch lm32
# #
# The RTEMS 4.11 base defines. # The RTEMS 4.11 base defines.
# #

View File

@ -2,10 +2,10 @@
# Tools Set for RTEMS M32C 4.11 Stable # Tools Set for RTEMS M32C 4.11 Stable
# #
%define _target m32c-rtems4.11
%define release 1 %define release 1
%define rtems_arch m32c
# #
# The RTEMS 4.11 base defines. # The RTEMS 4.11 base defines.
# #

View File

@ -2,10 +2,10 @@
# Tools Set for RTEMS M32R 4.11 Stable # Tools Set for RTEMS M32R 4.11 Stable
# #
%define _target m32r-rtems4.11
%define release 1 %define release 1
%define rtems_arch m32r
# #
# The RTEMS 4.11 base defines. # The RTEMS 4.11 base defines.
# #

View File

@ -2,10 +2,10 @@
# Tools Set for RTEMS M68K 4.11 Stable # Tools Set for RTEMS M68K 4.11 Stable
# #
%define _target m68k-rtems4.11
%define release 1 %define release 1
%define rtems_arch m68k
# #
# The RTEMS 4.11 base defines. # The RTEMS 4.11 base defines.
# #

View File

@ -2,19 +2,24 @@
# Tools Set for RTEMS Microblaze 4.11 Stable # Tools Set for RTEMS Microblaze 4.11 Stable
# #
%define _target microblaze-rtems4.11
%define release 1 %define release 1
%define rtems_arch microblaze
# #
# The RTEMS 4.11 base defines. # The RTEMS 4.11 base defines.
# #
%include rtems-4.11-base.bset %include rtems-4.11-base.bset
#
# GCC 4.7.2 Microblaze Patch
#
%define rtems_gcc_patch2 %{rtems_gcc_patches}/gcc/microblaze/gcc-4.7.2-microblaze-ldscript-2.diff
# #
# Tools configuration. # Tools configuration.
# #
expat-2.1.0-1 expat-2.1.0-1
tools/rtems-binutils-2.22-1 tools/rtems-binutils-2.22-1
tools/rtems-microblaze-gcc-4.7.2-newlib-2.0.0-1 tools/rtems-gcc-4.7.2-newlib-2.0.0-1
tools/rtems-gdb-7.5.1-1 tools/rtems-gdb-7.5.1-1

View File

@ -2,20 +2,26 @@
# Tools Set for RTEMS MIPS 4.11 Stable # Tools Set for RTEMS MIPS 4.11 Stable
# #
%define _target mips-rtems4.11
%define release 1 %define release 1
%define rtems_arch mips
# #
# The RTEMS 4.11 base defines. # The RTEMS 4.11 base defines.
# #
%include rtems-4.11-base.bset %include rtems-4.11-base.bset
#
# Newlib 2.0.0 Patches
#
%define rtems_gcc_patch12 %{rtems_newlib_patches}/mips/newlib-2.0.0-mips-memcpy-20130107.diff
%define rtems_gcc_patch13 %{rtems_newlib_patches}/mips/newlib-2.0.0-mips-memcpy-20130219.diff
# #
# Tools configuration. # Tools configuration.
# #
expat-2.1.0-1 expat-2.1.0-1
tools/rtems-binutils-2.22-1 tools/rtems-binutils-2.22-1
tools/rtems-mips-gcc-4.7.2-newlib-2.0.0-1 tools/rtems-gcc-4.7.2-newlib-2.0.0-1
tools/rtems-gdb-7.5.1-1 tools/rtems-gdb-7.5.1-1
tools/rtems-mipstx39-gdb-7.5.1-1 tools/rtems-mipstx39-gdb-7.5.1-1

View File

@ -2,15 +2,20 @@
# Tools Set for RTEMS Moxie 4.11 Stable # Tools Set for RTEMS Moxie 4.11 Stable
# #
%define _target moxie-rtems4.11
%define release 1 %define release 1
%define rtems_arch moxie
# #
# The RTEMS 4.11 base defines. # The RTEMS 4.11 base defines.
# #
%include rtems-4.11-base.bset %include rtems-4.11-base.bset
#
# Moxie Binutils patches
#
%define rtems_bintutils_patch1 %{rtems_binutils_patches}/moxie/binutils-2.22-rtems4.11-moxie-20130214.diff
# #
# Tools configuration. # Tools configuration.
# #

View File

@ -4,13 +4,9 @@
# The NIOS source is a special version released by Altera. # The NIOS source is a special version released by Altera.
# #
%define rtems_version 4.11
%define release 1 %define release 1
%define _target nios2-rtems%{rtems_version} %define rtems_arch nios2
package: rtems-%{rtems_version}-%{_target}-%{release}
# #
# The RTEMS 4.11 base defines. # The RTEMS 4.11 base defines.

View File

@ -2,10 +2,10 @@
# Tools Set for RTEMS SH 4.11 Stable # Tools Set for RTEMS SH 4.11 Stable
# #
%define _target sh-rtems4.11
%define release 1 %define release 1
%define rtems_arch sh
# #
# The RTEMS 4.11 base defines. # The RTEMS 4.11 base defines.
# #

View File

@ -2,10 +2,10 @@
# Tools Set for RTEMS SPARC 4.11 Stable # Tools Set for RTEMS SPARC 4.11 Stable
# #
%define _target sparc-rtems4.11
%define release 1 %define release 1
%define rtems_arch sparc
# #
# The RTEMS 4.11 base defines. # The RTEMS 4.11 base defines.
# #

View File

@ -2,10 +2,10 @@
# Tools Set for RTEMS SPARC64 4.11 Stable # Tools Set for RTEMS SPARC64 4.11 Stable
# #
%define _target sparc64-rtems4.11
%define release 1 %define release 1
%define rtems_arch sparc64
# #
# The RTEMS 4.11 base defines. # The RTEMS 4.11 base defines.
# #

View File

@ -2,10 +2,10 @@
# Tools Set for RTEMS V850 4.11 Stable # Tools Set for RTEMS V850 4.11 Stable
# #
%define _target v850-rtems4.11
%define release 1 %define release 1
%define rtems_arch v850
# #
# The RTEMS 4.11 base defines. # The RTEMS 4.11 base defines.
# #

View File

@ -4,9 +4,27 @@
%define rtems_version 4.11 %define rtems_version 4.11
#
# Define the build target.
#
%define _target %{rtems_arch}-rtems%{rtems_version}
#
# The generic package name.
#
package: rtems-%{rtems_version}-%{_target}-%{release} package: rtems-%{rtems_version}-%{_target}-%{release}
# #
# Project custom message # Project custom message
# #
%define gcc_version_message RTEMS %{rtems_version} RSB-%{release},gcc-%{gcc_version}/newlib-%{newlib_version} %define gcc_version_message RTEMS %{rtems_version}-rsb-%{release},gcc-%{gcc_version}/newlib-%{newlib_version}
#
# The RTEMS http git URL.
#
%define rtems_http_git http://git.rtems.org/rtems-tools.git/plain/tools/%{rtems_version}
%define rtems_git_tools %{rtems_http_git}/rtems-tools.git/plain/tools/%{rtems_version}
%define rtems_binutils_patches %{rtems_git_tools}/binutils
%define rtems_gcc_patches %{rtems_git_tools}/gcc
%define rtems_newlib_patches %{rtems_git_tools}/newlib
%define rtems_gdb_patches %{rtems_git_tools}/gdb

View File

@ -0,0 +1,27 @@
#
# Manage RTEMS Binutils specific patches in the build sets
#
%if %{defined rtems_binutils_patch1}
Patch1: %{rtems_binutils_patch1}
%endif
%if %{defined rtems_binutils_patch2}
Patch2: %{rtems_binutils_patch2}
%endif
%if %{defined rtems_binutils_patch3}
Patch3: %{rtems_binutils_patch3}
%endif
%if %{defined rtems_binutils_patch4}
Patch4: %{rtems_binutils_patch4}
%endif
%if %{defined rtems_binutils_patch11}
Patch11: %{rtems_binutils_patch11}
%endif
%if %{defined rtems_binutils_patch12}
Patch12: %{rtems_binutils_patch12}
%endif
%if %{defined rtems_binutils_patch13}
Patch13: %{rtems_binutils_patch13}
%endif
%if %{defined rtems_binutils_patch14}
Patch14: %{rtems_binutils_patch14}
%endif

View File

@ -0,0 +1,27 @@
#
# Manage RTEMS GCC/Newlib specific patches in the build sets
#
%if %{defined rtems_gcc_patch1}
Patch1: %{rtems_gcc_patch1}
%endif
%if %{defined rtems_gcc_patch2}
Patch2: %{rtems_gcc_patch2}
%endif
%if %{defined rtems_gcc_patch3}
Patch3: %{rtems_gcc_patch3}
%endif
%if %{defined rtems_gcc_patch4}
Patch4: %{rtems_gcc_patch4}
%endif
%if %{defined rtems_gcc_patch11}
Patch11: %{rtems_gcc_patch11}
%endif
%if %{defined rtems_gcc_patch12}
Patch12: %{rtems_gcc_patch12}
%endif
%if %{defined rtems_gcc_patch13}
Patch13: %{rtems_gcc_patch13}
%endif
%if %{defined rtems_gcc_patch14}
Patch14: %{rtems_gcc_patch14}
%endif

View File

@ -0,0 +1,27 @@
#
# Manage RTEMS GDB specific patches in the build sets
#
%if %{defined rtems_gdb_patch1}
Patch1: %{rtems_gdb_patch1}
%endif
%if %{defined rtems_gdb_patch2}
Patch2: %{rtems_gdb_patch2}
%endif
%if %{defined rtems_gdb_patch3}
Patch3: %{rtems_gdb_patch3}
%endif
%if %{defined rtems_gdb_patch4}
Patch4: %{rtems_gdb_patch4}
%endif
%if %{defined rtems_gdb_patch11}
Patch11: %{rtems_gdb_patch11}
%endif
%if %{defined rtems_gdb_patch12}
Patch12: %{rtems_gdb_patch12}
%endif
%if %{defined rtems_gdb_patch13}
Patch13: %{rtems_gdb_patch13}
%endif
%if %{defined rtems_gdb_patch14}
Patch14: %{rtems_gdb_patch14}
%endif

View File

@ -7,9 +7,8 @@
%define binutils_version 2.22 %define binutils_version 2.22
Patch0: binutils-2.22-rtems4.11-20120427.diff Patch0: %{rtems_binutils_patches}/binutils-2.22-rtems4.11-20120427.diff
Patch1: binutils-2.22-rtems4.11-moxie-20130214.diff %include rtems-binutils-patches.cfg
# #
# The binutils build instructions. We use 2.xx Release 1. # The binutils build instructions. We use 2.xx Release 1.
# #

View File

@ -26,7 +26,8 @@
# #
# Libiberty strsignal fix # Libiberty strsignal fix
# #
Patch2: gcc-4.5.3-strsignal-1.diff Patch0: %{rtems_gcc_patches}/gcc-4.5.3-strsignal-1.diff
%include rtems-gcc-patches.cfg
# #
# The gcc/newlib build instructions. We use 4.5 Release 1. # The gcc/newlib build instructions. We use 4.5 Release 1.

View File

@ -47,8 +47,9 @@
# #
# The RTEMS 4.11 patches # The RTEMS 4.11 patches
# #
Patch0: gcc-4.7.2-rtems4.11-20121026.diff Patch0: %{rtems_gcc_patches}/gcc-4.7.2-rtems4.11-20121026.diff
Patch10: newlib-1.20.0-rtems4.11-20121011.diff Patch10: %{rtems_newlib_patches}/newlib-1.20.0-rtems4.11-20121011.diff
%include rtems-gcc-patches.cfg
# #
# The gcc/newlib build instructions. We use 4.7 Release 1. # The gcc/newlib build instructions. We use 4.7 Release 1.

View File

@ -26,7 +26,8 @@
# #
# The RTEMS 4.11 patches # The RTEMS 4.11 patches
# #
Patch0: gcc-4.7.2-rtems4.11-20121026.diff Patch0: %{rtems_gcc_patches}/gcc-4.7.2-rtems4.11-20121026.diff
%include rtems-gcc-patches.cfg
# #
# The gcc/newlib build instructions. We use 4.7 Release 1. # The gcc/newlib build instructions. We use 4.7 Release 1.

View File

@ -7,7 +7,8 @@
%define gdb_version 7.5 %define gdb_version 7.5
Patch0: gdb-7.5-rtems4.11-20121003.diff Patch0: %{rtems_gdb_patches}/gdb-7.5-rtems4.11-20121003.diff
%include rtems-gdb-patches.cfg
# #
# The gdb build instructions. We use 7.xx Release 1. # The gdb build instructions. We use 7.xx Release 1.

View File

@ -7,6 +7,11 @@
%define gdb_version 7.5.1 %define gdb_version 7.5.1
#
# RTEMS Build Set patches.
#
%include rtems-gdb-patches.cfg
# #
# The gdb build instructions. We use 7.xx Release 1. # The gdb build instructions. We use 7.xx Release 1.
# #

View File

@ -14,7 +14,7 @@
# Source # Source
# #
Source0: http://www.rtems.org/ftp/pub/rtems/people/chrisj/nios/nios2-binutils-2.20.tar.bz2 Source0: http://www.rtems.org/ftp/pub/rtems/people/chrisj/nios/nios2-binutils-2.20.tar.bz2
Patch0: nios2-binutils-2.20-rtems-20110703.diff Patch0: %{rtems_binutils_patches}/nios2/nios2-binutils-2.20-rtems-20110703.diff
# #
# The binutils build instructions. We use 2.xx Release 1. # The binutils build instructions. We use 2.xx Release 1.

View File

@ -1,6 +1,8 @@
# #
# RTEMS NIOS2 GCC 4.1., Newlib 1.19.0 # RTEMS NIOS2 GCC 4.1., Newlib 1.19.0
# #
# This configuration has special support for the NIOS2.
#
%include %{_configdir}/checks.cfg %include %{_configdir}/checks.cfg
%include %{_configdir}/base.cfg %include %{_configdir}/base.cfg
@ -16,13 +18,8 @@
# #
# The RTEMS 4.11 patches # The RTEMS 4.11 patches
# #
Patch0: nios2-gcc-4.1-rtems-20110818.diff Patch0: %{rtems_gcc_patches}/nios2/nios2-gcc-4.1-rtems-20110818.diff
Patch10: nios2-newlib-1.19.0-rtems-20110720.diff Patch10: %{rtems_newlib_patches}/nios2/nios2-newlib-1.19.0-rtems-20110720.diff
#
# Project custom message
#
%define gcc_version_message RTEMS %{rtems_version}-%{release},gcc-%{gcc_version}/newlib-%{newlib_version}
Name: %{_target}-gcc-%{gcc_version}-newlib-%{newlib_version}-%{release} Name: %{_target}-gcc-%{gcc_version}-newlib-%{newlib_version}-%{release}
Summary: GCC v%{gcc_version} and Newlib v%{newlib_version} for target %{_target} on host %{_host} Summary: GCC v%{gcc_version} and Newlib v%{newlib_version} for target %{_target} on host %{_host}

View File

@ -1,47 +0,0 @@
diff -Naur binutils-2.20.1.orig/bfd/ChangeLog.rtems binutils-2.20.1/bfd/ChangeLog.rtems
--- binutils-2.20.1.orig/bfd/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
+++ binutils-2.20.1/bfd/ChangeLog.rtems 2010-08-26 05:03:08.221352824 +0200
@@ -0,0 +1,6 @@
+2010-08-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/11939
+ * elflink.c (elf_link_add_object_symbols): Don't set
+ unique_global for non-ELF hash link table.
+
diff -Naur binutils-2.20.1.orig/bfd/elflink.c binutils-2.20.1/bfd/elflink.c
--- binutils-2.20.1.orig/bfd/elflink.c 2009-09-10 13:47:12.000000000 +0200
+++ binutils-2.20.1/bfd/elflink.c 2010-08-26 05:03:08.225352726 +0200
@@ -4154,7 +4154,8 @@
h = (struct elf_link_hash_entry *) h->root.u.i.link;
*sym_hash = h;
- h->unique_global = (flags & BSF_GNU_UNIQUE) != 0;
+ if (is_elf_hash_table (htab))
+ h->unique_global = (flags & BSF_GNU_UNIQUE) != 0;
new_weakdef = FALSE;
if (dynamic
diff -Naur binutils-2.20.1.orig/bfd/Makefile.am binutils-2.20.1/bfd/Makefile.am
--- binutils-2.20.1.orig/bfd/Makefile.am 2010-03-03 14:31:55.000000000 +0100
+++ binutils-2.20.1/bfd/Makefile.am 2010-08-26 05:02:54.181352514 +0200
@@ -4,7 +4,7 @@
ACLOCAL_AMFLAGS = -I . -I .. -I ../config
# Uncomment the following line when doing a release.
-# RELEASE=y
+RELEASE=y
INCDIR = $(srcdir)/../include
CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
diff -Naur binutils-2.20.1.orig/bfd/Makefile.in binutils-2.20.1/bfd/Makefile.in
--- binutils-2.20.1.orig/bfd/Makefile.in 2010-03-03 14:59:15.000000000 +0100
+++ binutils-2.20.1/bfd/Makefile.in 2010-08-26 05:02:54.181352514 +0200
@@ -317,7 +317,7 @@
ACLOCAL_AMFLAGS = -I . -I .. -I ../config
# Uncomment the following line when doing a release.
-# RELEASE=y
+RELEASE = y
INCDIR = $(srcdir)/../include
CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
SUBDIRS = doc po

View File

@ -1,568 +0,0 @@
diff -Naur binutils-2.22.orig/bfd/ChangeLog binutils-2.22/bfd/ChangeLog
--- binutils-2.22.orig/bfd/ChangeLog 2011-11-21 12:55:49.000000000 +0100
+++ binutils-2.22/bfd/ChangeLog 2012-04-27 06:43:05.275941484 +0200
@@ -1,3 +1,14 @@
+2012-04-27 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ Backport from mainline:
+
+ 2012-04-24 Alan Modra <amodra@gmail.com>
+ PR ld/13991
+ * bfd/elf-bfd.h (_bfd_elf_link_just_syms): Define as
+ _bfd_generic_link_just_syms.
+ * bfd/elflink.c (_bfd_elf_link_just_syms): Delete.
+ * bfd/linker.c (_bfd_generic_link_just_syms): Set sec_info_type.
+
2011-11-21 Tristan Gingold <gingold@adacore.com>
* configure.in: Bump version to 2.22
diff -Naur binutils-2.22.orig/bfd/elf-bfd.h binutils-2.22/bfd/elf-bfd.h
--- binutils-2.22.orig/bfd/elf-bfd.h 2011-08-17 02:39:38.000000000 +0200
+++ binutils-2.22/bfd/elf-bfd.h 2012-04-27 06:43:05.275941484 +0200
@@ -1807,8 +1807,7 @@
(bfd *, asection *, void *);
extern asection *_bfd_elf_check_kept_section
(asection *, struct bfd_link_info *);
-extern void _bfd_elf_link_just_syms
- (asection *, struct bfd_link_info *);
+#define _bfd_elf_link_just_syms _bfd_generic_link_just_syms
extern void _bfd_elf_copy_link_hash_symbol_type
(bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *);
extern bfd_boolean _bfd_elf_size_group_sections
diff -Naur binutils-2.22.orig/bfd/elflink.c binutils-2.22/bfd/elflink.c
--- binutils-2.22.orig/bfd/elflink.c 2011-11-21 10:29:26.000000000 +0100
+++ binutils-2.22/bfd/elflink.c 2012-04-27 06:43:05.285941042 +0200
@@ -1,6 +1,6 @@
/* ELF linking support for BFD.
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009, 2010, 2011
+ 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -6644,17 +6644,6 @@
return TRUE;
}
-/* Indicate that we are only retrieving symbol values from this
- section. */
-
-void
-_bfd_elf_link_just_syms (asection *sec, struct bfd_link_info *info)
-{
- if (is_elf_hash_table (info->hash))
- sec->sec_info_type = ELF_INFO_TYPE_JUST_SYMS;
- _bfd_generic_link_just_syms (sec, info);
-}
-
/* Make sure sec_info_type is cleared if sec_info is cleared too. */
static void
diff -Naur binutils-2.22.orig/bfd/linker.c binutils-2.22/bfd/linker.c
--- binutils-2.22.orig/bfd/linker.c 2011-09-16 03:15:19.000000000 +0200
+++ binutils-2.22/bfd/linker.c 2012-04-27 06:43:05.287940980 +0200
@@ -1,6 +1,6 @@
/* linker.c -- BFD linker routines
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+ 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support
@@ -810,6 +810,7 @@
_bfd_generic_link_just_syms (asection *sec,
struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
+ sec->sec_info_type = ELF_INFO_TYPE_JUST_SYMS;
sec->output_section = bfd_abs_section_ptr;
sec->output_offset = sec->vma;
}
diff -Naur binutils-2.22.orig/binutils/ar.c binutils-2.22/binutils/ar.c
--- binutils-2.22.orig/binutils/ar.c 2011-11-21 10:29:28.000000000 +0100
+++ binutils-2.22/binutils/ar.c 2012-04-27 06:43:05.288940951 +0200
@@ -37,7 +37,6 @@
#include "filenames.h"
#include "binemul.h"
#include "plugin.h"
-#include <sys/stat.h>
#ifdef __GO32___
#define EXT_NAME_LEN 3 /* Bufflen of addition to name if it's MS-DOS. */
diff -Naur binutils-2.22.orig/binutils/bucomm.c binutils-2.22/binutils/bucomm.c
--- binutils-2.22.orig/binutils/bucomm.c 2011-03-25 18:51:10.000000000 +0100
+++ binutils-2.22/binutils/bucomm.c 2012-04-27 06:43:05.289940923 +0200
@@ -1,6 +1,6 @@
/* bucomm.c -- Bin Utils COMmon code.
Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002,
- 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+ 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -29,7 +29,6 @@
#include "filenames.h"
#include "libbfd.h"
-#include <sys/stat.h>
#include <time.h> /* ctime, maybe time_t */
#include <assert.h>
#include "bucomm.h"
diff -Naur binutils-2.22.orig/binutils/budbg.h binutils-2.22/binutils/budbg.h
--- binutils-2.22.orig/binutils/budbg.h 2009-09-02 09:22:31.000000000 +0200
+++ binutils-2.22/binutils/budbg.h 2012-04-27 06:43:05.289940923 +0200
@@ -1,5 +1,5 @@
/* budbg.c -- Interfaces to the generic debugging information routines.
- Copyright 1995, 1996, 2002, 2003, 2005, 2007, 2008
+ Copyright 1995, 1996, 2002, 2003, 2005, 2007, 2008, 2012
Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
@@ -23,8 +23,6 @@
#ifndef BUDBG_H
#define BUDBG_H
-#include <stdio.h>
-
/* Routine used to read generic debugging information. */
extern void *read_debugging_info (bfd *, asymbol **, long, bfd_boolean);
diff -Naur binutils-2.22.orig/binutils/ChangeLog binutils-2.22/binutils/ChangeLog
--- binutils-2.22.orig/binutils/ChangeLog 2011-11-21 10:29:28.000000000 +0100
+++ binutils-2.22/binutils/ChangeLog 2012-04-27 06:43:05.287940980 +0200
@@ -1,3 +1,25 @@
+2012-02-09 Alan Modra <amodra@gmail.com>
+
+ * sysdep.h: Include sys/stat.h here.
+ * ar.c: Don't include headers already included by sysdep.h.
+ * bucomm.c: Likewise.
+ * budbg.h: Likewise.
+ * dlltool.h: Likewise.
+ * elfedit.c: Likewise.
+ * nlmconv.c: Likewise.
+ * objcopy.c: Likewise.
+ * objdump.c: Likewise.
+ * objdump.h: Likewise.
+ * readelf.c: Likewise.
+ * rename.c: Likewise.
+ * resrc.c: Likewise.
+ * strings.c: Likewise.
+ * windres.c: Likewise.
+ * od-xcoff.c: Likewise.
+ * dllwrap.c: Remove alloca pragma handled by sysdep.h, and
+ remove duplicate headers.
+ * dlltool.c: Likewise and ensure #include sysdep.h is first.
+
2011-10-25 Alan Modra <amodra@gmail.com>
Apply mainline patches
diff -Naur binutils-2.22.orig/binutils/dlltool.c binutils-2.22/binutils/dlltool.c
--- binutils-2.22.orig/binutils/dlltool.c 2010-12-01 15:15:06.000000000 +0100
+++ binutils-2.22/binutils/dlltool.c 2012-04-27 06:43:05.290940897 +0200
@@ -1,6 +1,6 @@
/* dlltool.c -- tool to generate stuff for PE style DLLs
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -232,15 +232,6 @@
.idata$7 = dll name (eg: "kernel32.dll"). (.idata$6 for ppc). */
-/* AIX requires this to be the first thing in the file. */
-#ifndef __GNUC__
-# ifdef _AIX
- #pragma alloca
-#endif
-#endif
-
-#define show_allnames 0
-
#include "sysdep.h"
#include "bfd.h"
#include "libiberty.h"
@@ -252,8 +243,6 @@
#include "safe-ctype.h"
#include <time.h>
-#include <sys/stat.h>
-#include <stdarg.h>
#include <assert.h>
#ifdef DLLTOOL_ARM
@@ -319,6 +308,8 @@
#endif /* defined (_WIN32) && ! defined (__CYGWIN32__) */
#endif /* ! HAVE_SYS_WAIT_H */
+#define show_allnames 0
+
/* ifunc and ihead data structures: ttk@cygnus.com 1997
When IMPORT declarations are encountered in a .def file the
diff -Naur binutils-2.22.orig/binutils/dlltool.h binutils-2.22/binutils/dlltool.h
--- binutils-2.22.orig/binutils/dlltool.h 2009-10-23 16:53:56.000000000 +0200
+++ binutils-2.22/binutils/dlltool.h 2012-04-27 06:43:05.291940872 +0200
@@ -1,5 +1,6 @@
/* dlltool.h -- header file for dlltool
- Copyright 1997, 1998, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 2003, 2004, 2005, 2007, 2009, 2012
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -18,9 +19,6 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "ansidecl.h"
-#include <stdio.h>
-
extern void def_code (int);
extern void def_data (int);
extern void def_description (const char *);
diff -Naur binutils-2.22.orig/binutils/dllwrap.c binutils-2.22/binutils/dllwrap.c
--- binutils-2.22.orig/binutils/dllwrap.c 2010-07-15 09:58:47.000000000 +0200
+++ binutils-2.22/binutils/dllwrap.c 2012-04-27 06:43:05.291940872 +0200
@@ -1,6 +1,6 @@
/* dllwrap.c -- wrapper for DLLTOOL and GCC to generate PE style DLLs
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009
- Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009,
+ 2011, 2012 Free Software Foundation, Inc.
Contributed by Mumit Khan (khan@xraylith.wisc.edu).
This file is part of GNU Binutils.
@@ -20,13 +20,6 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-/* AIX requires this to be the first thing in the file. */
-#ifndef __GNUC__
-# ifdef _AIX
- #pragma alloca
-#endif
-#endif
-
#include "sysdep.h"
#include "bfd.h"
#include "libiberty.h"
@@ -35,7 +28,6 @@
#include "bucomm.h"
#include <time.h>
-#include <sys/stat.h>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
diff -Naur binutils-2.22.orig/binutils/elfedit.c binutils-2.22/binutils/elfedit.c
--- binutils-2.22.orig/binutils/elfedit.c 2011-07-22 22:22:34.000000000 +0200
+++ binutils-2.22/binutils/elfedit.c 2012-04-27 06:43:05.292940848 +0200
@@ -1,5 +1,5 @@
/* elfedit.c -- Update the ELF header of an ELF format file
- Copyright 2010
+ Copyright 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -19,10 +19,8 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "config.h"
#include "sysdep.h"
#include <assert.h>
-#include <sys/stat.h>
#if __GNUC__ >= 2
/* Define BFD64 here, even if our default architecture is 32 bit ELF
diff -Naur binutils-2.22.orig/binutils/nlmconv.c binutils-2.22/binutils/nlmconv.c
--- binutils-2.22.orig/binutils/nlmconv.c 2011-02-28 19:32:51.000000000 +0100
+++ binutils-2.22/binutils/nlmconv.c 2012-04-27 06:43:05.293940825 +0200
@@ -1,6 +1,7 @@
/* nlmconv.c -- NLM conversion program
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -42,8 +43,6 @@
#include "ansidecl.h"
#include <time.h>
-#include <sys/stat.h>
-#include <sys/file.h>
#include <assert.h>
#include "getopt.h"
diff -Naur binutils-2.22.orig/binutils/objcopy.c binutils-2.22/binutils/objcopy.c
--- binutils-2.22.orig/binutils/objcopy.c 2011-09-16 06:23:17.000000000 +0200
+++ binutils-2.22/binutils/objcopy.c 2012-04-27 06:43:05.294940804 +0200
@@ -1,6 +1,6 @@
/* objcopy.c -- copy object file from input to output, optionally massaging it.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -30,7 +30,6 @@
#include "filenames.h"
#include "fnmatch.h"
#include "elf-bfd.h"
-#include <sys/stat.h>
#include "libbfd.h"
#include "coff/internal.h"
#include "libcoff.h"
diff -Naur binutils-2.22.orig/binutils/objdump.c binutils-2.22/binutils/objdump.c
--- binutils-2.22.orig/binutils/objdump.c 2011-05-16 14:22:12.000000000 +0200
+++ binutils-2.22/binutils/objdump.c 2012-04-27 06:43:05.295940784 +0200
@@ -1,7 +1,7 @@
/* objdump.c -- dump information about an object file.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
+ 2012 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -71,8 +71,6 @@
#include <sys/mman.h>
#endif
-#include <sys/stat.h>
-
/* Internal headers for the ELF .stab-dump code - sorry. */
#define BYTES_IN_WORD 32
#include "aout/aout64.h"
diff -Naur binutils-2.22.orig/binutils/objdump.h binutils-2.22/binutils/objdump.h
--- binutils-2.22.orig/binutils/objdump.h 2011-05-16 14:22:12.000000000 +0200
+++ binutils-2.22/binutils/objdump.h 2012-04-27 06:43:05.296940765 +0200
@@ -1,5 +1,5 @@
/* objdump.h
- Copyright 2011 Free Software Foundation, Inc.
+ Copyright 2011, 2012 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -18,8 +18,6 @@
Foundation, 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
-#include <stdio.h>
-
struct objdump_private_option
{
/* Option name. */
diff -Naur binutils-2.22.orig/binutils/od-xcoff.c binutils-2.22/binutils/od-xcoff.c
--- binutils-2.22.orig/binutils/od-xcoff.c 2011-06-09 17:29:05.000000000 +0200
+++ binutils-2.22/binutils/od-xcoff.c 2012-04-27 06:43:05.297940754 +0200
@@ -1,5 +1,5 @@
/* od-xcoff.c -- dump information about an xcoff object file.
- Copyright 2011 Free Software Foundation, Inc.
+ Copyright 2011, 2012 Free Software Foundation, Inc.
Written by Tristan Gingold, Adacore.
This file is part of GNU Binutils.
@@ -19,9 +19,9 @@
Foundation, 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
+#include "sysdep.h"
#include <stddef.h>
#include <time.h>
-#include "sysdep.h"
#include "safe-ctype.h"
#include "bfd.h"
#include "objdump.h"
diff -Naur binutils-2.22.orig/binutils/readelf.c binutils-2.22/binutils/readelf.c
--- binutils-2.22.orig/binutils/readelf.c 2011-09-21 22:49:13.000000000 +0200
+++ binutils-2.22/binutils/readelf.c 2012-04-27 06:43:05.301940592 +0200
@@ -42,10 +42,8 @@
ELF file than is provided by objdump. In particular it can display DWARF
debugging information which (at the moment) objdump cannot. */
-#include "config.h"
#include "sysdep.h"
#include <assert.h>
-#include <sys/stat.h>
#include <time.h>
#ifdef HAVE_ZLIB_H
#include <zlib.h>
diff -Naur binutils-2.22.orig/binutils/rename.c binutils-2.22/binutils/rename.c
--- binutils-2.22.orig/binutils/rename.c 2009-09-02 09:22:32.000000000 +0200
+++ binutils-2.22/binutils/rename.c 2012-04-27 06:43:05.302940554 +0200
@@ -22,8 +22,6 @@
#include "bfd.h"
#include "bucomm.h"
-#include <sys/stat.h>
-
#ifdef HAVE_GOOD_UTIME_H
#include <utime.h>
#else /* ! HAVE_GOOD_UTIME_H */
diff -Naur binutils-2.22.orig/binutils/resrc.c binutils-2.22/binutils/resrc.c
--- binutils-2.22.orig/binutils/resrc.c 2010-11-17 04:35:50.000000000 +0100
+++ binutils-2.22/binutils/resrc.c 2012-04-27 06:43:05.303940522 +0200
@@ -32,11 +32,6 @@
#include "windres.h"
#include <assert.h>
-#include <errno.h>
-#include <sys/stat.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
diff -Naur binutils-2.22.orig/binutils/strings.c binutils-2.22/binutils/strings.c
--- binutils-2.22.orig/binutils/strings.c 2011-03-25 18:09:08.000000000 +0100
+++ binutils-2.22/binutils/strings.c 2012-04-27 06:43:05.303940522 +0200
@@ -1,6 +1,6 @@
/* strings -- print the strings of printable characters in files
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011
+ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -65,7 +65,6 @@
#include "getopt.h"
#include "libiberty.h"
#include "safe-ctype.h"
-#include <sys/stat.h>
#include "bucomm.h"
#define STRING_ISGRAPHIC(c) \
diff -Naur binutils-2.22.orig/binutils/sysdep.h binutils-2.22/binutils/sysdep.h
--- binutils-2.22.orig/binutils/sysdep.h 2009-03-18 12:27:17.000000000 +0100
+++ binutils-2.22/binutils/sysdep.h 2012-04-27 06:43:05.304940492 +0200
@@ -1,6 +1,6 @@
/* sysdep.h -- handle host dependencies for binutils
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009
+ 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2012
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -69,6 +69,10 @@
#endif
#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
#include "binary-io.h"
#if !HAVE_DECL_STPCPY
diff -Naur binutils-2.22.orig/binutils/windres.c binutils-2.22/binutils/windres.c
--- binutils-2.22.orig/binutils/windres.c 2011-06-02 15:43:18.000000000 +0200
+++ binutils-2.22/binutils/windres.c 2012-04-27 06:43:05.304940492 +0200
@@ -1,6 +1,6 @@
/* windres.c -- a program to manipulate Windows resources
Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008,
- 2009, 2011 Free Software Foundation, Inc.
+ 2009, 2011, 2012 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
Rewritten by Kai Tietz, Onevision.
@@ -45,7 +45,6 @@
#include "safe-ctype.h"
#include "obstack.h"
#include "windres.h"
-#include <sys/stat.h>
/* Used by resrc.c at least. */
diff -Naur binutils-2.22.orig/gas/testsuite/ChangeLog binutils-2.22/gas/testsuite/ChangeLog
--- binutils-2.22.orig/gas/testsuite/ChangeLog 2011-11-21 10:29:32.000000000 +0100
+++ binutils-2.22/gas/testsuite/ChangeLog 2012-04-27 06:43:05.305940465 +0200
@@ -8,6 +8,12 @@
* gas/mips/relax-swap3.s: New test source.
* gas/mips/mips.exp: Run the new tests.
+2011-10-24 Julian Brown <julian@codesourcery.com>
+
+ * gas/m68k/all.exp (movem-offset): Add test.
+ * gas/m68k/movem-offset.s: New test.
+ * gas/m68k/movem-offset.d: New.
+
2011-10-25 Alan Modra <amodra@gmail.com>
Apply mainline patches
diff -Naur binutils-2.22.orig/gas/testsuite/gas/m68k/all.exp binutils-2.22/gas/testsuite/gas/m68k/all.exp
--- binutils-2.22.orig/gas/testsuite/gas/m68k/all.exp 2011-09-07 22:56:09.000000000 +0200
+++ binutils-2.22/gas/testsuite/gas/m68k/all.exp 2012-04-27 06:43:05.305940465 +0200
@@ -52,6 +52,8 @@
run_dump_test mcf-movsr
run_dump_test mode5
run_dump_test mode5 "{name {cf}} {as {-mcpu=5200}}"
+ run_dump_test movem-offset
+ run_dump_test movem-offset "{name {cf}} {as {-mcpu=5485}}"
run_dump_test mcf-mac
run_dump_test mcf-emac
run_dump_test mcf-coproc
diff -Naur binutils-2.22.orig/gas/testsuite/gas/m68k/movem-offset.d binutils-2.22/gas/testsuite/gas/m68k/movem-offset.d
--- binutils-2.22.orig/gas/testsuite/gas/m68k/movem-offset.d 1970-01-01 01:00:00.000000000 +0100
+++ binutils-2.22/gas/testsuite/gas/m68k/movem-offset.d 2012-04-27 06:43:05.306940440 +0200
@@ -0,0 +1,14 @@
+#name: movem-offset
+#objdump: -d
+#as:
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0+ <.text>:
+ 0: 4cee 047c ffe8 moveml %fp@\(-24\),%d2-%d6/%a2
+ 6: 48ee 047c 0010 moveml %d2-%d6/%a2,%fp@\(16\)
+ c: 4cee 03ff ffe8 moveml %fp@\(-24\),%d0-%a1
+ 12: 48ee 03ff 0010 moveml %d0-%a1,%fp@\(16\)
+ \.\.\.
diff -Naur binutils-2.22.orig/gas/testsuite/gas/m68k/movem-offset.s binutils-2.22/gas/testsuite/gas/m68k/movem-offset.s
--- binutils-2.22.orig/gas/testsuite/gas/m68k/movem-offset.s 1970-01-01 01:00:00.000000000 +0100
+++ binutils-2.22/gas/testsuite/gas/m68k/movem-offset.s 2012-04-27 06:43:05.306940440 +0200
@@ -0,0 +1,8 @@
+
+ | Check that non-zero displacements work for movem.
+ .text
+ movem.l -24(%a6),#1148
+ movem.l #1148,16(%a6)
+ movem.l -24(%a6),%d0-%d7/%a0-%a1
+ movem.l %d0-%d7/%a0-%a1,16(%a6)
+ .p2align 4
diff -Naur binutils-2.22.orig/opcodes/ChangeLog binutils-2.22/opcodes/ChangeLog
--- binutils-2.22.orig/opcodes/ChangeLog 2011-11-21 10:29:39.000000000 +0100
+++ binutils-2.22/opcodes/ChangeLog 2012-04-27 06:43:05.306940440 +0200
@@ -1,3 +1,7 @@
+2011-10-24 Julian Brown <julian@codesourcery.com>
+
+ * m68k-opc.c (m68k_opcodes): Fix entries for ColdFire moveml.
+
2011-10-27 Peter Bergner <bergner@vnet.ibm.com>
* ppc-opc.c (powerpc_opcodes) <drrndq, drrndq., dtstexq, dctqpq,
diff -Naur binutils-2.22.orig/opcodes/m68k-opc.c binutils-2.22/opcodes/m68k-opc.c
--- binutils-2.22.orig/opcodes/m68k-opc.c 2011-09-07 22:56:09.000000000 +0200
+++ binutils-2.22/opcodes/m68k-opc.c 2012-04-27 06:43:05.307940418 +0200
@@ -1553,10 +1553,10 @@
{"moveml", 4, one(0044300), one(0177700), "#w>s", m68000up },
{"moveml", 4, one(0046300), one(0177700), "<sLw", m68000up },
{"moveml", 4, one(0046300), one(0177700), "<s#w", m68000up },
-{"moveml", 4, one(0044320), one(0177770), "Lwys", mcfisa_a },
-{"moveml", 4, one(0044320), one(0177770), "#wys", mcfisa_a },
-{"moveml", 4, one(0046320), one(0177770), "ysLw", mcfisa_a },
-{"moveml", 4, one(0046320), one(0177770), "ys#w", mcfisa_a },
+{"moveml", 4, one(0044300), one(0177700), "Lwys", mcfisa_a },
+{"moveml", 4, one(0044300), one(0177700), "#wys", mcfisa_a },
+{"moveml", 4, one(0046300), one(0177700), "ysLw", mcfisa_a },
+{"moveml", 4, one(0046300), one(0177700), "ys#w", mcfisa_a },
{"movepw", 2, one(0000410), one(0170770), "dsDd", m68000up },
{"movepw", 2, one(0000610), one(0170770), "Ddds", m68000up },

View File

@ -1,11 +0,0 @@
--- binutils-2.22/bfd/config.bfd.orig 2011-07-29 08:35:13.000000000 +1000
+++ binutils-2.22/bfd/config.bfd 2013-02-14 11:30:43.000000000 +1100
@@ -380,7 +380,7 @@
targ_selvecs=bfd_elf32_frv_vec
;;
- moxie-*-elf | moxie-*-rtems | moxie-*-uclinux)
+ moxie-*-elf | moxie-*-rtems* | moxie-*-uclinux)
targ_defvec=bfd_elf32_moxie_vec
;;

View File

@ -1,11 +0,0 @@
--- gcc-4.5.3/libiberty/strsignal.c.orig 2013-03-08 22:24:00.000000000 +0000
+++ gcc-4.5.3/libiberty/strsignal.c 2013-03-08 22:24:53.000000000 +0000
@@ -551,7 +551,7 @@
#ifndef HAVE_PSIGNAL
void
-psignal (int signo, char *message)
+psignal (int signo, const char *message)
{
if (signal_names == NULL)
{

View File

@ -1,102 +0,0 @@
commit a48b4fb1619e628f8ead188bc6687696e5468b0e
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date: Fri May 4 09:30:32 2012 +0200
ARM RTEMS changes
2012-04-04 Sebastian Huber <sebastian.huber@embedded-brains.de>
* config.gcc (arm*-*-rtemself*): New.
(arm*-*-rtems*): Removed.
(arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*): Rename
"arm*-*-rtemseabi*" to "arm*-*-rtems*".
2012-04-04 Sebastian Huber <sebastian.huber@embedded-brains.de>
* config.host (arm*-*-rtemself*): New.
(arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*): Rename
"arm*-*-rtemseabi*" to "arm*-*-rtems*".
diff --git a/gcc/config.gcc b/gcc/config.gcc
index a2c947d..27864b4 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -251,7 +251,7 @@ case ${target} in
| arm*-*-elf \
| arm*-*-freebsd* \
| arm*-*-linux* \
- | arm*-*-rtems* \
+ | arm*-*-rtemself* \
| arm*-*-uclinux* \
| arm*-wince-pe* \
| mips-sgi-irix6.5 \
@@ -885,7 +885,12 @@ arm*-*-ecos-elf)
tm_file="dbxelf.h elfos.h newlib-stdint.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/ecos-elf.h"
tmake_file="arm/t-arm arm/t-arm-elf"
;;
-arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*)
+arm*-*-rtemself*)
+ tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h newlib-stdint.h"
+ tmake_file="arm/t-arm arm/t-arm-elf t-rtems arm/t-rtems"
+ use_gcc_stdint=provide
+ ;;
+arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
# The BPABI long long divmod functions return a 128-bit value in
# registers r0-r3. Correctly modeling that requires the use of
# TImode.
@@ -899,9 +904,10 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*)
tmake_file="${tmake_file} arm/t-bpabi"
use_gcc_stdint=wrap
;;
- arm*-*-rtemseabi*)
+ arm*-*-rtems*)
tm_file="${tm_file} rtems.h arm/rtems-eabi.h newlib-stdint.h"
tmake_file="${tmake_file} arm/t-bpabi t-rtems arm/t-rtems-eabi"
+ use_gcc_stdint=provide
;;
arm*-*-symbianelf*)
tm_file="${tm_file} arm/symbian.h"
@@ -912,10 +918,6 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*)
esac
tm_file="${tm_file} arm/aout.h arm/arm.h"
;;
-arm*-*-rtems*)
- tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h newlib-stdint.h"
- tmake_file="arm/t-arm arm/t-arm-elf t-rtems arm/t-rtems"
- ;;
arm*-*-elf)
tm_file="dbxelf.h elfos.h newlib-stdint.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
tmake_file="arm/t-arm arm/t-arm-elf"
diff --git a/libgcc/config.host b/libgcc/config.host
index 79be4ed..da6ffc2 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -354,11 +354,15 @@ arm*-*-ecos-elf)
tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
extra_parts="$extra_parts crti.o crtn.o"
;;
-arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*)
+arm*-*-rtemself*)
+ tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
+ extra_parts="$extra_parts crti.o crtn.o"
+ ;;
+arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
tmake_file="${tmake_file} arm/t-arm arm/t-elf t-fixedpoint-gnu-prefix"
tm_file="$tm_file arm/bpabi-lib.h"
case ${host} in
- arm*-*-eabi* | arm*-*-rtemseabi*)
+ arm*-*-eabi* | arm*-*-rtems*)
tmake_file="${tmake_file} arm/t-bpabi"
extra_parts="crtbegin.o crtend.o crti.o crtn.o"
;;
@@ -371,10 +375,6 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*)
tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
unwind_header=config/arm/unwind-arm.h
;;
-arm*-*-rtems*)
- tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
- extra_parts="$extra_parts crti.o crtn.o"
- ;;
arm*-*-elf)
tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
extra_parts="$extra_parts crti.o crtn.o"

View File

@ -1,427 +0,0 @@
diff -Naur gcc-4.7.2.orig/gcc/ChangeLog.rtems gcc-4.7.2/gcc/ChangeLog.rtems
--- gcc-4.7.2.orig/gcc/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.7.2/gcc/ChangeLog.rtems 2012-10-26 08:51:45.747520538 +0200
@@ -0,0 +1,73 @@
+2012-10-26 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/avr/t-rtems: Remove LIB1ASMFUNCS filter.
+
+2012-10-26 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/v850/rtems.h: Undef WCHAR_TYPE_SIZE, WCHAR_TYPE.
+
+2012-10-26 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config.gcc (sparc-*-rtems*, sparc64-*-rtems*): Remove extra_parts.
+
+2012-07-05 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config.gcc (sparc64-*-rtems*): Remove sparc/t-crtin, sparc/t-crtfm.
+ Add sparc/t-rtems-64.
+ * config/sparc/t-rtems-64: New.
+
+2012-07-04 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/sparc/t-rtems: Resurrect gcc-4.6.x multilibs.
+
+2012-04-19 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config.gcc (microblaze*-*-rtems*): New target.
+ * config/microblaze/rtems.h: New.
+ * config/microblaze/t-rtems: New.
+
+2011-10-28 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/avr/rtems.h: Remove __USE_INIT_FINI__.
+
+2011-06-20 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * sparc/t-rtems: Reflect introduction of sparc/t-crtin.
+
+2011-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * config.gcc (sparc-*-rtems*, sparc64-*-rtems*):
+ Add sparc/t-rtems, crti.o crtn.o.
+ * config/sparc/t-rtems: New.
+
+2011-03-22 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config.gcc (sparc64-rtems*): Remove sysv.h from tm_file.
+
+2010-05-19 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * config.gcc (sparc64-*-rtems*): New target.
+ * config/sparc/sp64-rtemself.h: New file.
+
+2010-04-19 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * ginclude/stddef.h: Define _MACHINE_ANSI_H_ if _X86_64_ANSI_H_ is
+ defined (Used by amd64-*-netbsdelf5.*).
+
+2010-04-18 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * ginclude/stddef.h: Define _MACHINE_ANSI_H_ if _I386_ANSI_H_ is
+ defined (Used by i386-*-netbsdelf5.*).
+
+2009-11-04 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/m32c/rtems.h, config/m68k/rtemself.h,
+ config/m68k/rtemself.h, config/sh/rtemself.h,
+ config/sparc/rtemself.h: Undef WCHAR_TYPE_SIZE, WCHAR_TYPE.
+ (Resets WCHAR_TYPE's to defaults. Prevents broken GCC tm_files
+ to interfere and cause wchar_t/wint_t incompatibilities).
+
+ Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/mips/elf.h: Remove NO_IMPLICIT_EXTERN_C.
+
diff -Naur gcc-4.7.2.orig/gcc/config/avr/rtems.h gcc-4.7.2/gcc/config/avr/rtems.h
--- gcc-4.7.2.orig/gcc/config/avr/rtems.h 2007-08-02 12:49:31.000000000 +0200
+++ gcc-4.7.2/gcc/config/avr/rtems.h 2012-10-26 08:51:45.749520570 +0200
@@ -23,6 +23,5 @@
#define TARGET_OS_CPP_BUILTINS() \
do { \
builtin_define ("__rtems__"); \
- builtin_define ("__USE_INIT_FINI__"); \
builtin_assert ("system=rtems"); \
} while (0)
diff -Naur gcc-4.7.2.orig/gcc/config/h8300/h8300.h gcc-4.7.2/gcc/config/h8300/h8300.h
--- gcc-4.7.2.orig/gcc/config/h8300/h8300.h 2012-08-06 16:34:27.000000000 +0200
+++ gcc-4.7.2/gcc/config/h8300/h8300.h 2012-10-26 08:51:45.750520586 +0200
@@ -129,6 +129,7 @@
#define INCOMING_FRAME_SP_OFFSET (POINTER_SIZE / 8)
#define DWARF_CIE_DATA_ALIGNMENT 2
+#define DWARF2_ADDR_SIZE 4
/* Define this if addresses of constant functions
shouldn't be put through pseudo regs where they can be cse'd.
diff -Naur gcc-4.7.2.orig/gcc/config/m32c/rtems.h gcc-4.7.2/gcc/config/m32c/rtems.h
--- gcc-4.7.2.orig/gcc/config/m32c/rtems.h 2008-12-01 17:34:42.000000000 +0100
+++ gcc-4.7.2/gcc/config/m32c/rtems.h 2012-10-26 08:51:45.750520586 +0200
@@ -29,5 +29,9 @@
} \
while (0)
-/* Use the default */
+/* Use the defaults */
#undef LINK_GCC_C_SEQUENCE_SPEC
+
+#undef WCHAR_TYPE
+
+#undef WCHAR_TYPE_SIZE
diff -Naur gcc-4.7.2.orig/gcc/config/m68k/rtemself.h gcc-4.7.2/gcc/config/m68k/rtemself.h
--- gcc-4.7.2.orig/gcc/config/m68k/rtemself.h 2007-08-02 12:49:31.000000000 +0200
+++ gcc-4.7.2/gcc/config/m68k/rtemself.h 2012-10-26 08:51:45.750520586 +0200
@@ -31,3 +31,8 @@
builtin_assert ("system=rtems"); \
} \
while (0)
+
+/* Use the defaults */
+#undef WCHAR_TYPE
+
+#undef WCHAR_TYPE_SIZE
diff -Naur gcc-4.7.2.orig/gcc/config/microblaze/rtems.h gcc-4.7.2/gcc/config/microblaze/rtems.h
--- gcc-4.7.2.orig/gcc/config/microblaze/rtems.h 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.7.2/gcc/config/microblaze/rtems.h 2012-10-26 08:51:45.751520602 +0200
@@ -0,0 +1,25 @@
+/* Definitions for rtems targeting a microblaze using ELF.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+/* Specify predefined symbols in preprocessor. */
+
+#define TARGET_OS_CPP_BUILTINS() do { \
+ builtin_define( "__rtems__" ); \
+ builtin_assert( "system=rtems" ); \
+} while (0)
diff -Naur gcc-4.7.2.orig/gcc/config/microblaze/t-rtems gcc-4.7.2/gcc/config/microblaze/t-rtems
--- gcc-4.7.2.orig/gcc/config/microblaze/t-rtems 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.7.2/gcc/config/microblaze/t-rtems 2012-10-26 08:51:45.751520602 +0200
@@ -0,0 +1 @@
+# Custom multilibs for RTEMS
diff -Naur gcc-4.7.2.orig/gcc/config/mips/elf.h gcc-4.7.2/gcc/config/mips/elf.h
--- gcc-4.7.2.orig/gcc/config/mips/elf.h 2010-11-21 01:54:14.000000000 +0100
+++ gcc-4.7.2/gcc/config/mips/elf.h 2012-10-26 08:51:45.751520602 +0200
@@ -47,5 +47,3 @@
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend%O%s crtn%O%s"
-
-#define NO_IMPLICIT_EXTERN_C 1
diff -Naur gcc-4.7.2.orig/gcc/config/rs6000/rtems.h gcc-4.7.2/gcc/config/rs6000/rtems.h
--- gcc-4.7.2.orig/gcc/config/rs6000/rtems.h 2011-12-06 23:49:57.000000000 +0100
+++ gcc-4.7.2/gcc/config/rs6000/rtems.h 2012-10-26 08:51:45.751520602 +0200
@@ -69,3 +69,7 @@
rs6000_spe_abi = 1; \
} \
} while(0)
+
+#undef WCHAR_TYPE
+
+#undef WCHAR_TYPE_SIZE
diff -Naur gcc-4.7.2.orig/gcc/config/sh/rtemself.h gcc-4.7.2/gcc/config/sh/rtemself.h
--- gcc-4.7.2.orig/gcc/config/sh/rtemself.h 2007-08-02 12:49:31.000000000 +0200
+++ gcc-4.7.2/gcc/config/sh/rtemself.h 2012-10-26 08:51:45.752520618 +0200
@@ -24,3 +24,8 @@
builtin_define( "__rtems__" ); \
builtin_assert( "system=rtems" ); \
} while (0)
+
+/* Use the defaults */
+#undef WCHAR_TYPE
+
+#undef WCHAR_TYPE_SIZE
diff -Naur gcc-4.7.2.orig/gcc/config/sparc/rtemself.h gcc-4.7.2/gcc/config/sparc/rtemself.h
--- gcc-4.7.2.orig/gcc/config/sparc/rtemself.h 2007-08-02 12:49:31.000000000 +0200
+++ gcc-4.7.2/gcc/config/sparc/rtemself.h 2012-10-26 08:51:45.752520618 +0200
@@ -29,5 +29,9 @@
} \
while (0)
-/* Use the default */
+/* Use the defaults */
#undef LINK_GCC_C_SEQUENCE_SPEC
+
+#undef WCHAR_TYPE
+
+#undef WCHAR_TYPE_SIZE
diff -Naur gcc-4.7.2.orig/gcc/config/sparc/sp64-rtemself.h gcc-4.7.2/gcc/config/sparc/sp64-rtemself.h
--- gcc-4.7.2.orig/gcc/config/sparc/sp64-rtemself.h 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.7.2/gcc/config/sparc/sp64-rtemself.h 2012-10-26 08:51:45.752520618 +0200
@@ -0,0 +1,37 @@
+/* Definitions for rtems targeting a SPARC64 using ELF.
+ Copyright (C) 2010 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (joel@OARcorp.com).
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+/* Target OS builtins. */
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__rtems__"); \
+ builtin_define ("__USE_INIT_FINI__"); \
+ builtin_assert ("system=rtems"); \
+ } \
+ while (0)
+
+/* Use the default */
+#undef LINK_GCC_C_SEQUENCE_SPEC
+
+/* we are not svr4 */
+#undef CPP_SUBTARGET_SPEC
+#define CPP_SUBTARGET_SPEC ""
diff -Naur gcc-4.7.2.orig/gcc/config/sparc/t-rtems gcc-4.7.2/gcc/config/sparc/t-rtems
--- gcc-4.7.2.orig/gcc/config/sparc/t-rtems 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.7.2/gcc/config/sparc/t-rtems 2012-10-26 08:51:45.752520618 +0200
@@ -0,0 +1,22 @@
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+#
+
+MULTILIB_OPTIONS = msoft-float mcpu=v8
+MULTILIB_DIRNAMES = soft v8
+MULTILIB_MATCHES = msoft-float=mno-fpu
diff -Naur gcc-4.7.2.orig/gcc/config/sparc/t-rtems-64 gcc-4.7.2/gcc/config/sparc/t-rtems-64
--- gcc-4.7.2.orig/gcc/config/sparc/t-rtems-64 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.7.2/gcc/config/sparc/t-rtems-64 2012-10-26 08:51:45.753520635 +0200
@@ -0,0 +1,22 @@
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+#
+
+MULTILIB_OPTIONS = msoft-float
+MULTILIB_DIRNAMES = soft
+MULTILIB_MATCHES = msoft-float=mno-fpu
diff -Naur gcc-4.7.2.orig/gcc/config/v850/rtems.h gcc-4.7.2/gcc/config/v850/rtems.h
--- gcc-4.7.2.orig/gcc/config/v850/rtems.h 2012-07-18 17:34:46.000000000 +0200
+++ gcc-4.7.2/gcc/config/v850/rtems.h 2012-10-26 08:51:45.753520635 +0200
@@ -27,3 +27,8 @@
/* Map mv850e1 and mv850es to mv850e to match MULTILIB_MATCHES */
#undef ASM_SPEC
#define ASM_SPEC "%{mv850es:-mv850e} %{mv850e1:-mv850e} %{!mv850es:%{!mv850e1:%{mv*:-mv%*}}}"
+
+/* Use the defaults */
+#undef WCHAR_TYPE
+
+#undef WCHAR_TYPE_SIZE
diff -Naur gcc-4.7.2.orig/gcc/config.gcc gcc-4.7.2/gcc/config.gcc
--- gcc-4.7.2.orig/gcc/config.gcc 2012-09-12 11:03:54.000000000 +0200
+++ gcc-4.7.2/gcc/config.gcc 2012-10-26 08:51:45.749520570 +0200
@@ -1723,6 +1723,14 @@
c_target_objs="${c_target_objs} microblaze-c.o"
cxx_target_objs="${cxx_target_objs} microblaze-c.o"
;;
+microblaze*-*-rtems*)
+ tm_file="${tm_file} dbxelf.h"
+ tm_file="${tm_file} microblaze/rtems.h rtems.h newlib-stdint.h"
+ c_target_objs="${c_target_objs} microblaze-c.o"
+ cxx_target_objs="${cxx_target_objs} microblaze-c.o"
+ tmake_file="${tmake_file} microblaze/t-microblaze"
+ tmake_file="${tmake_file} t-rtems microblaze/t-rtems"
+ ;;
microblaze*-*-*)
tm_file="${tm_file} dbxelf.h"
c_target_objs="${c_target_objs} microblaze-c.o"
@@ -2404,7 +2412,7 @@
;;
sparc-*-rtems*)
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
- tmake_file="sparc/t-sparc sparc/t-elf t-rtems"
+ tmake_file="sparc/t-sparc sparc/t-elf sparc/t-rtems t-rtems"
;;
sparc-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
@@ -2457,8 +2465,8 @@
sparc64-*-rtems*)
tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
extra_options="${extra_options}"
- tmake_file="${tmake_file} sparc/t-sparc t-rtems"
- ;;
+ tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64 t-rtems"
+ ;;
sparc64-*-linux*)
tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default-64.h sparc/linux64.h sparc/tso.h"
extra_options="${extra_options} sparc/long-double-switch.opt"
diff -Naur gcc-4.7.2.orig/gcc/ginclude/stddef.h gcc-4.7.2/gcc/ginclude/stddef.h
--- gcc-4.7.2.orig/gcc/ginclude/stddef.h 2012-02-12 02:06:04.000000000 +0100
+++ gcc-4.7.2/gcc/ginclude/stddef.h 2012-10-26 08:51:45.753520635 +0200
@@ -53,7 +53,13 @@
one less case to deal with in the following. */
#if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__)
#include <machine/ansi.h>
+#if !defined(_MACHINE_ANSI_H_)
+#if defined(_I386_ANSI_H_) || defined(_X86_64_ANSI_H_)
+#define _MACHINE_ANSI_H_
#endif
+#endif
+#endif
+
/* On FreeBSD 5, machine/ansi.h does not exist anymore... */
#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
#include <sys/_types.h>
diff -Naur gcc-4.7.2.orig/libgcc/ChangeLog.rtems gcc-4.7.2/libgcc/ChangeLog.rtems
--- gcc-4.7.2.orig/libgcc/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.7.2/libgcc/ChangeLog.rtems 2012-10-26 08:51:45.753520635 +0200
@@ -0,0 +1,18 @@
+2012-07-10 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config.host (sh*-*-rtems*): Add sh*-*-elf*'s extra_parts.
+
+2012-07-05 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config.host (sparc64-*-rtems*): Remove sparc/t-elf.
+
+2012-05-16 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * config.host (m32r-*-rtems*): Include crtinit.o and crtfinit.o
+ as extra_parts.
+
+2012-03-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * config.host (powerpc-*-rtems*): Add rs6000/t-savresfgpr to
+ tmake_file.
+
diff -Naur gcc-4.7.2.orig/libgcc/config.host gcc-4.7.2/libgcc/config.host
--- gcc-4.7.2.orig/libgcc/config.host 2012-09-05 14:19:47.000000000 +0200
+++ gcc-4.7.2/libgcc/config.host 2012-10-26 08:51:45.754520652 +0200
@@ -693,6 +693,7 @@
;;
m32r-*-rtems*)
tmake_file="$tmake_file m32r/t-m32r t-fdpbit"
+ extra_parts="$extra_parts crtinit.o crtfini.o"
;;
m32rle-*-elf*)
tmake_file=t-fdpbit
@@ -891,7 +892,7 @@
extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
;;
powerpc-*-rtems*)
- tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
+ tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
;;
powerpc-*-linux* | powerpc64-*-linux*)
@@ -995,7 +996,10 @@
sh-*-rtems*)
tmake_file="$tmake_file sh/t-sh t-crtstuff-pic t-fdpbit"
extra_parts="$extra_parts crt1.o crti.o crtn.o crtbeginS.o crtendS.o \
- $sh_ic_extra_parts $sh_opt_extra_parts"
+ libic_invalidate_array_4-100.a \
+ libic_invalidate_array_4-200.a \
+ libic_invalidate_array_4a.a \
+ libgcc-Os-4-200.a libgcc-4-300.a"
;;
sh-wrs-vxworks)
tmake_file="$tmake_file sh/t-sh t-crtstuff-pic t-fdpbit"
@@ -1054,7 +1058,7 @@
extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
;;
sparc64-*-rtems*)
- tmake_file="$tmake_file sparc/t-elf t-crtfm"
+ tmake_file="$tmake_file t-crtfm"
extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
;;
sparc-wrs-vxworks)

File diff suppressed because it is too large Load Diff

View File

@ -1,575 +0,0 @@
diff -Naur gcc-4.6.3.orig/gcc/ChangeLog.rtems gcc-4.6.3/gcc/ChangeLog.rtems
--- gcc-4.6.3.orig/gcc/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.6.3/gcc/ChangeLog.rtems 2012-03-03 05:24:15.031387570 +0100
@@ -0,0 +1,94 @@
+2012-01-10 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/h8300/h8300.h: Apply DJ Delorie's patch from
+ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48231#c1.
+
+2011-10-28 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/avr/rtems.h: Remove __USE_INIT_FINI__.
+
+2011-09-05 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/lm32/t-rtems: New.
+ * config.gcc (lm32-*-rtems*): Add t-rtems.
+
+2011-07-15 Peter Dufault <dufault@hda.com>,
+ Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * config/rs6000/rtems.h (SUBSUBTARGET_OVERRIDE_OPTIONS):
+ Extend rs6000_spe handling.
+
+2011-06-20 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * sparc/t-rtems: Reflect introduction of sparc/t-crtin.
+
+2011-05-20 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * config.gcc (arm*-*-rtemseabi*): New target.
+ * config/arm/rtems-eabi.h: New.
+ * config/arm/t-rtems-eabi: New.
+
+2011-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * config.gcc (sparc-*-rtems*, sparc64-*-rtems*):
+ Add sparc/t-rtems, crti.o crtn.o.
+ * config/sparc/t-rtems: New.
+
+2011-03-22 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config.gcc (sparc64-rtems*): Remove sysv.h from tm_file.
+
+2011-02-20 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/rs6000/t-rtems: Add -mcpu=8540/-mfloat-gprs=double multilib.
+
+2011-02-20 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/rs6000/t-rtems: Remove -mcpu=601 multilib.
+ * config/rs6000/t-rtems: Remove -Dmpc8260 multilib.
+ * config/rs6000/rtems.h: Allow --float-gprs=... to override grps on
+ E500 targets.
+
+2010-05-19 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * config.gcc (sparc64-*-rtems*): New target.
+ * config/sparc/sp64-rtemself.h: New file.
+
+2010-04-19 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * ginclude/stddef.h: Define _MACHINE_ANSI_H_ if _X86_64_ANSI_H_ is
+ defined (Used by amd64-*-netbsdelf5.*).
+
+2010-04-18 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * ginclude/stddef.h: Define _MACHINE_ANSI_H_ if _I386_ANSI_H_ is
+ defined (Used by i386-*-netbsdelf5.*).
+
+2010-03-15 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ Patch from Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>:
+ * config/arm/rtems-elf.h, config/arm/t-rtems: Add optional support
+ for vfp FPU model
+
+2009-11-04 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/m32c/rtems.h, config/m68k/rtemself.h,
+ config/m68k/rtemself.h, config/sh/rtemself.h,
+ config/sparc/rtemself.h: Undef WCHAR_TYPE_SIZE, WCHAR_TYPE.
+ (Resets WCHAR_TYPE's to defaults. Prevents broken GCC tm_files
+ to interfere and cause wchar_t/wint_t incompatibilities).
+
+2009-10-15 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/avr/t-rtems: Don't build _exit.
+
+ Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/rs6000/rtems.h: Support for custom RTEMS multilibs.
+ Support TARGET_E500.
+ * config/rs6000/t-rtems: Custom RTEMS multilibs.
+
+ Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * config/mips/elf.h: Remove NO_IMPLICIT_EXTERN_C.
+
diff -Naur gcc-4.6.3.orig/gcc/config/arm/rtems-eabi.h gcc-4.6.3/gcc/config/arm/rtems-eabi.h
--- gcc-4.6.3.orig/gcc/config/arm/rtems-eabi.h 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.6.3/gcc/config/arm/rtems-eabi.h 2012-03-03 05:20:50.021229856 +0100
@@ -0,0 +1,33 @@
+/* Definitions for RTEMS based ARM systems using EABI
+ Copyright (C) 2011 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3, or (at your
+ option) any later version.
+
+ GCC is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
+/* Run-time Target Specification. */
+#undef TARGET_VERSION
+#define TARGET_VERSION fputs (" (ARM/EABI RTEMS)", stderr);
+
+#define HAS_INIT_SECTION
+
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS() \
+ do { \
+ builtin_define ("__rtems__"); \
+ builtin_define ("__USE_INIT_FINI__"); \
+ builtin_assert ("system=rtems"); \
+ TARGET_BPABI_CPP_BUILTINS(); \
+ } while (0)
diff -Naur gcc-4.6.3.orig/gcc/config/arm/rtems-elf.h gcc-4.6.3/gcc/config/arm/rtems-elf.h
--- gcc-4.6.3.orig/gcc/config/arm/rtems-elf.h 2009-03-25 13:54:16.000000000 +0100
+++ gcc-4.6.3/gcc/config/arm/rtems-elf.h 2012-03-03 05:20:35.110998213 +0100
@@ -36,7 +36,7 @@
*/
#undef SUBTARGET_EXTRA_ASM_SPEC
#define SUBTARGET_EXTRA_ASM_SPEC "\
- %{!mhard-float: %{!msoft-float:-mfpu=softfpa}}"
+ %{!mhard-float: %{!mfpu=vfp: %{!msoft-float:-mfpu=softfpa}}}"
/*
* The default includes --start-group and --end-group which conflicts
diff -Naur gcc-4.6.3.orig/gcc/config/arm/t-rtems gcc-4.6.3/gcc/config/arm/t-rtems
--- gcc-4.6.3.orig/gcc/config/arm/t-rtems 2004-11-23 06:30:32.000000000 +0100
+++ gcc-4.6.3/gcc/config/arm/t-rtems 2012-03-03 05:20:35.110998213 +0100
@@ -5,6 +5,41 @@
MULTILIB_EXCEPTIONS =
MULTILIB_MATCHES = marm=mno-thumb
-MULTILIB_OPTIONS += msoft-float/mhard-float
-MULTILIB_DIRNAMES += soft fpu
-MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*
+MULTILIB_OPTIONS += mhard-float/mfloat-abi=softfp
+MULTILIB_DIRNAMES += fpu softfp
+MULTILIB_EXCEPTIONS += *mthumb*/*mhard-float* *mthumb*/*mfloat-abi=softfp*
+MULTILIB_MATCHES =
+
+MULTILIB_OPTIONS += mfpu=vfp
+MULTILIB_DIRNAMES += vfp
+MULTILIB_EXCEPTIONS += *mhard-float*/*mfpu=vfp* *marm*/*mfloat-abi=softfp*/*mfpu=fpa*
+MULTILIB_EXCLUSIONS += !mthumb/mfloat-abi=softfp/!mfpu=vfp
+
+# default float model is fpa, so don't create a explicit copy of it
+MULTILIB_EXCEPTIONS += *marm*/*mfpa*
+
+# permutations of the options which are useful (+) or make no sense (-),
+# defaults are in brackets:
+# + (arm/soft/fpa)
+# + (arm/soft)/vfp
+# - (arm)/softfp(/fpa)
+# + (arm)/softfp/vfp
+# + (arm)/hard-float(/fpa)
+# - (arm)/hard-float/vfp
+# + thumb/(soft/fpa)
+# + thumb/(soft/)vfp
+# - thumb/softfp/fpa
+# - thumb/softfp/vfp
+# - thumb/hard-float/fpa
+# - thumb/hard-float/vfp
+
+# subdirs to be used for multilibs and their respective options:
+#/thumb/vfp -> thumb/soft/vfp
+#/thumb/fpa -> thumb/soft/fpa
+#/thumb -> thumb/soft/fpa
+#/vfp -> arm/soft/vfp
+#/softfp/vfp -> arm/softfp/cfp
+#/fpu/fpa -> arm/hard/fpa
+#/fpu -> arm/hard/fpa
+#/fpa -> arm/soft/fpa
+#. -> arm/soft/fpa
diff -Naur gcc-4.6.3.orig/gcc/config/arm/t-rtems-eabi gcc-4.6.3/gcc/config/arm/t-rtems-eabi
--- gcc-4.6.3.orig/gcc/config/arm/t-rtems-eabi 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.6.3/gcc/config/arm/t-rtems-eabi 2012-03-03 05:20:35.112998362 +0100
@@ -0,0 +1,6 @@
+# Custom RTEMS EABI multilibs
+
+MULTILIB_OPTIONS = mthumb march=armv6-m/march=armv7/march=armv7-m
+MULTILIB_DIRNAMES = thumb armv6-m armv7 armv7-m
+MULTILIB_EXCEPTIONS = march=armv6-m march=armv7 march=armv7-m
+MULTILIB_MATCHES = marm=mno-thumb
diff -Naur gcc-4.6.3.orig/gcc/config/avr/rtems.h gcc-4.6.3/gcc/config/avr/rtems.h
--- gcc-4.6.3.orig/gcc/config/avr/rtems.h 2007-08-02 12:49:31.000000000 +0200
+++ gcc-4.6.3/gcc/config/avr/rtems.h 2012-03-03 05:20:35.112998362 +0100
@@ -23,6 +23,5 @@
#define TARGET_OS_CPP_BUILTINS() \
do { \
builtin_define ("__rtems__"); \
- builtin_define ("__USE_INIT_FINI__"); \
builtin_assert ("system=rtems"); \
} while (0)
diff -Naur gcc-4.6.3.orig/gcc/config/avr/t-rtems gcc-4.6.3/gcc/config/avr/t-rtems
--- gcc-4.6.3.orig/gcc/config/avr/t-rtems 2004-11-23 04:44:03.000000000 +0100
+++ gcc-4.6.3/gcc/config/avr/t-rtems 2012-03-03 05:20:35.112998362 +0100
@@ -1,3 +1,4 @@
# Multilibs for avr RTEMS targets.
-# ATM, this is just a stub
+# RTEMS uses _exit from newlib
+LIB1ASMFUNCS := $(filter-out _exit,$(LIB1ASMFUNCS))
diff -Naur gcc-4.6.3.orig/gcc/config/h8300/h8300.h gcc-4.6.3/gcc/config/h8300/h8300.h
--- gcc-4.6.3.orig/gcc/config/h8300/h8300.h 2010-11-25 00:37:33.000000000 +0100
+++ gcc-4.6.3/gcc/config/h8300/h8300.h 2012-03-03 05:20:17.752732636 +0100
@@ -133,6 +133,7 @@
#define INCOMING_FRAME_SP_OFFSET (POINTER_SIZE / 8)
#define DWARF_CIE_DATA_ALIGNMENT 2
+#define DWARF2_ADDR_SIZE 4
/* Define this if addresses of constant functions
shouldn't be put through pseudo regs where they can be cse'd.
diff -Naur gcc-4.6.3.orig/gcc/config/lm32/t-rtems gcc-4.6.3/gcc/config/lm32/t-rtems
--- gcc-4.6.3.orig/gcc/config/lm32/t-rtems 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.6.3/gcc/config/lm32/t-rtems 2012-03-03 05:20:17.753732670 +0100
@@ -0,0 +1,21 @@
+# for multilib
+MULTILIB_OPTIONS = mmultiply-enabled mbarrel-shift-enabled
+MULTILIB_OPTIONS += mdivide-enabled msign-extend-enabled
+
+MULTILIB_EXCEPTIONS =
+# MULTILIB_EXCEPTIONS += mmultiply-enabled/mbarrel-shift-enabled/mdivide-enabled/msign-extend-enabled
+MULTILIB_EXCEPTIONS += mmultiply-enabled/mbarrel-shift-enabled/mdivide-enabled
+MULTILIB_EXCEPTIONS += mmultiply-enabled/mbarrel-shift-enabled/msign-extend-enabled
+#MULTILIB_EXCEPTIONS += mmultiply-enabled/mbarrel-shift-enabled
+MULTILIB_EXCEPTIONS += mmultiply-enabled/mdivide-enabled/msign-extend-enabled
+MULTILIB_EXCEPTIONS += mmultiply-enabled/mdivide-enabled
+MULTILIB_EXCEPTIONS += mmultiply-enabled/msign-extend-enabled
+# MULTILIB_EXCEPTIONS += mmultiply-enabled
+MULTILIB_EXCEPTIONS += mbarrel-shift-enabled/mdivide-enabled/msign-extend-enabled
+MULTILIB_EXCEPTIONS += mbarrel-shift-enabled/mdivide-enabled
+MULTILIB_EXCEPTIONS += mbarrel-shift-enabled/msign-extend-enabled
+# MULTILIB_EXCEPTIONS += mbarrel-shift-enabled
+MULTILIB_EXCEPTIONS += mdivide-enabled/msign-extend-enabled
+MULTILIB_EXCEPTIONS += mdivide-enabled
+MULTILIB_EXCEPTIONS += msign-extend-enabled
+# MULTILIB_EXCEPTIONS +=
diff -Naur gcc-4.6.3.orig/gcc/config/m32c/rtems.h gcc-4.6.3/gcc/config/m32c/rtems.h
--- gcc-4.6.3.orig/gcc/config/m32c/rtems.h 2008-12-01 17:34:42.000000000 +0100
+++ gcc-4.6.3/gcc/config/m32c/rtems.h 2012-03-03 05:20:17.754732701 +0100
@@ -29,5 +29,9 @@
} \
while (0)
-/* Use the default */
+/* Use the defaults */
#undef LINK_GCC_C_SEQUENCE_SPEC
+
+#undef WCHAR_TYPE
+
+#undef WCHAR_TYPE_SIZE
diff -Naur gcc-4.6.3.orig/gcc/config/m68k/rtemself.h gcc-4.6.3/gcc/config/m68k/rtemself.h
--- gcc-4.6.3.orig/gcc/config/m68k/rtemself.h 2007-08-02 12:49:31.000000000 +0200
+++ gcc-4.6.3/gcc/config/m68k/rtemself.h 2012-03-03 05:20:17.754732701 +0100
@@ -31,3 +31,8 @@
builtin_assert ("system=rtems"); \
} \
while (0)
+
+/* Use the defaults */
+#undef WCHAR_TYPE
+
+#undef WCHAR_TYPE_SIZE
diff -Naur gcc-4.6.3.orig/gcc/config/mips/elf.h gcc-4.6.3/gcc/config/mips/elf.h
--- gcc-4.6.3.orig/gcc/config/mips/elf.h 2010-11-21 01:54:14.000000000 +0100
+++ gcc-4.6.3/gcc/config/mips/elf.h 2012-03-03 05:20:02.669501121 +0100
@@ -47,5 +47,3 @@
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend%O%s crtn%O%s"
-
-#define NO_IMPLICIT_EXTERN_C 1
diff -Naur gcc-4.6.3.orig/gcc/config/rs6000/rtems.h gcc-4.6.3/gcc/config/rs6000/rtems.h
--- gcc-4.6.3.orig/gcc/config/rs6000/rtems.h 2007-08-02 12:49:31.000000000 +0200
+++ gcc-4.6.3/gcc/config/rs6000/rtems.h 2012-03-03 05:20:02.669501121 +0100
@@ -49,8 +49,27 @@
%{mcpu=604: %{!Dppc*: %{!Dmpc*: -Dmpc604} } } \
%{mcpu=750: %{!Dppc*: %{!Dmpc*: -Dmpc750} } } \
%{mcpu=821: %{!Dppc*: %{!Dmpc*: -Dmpc821} } } \
-%{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } }"
+%{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } } \
+%{mcpu=8540: %{!Dppc*: %{!Dmpc*: -Dppc8540} } }"
#undef SUBSUBTARGET_EXTRA_SPECS
#define SUBSUBTARGET_EXTRA_SPECS \
{ "cpp_os_rtems", CPP_OS_RTEMS_SPEC }
+
+#undef SUBSUBTARGET_OVERRIDE_OPTIONS
+#define SUBSUBTARGET_OVERRIDE_OPTIONS \
+ do { \
+ if (TARGET_E500) \
+ { \
+ if (TARGET_HARD_FLOAT && !rs6000_explicit_options.float_gprs) \
+ rs6000_float_gprs = 1; \
+ if (rs6000_float_gprs != 0 && !rs6000_explicit_options.spe) \
+ rs6000_spe = 1; \
+ if (rs6000_spe && !rs6000_explicit_options.spe_abi) \
+ rs6000_spe_abi = 1; \
+ } \
+ } while(0)
+
+#undef WCHAR_TYPE
+
+#undef WCHAR_TYPE_SIZE
diff -Naur gcc-4.6.3.orig/gcc/config/rs6000/t-rtems gcc-4.6.3/gcc/config/rs6000/t-rtems
--- gcc-4.6.3.orig/gcc/config/rs6000/t-rtems 2009-04-21 21:03:23.000000000 +0200
+++ gcc-4.6.3/gcc/config/rs6000/t-rtems 2012-03-03 05:20:02.670501093 +0100
@@ -19,14 +19,12 @@
# <http://www.gnu.org/licenses/>.
MULTILIB_OPTIONS = \
-mcpu=403/mcpu=505/mcpu=601/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400 \
-Dmpc8260 \
-msoft-float
+mcpu=403/mcpu=505/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400/mcpu=8540 \
+msoft-float/mfloat-gprs=double
MULTILIB_DIRNAMES = \
-m403 m505 m601 m603e m604 m860 m7400 \
-mpc8260 \
-nof
+m403 m505 m603e m604 m860 m7400 m8540 \
+nof gprsdouble
# MULTILIB_MATCHES = ${MULTILIB_MATCHES_FLOAT}
MULTILIB_MATCHES =
@@ -47,6 +45,13 @@
# Map 750 to .
MULTILIB_MATCHES += mcpu?750=
+# Map 8548 to 8540
+MULTILIB_MATCHES += mcpu?8540=mcpu?8548
+
+# Map -mcpu=8540 -mfloat-gprs=single to -mcpu=8540
+# (mfloat-gprs=single is implicit default)
+MULTILIB_MATCHES += mcpu?8540=mcpu?8540/mfloat-gprs?single
+
# Soft-float only, default implies msoft-float
# NOTE: Must match with MULTILIB_MATCHES_FLOAT and MULTILIB_MATCHES
MULTILIB_SOFTFLOAT_ONLY = \
@@ -62,6 +67,16 @@
MULTILIB_HARDFLOAT_ONLY = \
*mcpu=505/*msoft-float*
+# Targets which do not support gprs
+MULTILIB_NOGPRS = \
+mfloat-gprs=* \
+*mcpu=403/*mfloat-gprs=* \
+*mcpu=505/*mfloat-gprs=* \
+*mcpu=603e/*mfloat-gprs=* \
+*mcpu=604/*mfloat-gprs=* \
+*mcpu=860/*mfloat-gprs=* \
+*mcpu=7400/*mfloat-gprs=*
+
MULTILIB_EXCEPTIONS =
# Disallow -Dppc and -Dmpc without other options
@@ -69,14 +84,8 @@
MULTILIB_EXCEPTIONS += \
${MULTILIB_SOFTFLOAT_ONLY} \
-${MULTILIB_HARDFLOAT_ONLY}
+${MULTILIB_HARDFLOAT_ONLY} \
+${MULTILIB_NOGPRS}
# Special rules
# Take out all variants we don't want
-MULTILIB_EXCEPTIONS += *mcpu=403/Dmpc*
-MULTILIB_EXCEPTIONS += *mcpu=505/Dmpc*
-MULTILIB_EXCEPTIONS += *mcpu=601/Dmpc*
-MULTILIB_EXCEPTIONS += *mcpu=604/Dmpc*
-MULTILIB_EXCEPTIONS += *mcpu=750/Dmpc*
-MULTILIB_EXCEPTIONS += *mcpu=860/Dmpc*
-MULTILIB_EXCEPTIONS += *mcpu=7400/Dmpc*
diff -Naur gcc-4.6.3.orig/gcc/config/sh/rtemself.h gcc-4.6.3/gcc/config/sh/rtemself.h
--- gcc-4.6.3.orig/gcc/config/sh/rtemself.h 2007-08-02 12:49:31.000000000 +0200
+++ gcc-4.6.3/gcc/config/sh/rtemself.h 2012-03-03 05:19:46.591252722 +0100
@@ -24,3 +24,8 @@
builtin_define( "__rtems__" ); \
builtin_assert( "system=rtems" ); \
} while (0)
+
+/* Use the defaults */
+#undef WCHAR_TYPE
+
+#undef WCHAR_TYPE_SIZE
diff -Naur gcc-4.6.3.orig/gcc/config/sparc/rtemself.h gcc-4.6.3/gcc/config/sparc/rtemself.h
--- gcc-4.6.3.orig/gcc/config/sparc/rtemself.h 2007-08-02 12:49:31.000000000 +0200
+++ gcc-4.6.3/gcc/config/sparc/rtemself.h 2012-03-03 05:19:32.784040118 +0100
@@ -29,5 +29,9 @@
} \
while (0)
-/* Use the default */
+/* Use the defaults */
#undef LINK_GCC_C_SEQUENCE_SPEC
+
+#undef WCHAR_TYPE
+
+#undef WCHAR_TYPE_SIZE
diff -Naur gcc-4.6.3.orig/gcc/config/sparc/sp64-rtemself.h gcc-4.6.3/gcc/config/sparc/sp64-rtemself.h
--- gcc-4.6.3.orig/gcc/config/sparc/sp64-rtemself.h 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.6.3/gcc/config/sparc/sp64-rtemself.h 2012-03-03 05:19:32.784040118 +0100
@@ -0,0 +1,37 @@
+/* Definitions for rtems targeting a SPARC64 using ELF.
+ Copyright (C) 2010 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (joel@OARcorp.com).
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+/* Target OS builtins. */
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__rtems__"); \
+ builtin_define ("__USE_INIT_FINI__"); \
+ builtin_assert ("system=rtems"); \
+ } \
+ while (0)
+
+/* Use the default */
+#undef LINK_GCC_C_SEQUENCE_SPEC
+
+/* we are not svr4 */
+#undef CPP_SUBTARGET_SPEC
+#define CPP_SUBTARGET_SPEC ""
diff -Naur gcc-4.6.3.orig/gcc/config/sparc/t-rtems gcc-4.6.3/gcc/config/sparc/t-rtems
--- gcc-4.6.3.orig/gcc/config/sparc/t-rtems 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.6.3/gcc/config/sparc/t-rtems 2012-03-03 05:17:40.846315822 +0100
@@ -0,0 +1,18 @@
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+#
diff -Naur gcc-4.6.3.orig/gcc/config.gcc gcc-4.6.3/gcc/config.gcc
--- gcc-4.6.3.orig/gcc/config.gcc 2011-07-22 18:44:50.000000000 +0200
+++ gcc-4.6.3/gcc/config.gcc 2012-03-03 05:17:40.847315868 +0100
@@ -895,6 +895,17 @@
tm_file="${tm_file} arm/aout.h arm/arm.h"
tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
;;
+arm*-*-rtemseabi*)
+ need_64bit_hwint=yes
+ default_use_cxa_atexit=yes
+ tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
+ tm_file="${tm_file} ../../libgcc/config/arm/bpabi-lib.h"
+ tm_file="${tm_file} rtems.h arm/rtems-eabi.h newlib-stdint.h"
+ tm_file="${tm_file} arm/aout.h arm/arm.h"
+ tmake_file="arm/t-arm arm/t-arm-elf"
+ tmake_file="${tmake_file} arm/t-bpabi t-rtems arm/t-rtems-eabi"
+ tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
+ ;;
arm*-*-rtems*)
tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h newlib-stdint.h"
tmake_file="arm/t-arm arm/t-arm-elf t-rtems arm/t-rtems"
@@ -1666,6 +1677,7 @@
tm_file="dbxelf.h elfos.h ${tm_file} lm32/rtems.h rtems.h newlib-stdint.h"
tmake_file="${tmake_file} lm32/t-lm32 lm32/t-fprules-softfp soft-fp/t-softfp"
tmake_file="${tmake_file} t-rtems"
+ tmake_file="${tmake_file} lm32/t-rtems"
;;
lm32-*-uclinux*)
tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h lm32/uclinux-elf.h"
@@ -2540,8 +2552,8 @@
;;
sparc-*-rtems*)
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
- tmake_file="sparc/t-elf sparc/t-crtin sparc/t-crtfm t-rtems"
- extra_parts="crtbegin.o crtend.o"
+ tmake_file="sparc/t-elf sparc/t-crtin sparc/t-crtfm sparc/t-rtems t-rtems"
+ extra_parts="crtbegin.o crtend.o crtbegin.o crtend.o"
;;
sparc-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h"
@@ -2634,8 +2646,8 @@
sparc64-*-rtems*)
tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
extra_options="${extra_options} sparc/little-endian.opt"
- tmake_file="${tmake_file} sparc/t-crtin sparc/t-crtfm t-rtems"
- extra_parts="crtbegin.o crtend.o"
+ tmake_file="${tmake_file} sparc/t-crtin sparc/t-crtfm sparc/t-rtems t-rtems"
+ extra_parts="crtbegin.o crtend.o crtbegin.o crtend.o"
;;
sparc64-*-linux*)
tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/linux64.h"
diff -Naur gcc-4.6.3.orig/gcc/ginclude/stddef.h gcc-4.6.3/gcc/ginclude/stddef.h
--- gcc-4.6.3.orig/gcc/ginclude/stddef.h 2011-01-29 23:15:52.000000000 +0100
+++ gcc-4.6.3/gcc/ginclude/stddef.h 2012-03-03 05:17:21.301015027 +0100
@@ -53,7 +53,13 @@
one less case to deal with in the following. */
#if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__)
#include <machine/ansi.h>
+#if !defined(_MACHINE_ANSI_H_)
+#if defined(_I386_ANSI_H_) || defined(_X86_64_ANSI_H_)
+#define _MACHINE_ANSI_H_
#endif
+#endif
+#endif
+
/* On FreeBSD 5, machine/ansi.h does not exist anymore... */
#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
#include <sys/_types.h>
diff -Naur gcc-4.6.3.orig/libgcc/ChangeLog.rtems gcc-4.6.3/libgcc/ChangeLog.rtems
--- gcc-4.6.3.orig/libgcc/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.6.3/libgcc/ChangeLog.rtems 2012-03-03 05:17:01.297706638 +0100
@@ -0,0 +1,5 @@
+2010-08-17 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ 1669/Tools, GCC-BZ 44793
+ * config.host (powerpc-*-rtems*): Add tmake_file.
+ Add extra_parts.
diff -Naur gcc-4.6.3.orig/libgcc/config.host gcc-4.6.3/libgcc/config.host
--- gcc-4.6.3.orig/libgcc/config.host 2011-11-23 23:15:54.000000000 +0100
+++ gcc-4.6.3/libgcc/config.host 2012-03-03 05:17:01.297706638 +0100
@@ -474,6 +474,8 @@
tmake_file="${tmake_file} rs6000/t-ppccomm"
;;
powerpc-*-rtems*)
+ tmake_file="${tmake_file} rs6000/t-ppccomm t-softfp"
+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
;;
powerpc-*-linux* | powerpc64-*-linux*)
tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128 t-softfp"

View File

@ -1,104 +0,0 @@
diff -Naur gcc-4.4.7.orig/gcc/cp/cfns.h gcc-4.4.7/gcc/cp/cfns.h
--- gcc-4.4.7.orig/gcc/cp/cfns.h 2009-02-18 22:01:03.000000000 +0100
+++ gcc-4.4.7/gcc/cp/cfns.h 2012-03-14 17:15:52.880065289 +0100
@@ -1,5 +1,5 @@
-/* ANSI-C code produced by gperf version 3.0.1 */
-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C ../../gcc/cp/cfns.gperf */
+/* ANSI-C code produced by gperf version 3.0.3 */
+/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
@@ -57,13 +57,13 @@
400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 0, 0,
- 1, 400, 400, 400, 400, 400, 400, 400, 400, 400,
+ 1, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 28, 90, 0,
95, 0, 51, 93, 114, 26, 109, 124, 5, 1,
- 6, 13, 37, 128, 3, 0, 0, 49, 38, 0,
+ 6, 13, 37, 128, 3, 0, 0, 49, 38, 0,
104, 45, 0, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
@@ -84,29 +84,32 @@
switch (hval)
{
default:
- hval += asso_values[(unsigned char)str[5]+1];
+ hval += asso_values[(unsigned char)str[5]+1];
/*FALLTHROUGH*/
case 5:
- hval += asso_values[(unsigned char)str[4]];
+ hval += asso_values[(unsigned char)str[4]];
/*FALLTHROUGH*/
case 4:
- hval += asso_values[(unsigned char)str[3]];
+ hval += asso_values[(unsigned char)str[3]];
/*FALLTHROUGH*/
case 3:
- hval += asso_values[(unsigned char)str[2]];
+ hval += asso_values[(unsigned char)str[2]];
/*FALLTHROUGH*/
case 2:
- hval += asso_values[(unsigned char)str[1]];
+ hval += asso_values[(unsigned char)str[1]];
/*FALLTHROUGH*/
case 1:
- hval += asso_values[(unsigned char)str[0]];
- break;
+ hval += asso_values[(unsigned char)str[0]];
+ break;
}
return hval + asso_values[(unsigned char)str[len - 1]];
}
#ifdef __GNUC__
__inline
+#ifdef __GNUC_STDC_INLINE__
+__attribute__ ((__gnu_inline__))
+#endif
#endif
const char *
libc_name_p (register const char *str, register unsigned int len)
@@ -329,17 +332,17 @@
register int key = hash (str, len);
if (key <= MAX_HASH_VALUE && key >= 0)
- {
- register int index = lookup[key];
+ {
+ register int index = lookup[key];
- if (index >= 0)
- {
- register const char *s = wordlist[index];
-
- if (*str == *s && !strcmp (str + 1, s + 1))
- return s;
- }
- }
+ if (index >= 0)
+ {
+ register const char *s = wordlist[index];
+
+ if (*str == *s && !strcmp (str + 1, s + 1))
+ return s;
+ }
+ }
}
return 0;
}
diff -Naur gcc-4.4.7.orig/gcc/cp/ChangeLog.rtems gcc-4.4.7/gcc/cp/ChangeLog.rtems
--- gcc-4.4.7.orig/gcc/cp/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
+++ gcc-4.4.7/gcc/cp/ChangeLog.rtems 2012-03-14 17:15:52.880065289 +0100
@@ -0,0 +1,5 @@
+2011-08-29 Ralf Corsépius <ralf.corsepius@rtems.org>
+ and Eric Norum <wenorum@lbl.gov>
+
+ Fix bootstrap breakdowns on OS X 10.7.1 (Lion):
+ * cfns.h: Regenerate.

View File

@ -1,600 +0,0 @@
diff -Naur gdb-7.3.1.orig/gdb/lm32-tdep.c gdb-7.3.1/gdb/lm32-tdep.c
--- gdb-7.3.1.orig/gdb/lm32-tdep.c 2011-03-18 19:52:30.000000000 +0100
+++ gdb-7.3.1/gdb/lm32-tdep.c 2012-09-18 17:08:09.231940470 +0200
@@ -35,7 +35,7 @@
#include "regcache.h"
#include "trad-frame.h"
#include "reggroups.h"
-#include "opcodes/lm32-desc.h"
+#include "../opcodes/lm32-desc.h"
#include "gdb_string.h"
diff -Naur gdb-7.3.1.orig/gdb/sparc-tdep.c gdb-7.3.1/gdb/sparc-tdep.c
--- gdb-7.3.1.orig/gdb/sparc-tdep.c 2011-03-18 19:52:32.000000000 +0100
+++ gdb-7.3.1/gdb/sparc-tdep.c 2012-09-18 17:08:09.231940470 +0200
@@ -1117,7 +1117,7 @@
sparc32_store_return_value (struct type *type, struct regcache *regcache,
const gdb_byte *valbuf)
{
- int len = TYPE_LENGTH (type);
+ size_t len = TYPE_LENGTH (type);
gdb_byte buf[8];
gdb_assert (!sparc_structure_or_union_p (type));
diff -Naur gdb-7.3.1.orig/sim/bfin/dv-eth_phy.c gdb-7.3.1/sim/bfin/dv-eth_phy.c
--- gdb-7.3.1.orig/sim/bfin/dv-eth_phy.c 2011-03-15 21:55:11.000000000 +0100
+++ gdb-7.3.1/sim/bfin/dv-eth_phy.c 2012-09-18 17:08:09.232940486 +0200
@@ -25,9 +25,7 @@
#ifdef HAVE_LINUX_MII_H
-/* Workaround old/broken linux headers. */
-#define _LINUX_TYPES_H
-#define __u16 unsigned short
+#include <linux/types.h>
#include <linux/mii.h>
#define REG_PHY_SIZE 0x20
diff -Naur gdb-7.3.1.orig/sim/common/gentmap.c gdb-7.3.1/sim/common/gentmap.c
--- gdb-7.3.1.orig/sim/common/gentmap.c 2006-11-07 20:29:59.000000000 +0100
+++ gdb-7.3.1/sim/common/gentmap.c 2012-09-18 17:08:09.232940486 +0200
@@ -2,6 +2,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
struct tdefs {
char *symbol;
diff -Naur gdb-7.3.1.orig/sim/erc32/configure gdb-7.3.1/sim/erc32/configure
--- gdb-7.3.1.orig/sim/erc32/configure 2010-01-09 22:11:39.000000000 +0100
+++ gdb-7.3.1/sim/erc32/configure 2012-09-18 17:08:09.234940517 +0200
@@ -591,8 +591,9 @@
ac_subst_vars='LTLIBOBJS
LIBOBJS
cgen_breaks
+READLINE_CFLAGS
+READLINE_DEPS
READLINE
-TERMCAP
REPORT_BUGS_TEXI
REPORT_BUGS_TO
PKGVERSION
@@ -716,6 +717,7 @@
enable_sim_profile
with_pkgversion
with_bugurl
+with_system_readline
'
ac_precious_vars='build_alias
host_alias
@@ -1358,6 +1360,7 @@
--with-zlib include zlib support (auto/yes/no) default=auto
--with-pkgversion=PKG Use PKG in the version string in place of "GDB"
--with-bugurl=URL Direct users to URL to report a bug
+ --with-system-readline use installed readline library
Some influential environment variables:
CC C compiler command
@@ -2416,7 +2419,6 @@
-
# Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around
# it by inlining the macro's contents.
# This file contains common code used by all simulators.
@@ -2916,18 +2918,18 @@
int
main ()
{
-
+return 0;
;
return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
@@ -2989,10 +2991,10 @@
else
ac_file=''
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
if test -z "$ac_file"; then :
- $as_echo "$as_me: failed program was:" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
@@ -3000,51 +3002,18 @@
{ as_fn_set_status 77
as_fn_error "C compiler cannot create executables
See \`config.log' for more details." "$LINENO" 5; }; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
- fi
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
$as_echo_n "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
@@ -3084,6 +3053,63 @@
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
if test "${ac_cv_objext+set}" = set; then :
@@ -4532,86 +4558,41 @@
done
-# In the Cygwin environment, we need some additional flags.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
-$as_echo_n "checking for cygwin... " >&6; }
-if test "${sim_cv_os_cygwin+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __CYGWIN__
-lose
-#endif
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "lose" >/dev/null 2>&1; then :
- sim_cv_os_cygwin=yes
-else
- sim_cv_os_cygwin=no
+# Check whether --with-system-readline was given.
+if test "${with_system_readline+set}" = set; then :
+ withval=$with_system_readline;
fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_os_cygwin" >&5
-$as_echo "$sim_cv_os_cygwin" >&6; }
-if test x$sim_cv_os_cygwin = xyes; then
- TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32'
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ltermcap" >&5
-$as_echo_n "checking for main in -ltermcap... " >&6; }
-if test "${ac_cv_lib_termcap_main+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltermcap $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+if test "$with_system_readline" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline" >&5
+$as_echo_n "checking for readline... " >&6; }
+ save_LIBS="$LIBS"
+ LIBS="-lreadline $save_LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char add_history ();
int
main ()
{
-return main ();
+return add_history ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_termcap_main=yes
-else
- ac_cv_lib_termcap_main=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_main" >&5
-$as_echo "$ac_cv_lib_termcap_main" >&6; }
-if test "x$ac_cv_lib_termcap_main" = x""yes; then :
- TERMCAP=-ltermcap
-else
- TERMCAP=""
-fi
-
-fi
-
-
-# We prefer the in-tree readline. Top-level dependencies make sure
-# src/readline (if it's there) is configured before src/sim.
-if test -r ../../readline/Makefile; then
- READLINE=../../readline/libreadline.a
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
-$as_echo_n "checking for readline in -lreadline... " >&6; }
-if test "${ac_cv_lib_readline_readline+set}" = set; then :
- $as_echo_n "(cached) " >&6
+ READLINE=-lreadline
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $TERMCAP $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ LIBS="-lreadline -lncurses $save_LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -4620,33 +4601,39 @@
#ifdef __cplusplus
extern "C"
#endif
-char readline ();
+char add_history ();
int
main ()
{
-return readline ();
+return add_history ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_readline_readline=yes
+ READLINE="-lreadline -lncurses"
else
- ac_cv_lib_readline_readline=no
+ as_fn_error "unable to detect readline" "$LINENO" 5
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
-$as_echo "$ac_cv_lib_readline_readline" >&6; }
-if test "x$ac_cv_lib_readline_readline" = x""yes; then :
- READLINE=-lreadline
-else
- as_fn_error "the required \"readline\" library is missing" "$LINENO" 5
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$save_LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE" >&5
+$as_echo "$READLINE" >&6; }
+ READLINE_DEPS=
+ READLINE_CFLAGS=
+else
+ READLINE='../../readline/libreadline.a -lncurses'
+ READLINE_DEPS='$(READLINE)'
+ READLINE_CFLAGS='-I$(READLINE_SRC)/..'
fi
-fi
+
+
ac_sources="$sim_link_files"
diff -Naur gdb-7.3.1.orig/sim/erc32/configure.ac gdb-7.3.1/sim/erc32/configure.ac
--- gdb-7.3.1.orig/sim/erc32/configure.ac 2006-12-20 23:35:51.000000000 +0100
+++ gdb-7.3.1/sim/erc32/configure.ac 2012-09-18 17:08:09.236940548 +0200
@@ -11,27 +11,32 @@
AC_CHECK_HEADERS(stdlib.h)
-# In the Cygwin environment, we need some additional flags.
-AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin,
-[AC_EGREP_CPP(lose, [
-#ifdef __CYGWIN__
-lose
-#endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])])
+AC_ARG_WITH([system-readline],
+ [AS_HELP_STRING([--with-system-readline],
+ [use installed readline library])])
-if test x$sim_cv_os_cygwin = xyes; then
- TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32'
+if test "$with_system_readline" = yes; then
+ AC_MSG_CHECKING([for readline])
+ save_LIBS="$LIBS"
+ LIBS="-lreadline $save_LIBS"
+ AC_LINK_IFELSE([AC_LANG_CALL([],
+ [add_history])], [READLINE=-lreadline],
+ [ LIBS="-lreadline -lncurses $save_LIBS"
+ AC_LINK_IFELSE([AC_LANG_CALL([],
+ [add_history])], [READLINE="-lreadline -lncurses"],
+ [AC_MSG_ERROR([unable to detect readline])])
+ ])
+ LIBS="$save_LIBS"
+ AC_MSG_RESULT($READLINE)
+ READLINE_DEPS=
+ READLINE_CFLAGS=
else
- AC_CHECK_LIB(termcap, main, TERMCAP=-ltermcap, TERMCAP="")
-fi
-AC_SUBST(TERMCAP)
-
-# We prefer the in-tree readline. Top-level dependencies make sure
-# src/readline (if it's there) is configured before src/sim.
-if test -r ../../readline/Makefile; then
- READLINE=../../readline/libreadline.a
-else
- AC_CHECK_LIB(readline, readline, READLINE=-lreadline,
- AC_ERROR([the required "readline" library is missing]), $TERMCAP)
+ READLINE='../../readline/libreadline.a -lncurses'
+ READLINE_DEPS='$(READLINE)'
+ READLINE_CFLAGS='-I$(READLINE_SRC)/..'
fi
AC_SUBST(READLINE)
+AC_SUBST(READLINE_DEPS)
+AC_SUBST(READLINE_CFLAGS)
+
SIM_AC_OUTPUT
diff -Naur gdb-7.3.1.orig/sim/erc32/erc32.c gdb-7.3.1/sim/erc32/erc32.c
--- gdb-7.3.1.orig/sim/erc32/erc32.c 2010-05-11 16:18:20.000000000 +0200
+++ gdb-7.3.1/sim/erc32/erc32.c 2012-09-18 17:08:09.236940548 +0200
@@ -414,7 +414,7 @@
if (rom8) mec_memcfg &= ~0x20000;
else mec_memcfg |= 0x20000;
- mem_ramsz = (256 * 1024) << ((mec_memcfg >> 10) & 7);
+ mem_ramsz = (512 * 1024) << ((mec_memcfg >> 10) & 7);
mem_romsz = (128 * 1024) << ((mec_memcfg >> 18) & 7);
if (sparclite_board) {
diff -Naur gdb-7.3.1.orig/sim/erc32/Makefile.in gdb-7.3.1/sim/erc32/Makefile.in
--- gdb-7.3.1.orig/sim/erc32/Makefile.in 2011-01-01 16:33:58.000000000 +0100
+++ gdb-7.3.1/sim/erc32/Makefile.in 2012-09-18 17:08:09.232940486 +0200
@@ -19,12 +19,12 @@
## COMMON_PRE_CONFIG_FRAG
-TERMCAP_LIB = @TERMCAP@
+# TERMCAP_LIB = -lncurses
READLINE_LIB = @READLINE@
SIM_OBJS = exec.o erc32.o func.o help.o float.o interf.o
SIM_EXTRA_LIBS = $(READLINE_LIB) $(TERMCAP_LIB) -lm
-SIM_EXTRA_ALL = sis
+SIM_EXTRA_ALL = sis$(EXEEXT)
SIM_EXTRA_INSTALL = install-sis
SIM_EXTRA_CLEAN = clean-sis
@@ -38,8 +38,8 @@
# `sis' doesn't need interf.o.
SIS_OFILES = exec.o erc32.o func.o help.o float.o
-sis: sis.o $(SIS_OFILES) $(COMMON_OBJS) $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) -o sis \
+sis$(EXEEXT): sis.o $(SIS_OFILES) $(COMMON_OBJS) $(LIBDEPS)
+ $(CC) $(ALL_CFLAGS) -o sis$(EXEEXT) \
sis.o $(SIS_OFILES) $(COMMON_OBJS) $(EXTRA_LIBS)
# FIXME: This computes the build host's endianness, doesn't it?
@@ -52,11 +52,11 @@
# Copy the files into directories where they will be run.
install-sis: installdirs
- n=`echo sis | sed '$(program_transform_name)'`; \
- $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
+ n=`echo sis$(EXEEXT) | sed '$(program_transform_name)'`; \
+ $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n
clean-sis:
- rm -f sis end end.h
+ rm -f sis$(EXEEXT) end end.h
configure:
@echo "Rebuilding configure..."
diff -Naur gdb-7.3.1.orig/sim/h8300/compile.c gdb-7.3.1/sim/h8300/compile.c
--- gdb-7.3.1.orig/sim/h8300/compile.c 2011-01-11 15:19:32.000000000 +0100
+++ gdb-7.3.1/sim/h8300/compile.c 2012-09-18 17:08:09.238940579 +0200
@@ -38,6 +38,12 @@
# define SIGTRAP 5
#endif
+#ifdef _WIN32
+#ifndef SIGBUS
+#define SIGBUS 10
+#endif
+#endif
+
int debug;
host_callback *sim_callback;
diff -Naur gdb-7.3.1.orig/sim/m32c/Makefile.in gdb-7.3.1/sim/m32c/Makefile.in
--- gdb-7.3.1.orig/sim/m32c/Makefile.in 2011-01-01 16:34:01.000000000 +0100
+++ gdb-7.3.1/sim/m32c/Makefile.in 2012-09-18 17:08:09.238940579 +0200
@@ -56,7 +56,7 @@
./opc2c -l m32c.out $(srcdir)/m32c.opc > m32c.c
opc2c : opc2c.o safe-fgets.o
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) $^ -o $@ $(BUILD_LIBS)
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $^ -o $@ $(BUILD_LIBS)
sample.x : $(srcdir)/sample.S $(srcdir)/sample.ld
../../gcc/xgcc $(CPUFLAGS) -B../../gcc/ -c $(srcdir)/sample.S -o sample.o
@@ -90,8 +90,8 @@
r8c.o : cpu.h mem.h misc.h int.h
opc2c.o : opc2c.c safe-fgets.h
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/opc2c.c
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ -c $(srcdir)/opc2c.c
safe-fgets.o : safe-fgets.c safe-fgets.h
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/safe-fgets.c
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ -c $(srcdir)/safe-fgets.c
diff -Naur gdb-7.3.1.orig/sim/ppc/device.c gdb-7.3.1/sim/ppc/device.c
--- gdb-7.3.1.orig/sim/ppc/device.c 2011-02-14 06:14:27.000000000 +0100
+++ gdb-7.3.1/sim/ppc/device.c 2012-09-18 17:08:09.239940595 +0200
@@ -1816,7 +1816,7 @@
/* I/O */
EXTERN_DEVICE\
-(void volatile)
+(void)
device_error(device *me,
const char *fmt,
...)
diff -Naur gdb-7.3.1.orig/sim/ppc/device.h gdb-7.3.1/sim/ppc/device.h
--- gdb-7.3.1.orig/sim/ppc/device.h 2001-12-14 01:22:12.000000000 +0100
+++ gdb-7.3.1/sim/ppc/device.h 2012-09-18 17:08:09.239940595 +0200
@@ -727,7 +727,7 @@
*/
EXTERN_DEVICE\
-(void volatile) device_error
+(void) device_error
(device *me,
const char *fmt,
...) __attribute__ ((format (printf, 2, 3)));
diff -Naur gdb-7.3.1.orig/sim/ppc/hw_glue.c gdb-7.3.1/sim/ppc/hw_glue.c
--- gdb-7.3.1.orig/sim/ppc/hw_glue.c 1999-04-16 03:35:09.000000000 +0200
+++ gdb-7.3.1/sim/ppc/hw_glue.c 2012-09-18 17:08:09.240940611 +0200
@@ -194,13 +194,13 @@
if (glue->sizeof_output == 0)
device_error(me, "at least one reg property size must be nonzero");
if (glue->sizeof_output % sizeof(unsigned_word) != 0)
- device_error(me, "reg property size must be %d aligned", sizeof(unsigned_word));
+ device_error(me, "reg property size must be %zd aligned", sizeof(unsigned_word));
/* and the address */
device_address_to_attach_address(device_parent(me),
&unit.address, &glue->space, &glue->address,
me);
if (glue->address % (sizeof(unsigned_word) * max_nr_interrupts) != 0)
- device_error(me, "reg property address must be %d aligned",
+ device_error(me, "reg property address must be %zd aligned",
sizeof(unsigned_word) * max_nr_interrupts);
glue->nr_outputs = glue->sizeof_output / sizeof(unsigned_word);
glue->output = zalloc(glue->sizeof_output);

View File

@ -1,833 +0,0 @@
diff -Naur gdb-7.5.orig/gdb/ChangeLog gdb-7.5/gdb/ChangeLog
--- gdb-7.5.orig/gdb/ChangeLog 2012-08-17 19:21:44.000000000 +0200
+++ gdb-7.5/gdb/ChangeLog 2012-10-03 05:13:35.925579962 +0200
@@ -1,3 +1,9 @@
+2012-08-21 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * symfile.c (allocate_symtab): Use host_address_to_string
+ function instead of cast of pointer to long which is not
+ compatible with x86_64-w64-mingw32 build.
+
2012-08-17 Joel Brobecker <brobecker@adacore.com>
* version.in: Update GDB version number to 7.5.
diff -Naur gdb-7.5.orig/gdb/symfile.c gdb-7.5/gdb/symfile.c
--- gdb-7.5.orig/gdb/symfile.c 2012-06-26 22:14:02.000000000 +0200
+++ gdb-7.5/gdb/symfile.c 2012-10-03 05:13:35.926579978 +0200
@@ -2889,8 +2889,8 @@
last_objfile_name);
}
fprintf_unfiltered (gdb_stdlog,
- "Created symtab 0x%lx for module %s.\n",
- (long) symtab, filename);
+ "Created symtab %s for module %s.\n",
+ host_address_to_string (symtab), filename);
}
return (symtab);
diff -Naur gdb-7.5.orig/libiberty/ChangeLog gdb-7.5/libiberty/ChangeLog
--- gdb-7.5.orig/libiberty/ChangeLog 2012-07-14 01:39:45.000000000 +0200
+++ gdb-7.5/libiberty/ChangeLog 2012-10-03 05:13:35.932580071 +0200
@@ -1,3 +1,8 @@
+2012-07-31 Mike Frysinger <vapier@gentoo.org>
+
+ * md5.c (md5_finish_ctx): Declare swap_bytes. Assign SWAP() output
+ to swap_bytes, and then call memcpy to move it to ctx->buffer.
+
2012-07-13 Doug Evans <dje@google.com>
* filename_cmp.c (filename_hash, filename_eq): New functions.
diff -Naur gdb-7.5.orig/libiberty/md5.c gdb-7.5/libiberty/md5.c
--- gdb-7.5.orig/libiberty/md5.c 2011-09-23 22:01:11.000000000 +0200
+++ gdb-7.5/libiberty/md5.c 2012-10-03 05:13:35.933580087 +0200
@@ -103,6 +103,7 @@
{
/* Take yet unprocessed bytes into account. */
md5_uint32 bytes = ctx->buflen;
+ md5_uint32 swap_bytes;
size_t pad;
/* Now count remaining bytes. */
@@ -113,10 +114,13 @@
pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes;
memcpy (&ctx->buffer[bytes], fillbuf, pad);
- /* Put the 64-bit file length in *bits* at the end of the buffer. */
- *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3);
- *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) |
- (ctx->total[0] >> 29));
+ /* Put the 64-bit file length in *bits* at the end of the buffer.
+ Use memcpy to avoid aliasing problems. On most systems, this
+ will be optimized away to the same code. */
+ swap_bytes = SWAP (ctx->total[0] << 3);
+ memcpy (&ctx->buffer[bytes + pad], &swap_bytes, sizeof (swap_bytes));
+ swap_bytes = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29));
+ memcpy (&ctx->buffer[bytes + pad + 4], &swap_bytes, sizeof (swap_bytes));
/* Process last bytes. */
md5_process_block (ctx->buffer, bytes + pad + 8, ctx);
diff -Naur gdb-7.5.orig/sim/ChangeLog gdb-7.5/sim/ChangeLog
--- gdb-7.5.orig/sim/ChangeLog 2012-06-15 19:19:56.000000000 +0200
+++ gdb-7.5/sim/ChangeLog 2012-10-03 05:13:35.934580102 +0200
@@ -1,3 +1,8 @@
+2012-07-19 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * common/sim-events.c: Include <inttypes.h>.
+ Avoid bogus pointer to int casts.
+
2012-06-15 Joel Brobecker <brobecker@adacore.com>
* configure: Regenerate.
diff -Naur gdb-7.5.orig/sim/common/sim-events.c gdb-7.5/sim/common/sim-events.c
--- gdb-7.5.orig/sim/common/sim-events.c 2012-01-04 09:28:06.000000000 +0100
+++ gdb-7.5/sim/common/sim-events.c 2012-10-03 05:13:35.935580117 +0200
@@ -38,6 +38,8 @@
#include <stdlib.h>
#endif
+#include <inttypes.h>
+
#include <signal.h> /* For SIGPROCMASK et al. */
typedef enum {
@@ -418,14 +420,14 @@
event = event->next, i++)
{
ETRACE ((_ETRACE,
- "event time-from-event - time %ld, delta %ld - event %d, tag 0x%lx, time %ld, handler 0x%lx, data 0x%lx%s%s\n",
- (long)current_time,
- (long)events->time_from_event,
+ "event time-from-event - time %" PRId64 ", delta %" PRId64 " - event %d, tag 0x%p, time %" PRId64 ", handler 0x%p, data 0x%p%s%s\n",
+ current_time,
+ events->time_from_event,
i,
- (long)event,
- (long)event->time_of_event,
- (long)event->handler,
- (long)event->data,
+ event,
+ event->time_of_event,
+ event->handler,
+ event->data,
(event->trace != NULL) ? ", " : "",
(event->trace != NULL) ? event->trace : ""));
}
@@ -525,12 +527,12 @@
new_event->trace = NULL;
insert_sim_event (sd, new_event, delta_time);
ETRACE ((_ETRACE,
- "event scheduled at %ld - tag 0x%lx - time %ld, handler 0x%lx, data 0x%lx%s%s\n",
+ "event scheduled at %ld - tag 0x%p - time %ld, handler 0x%p, data 0x%p%s%s\n",
(long)sim_events_time (sd),
- (long)new_event,
+ new_event,
(long)new_event->time_of_event,
- (long)new_event->handler,
- (long)new_event->data,
+ new_event->handler,
+ new_event->data,
(new_event->trace != NULL) ? ", " : "",
(new_event->trace != NULL) ? new_event->trace : ""));
return new_event;
@@ -577,12 +579,12 @@
#endif
ETRACE ((_ETRACE,
- "signal scheduled at %ld - tag 0x%lx - time %ld, handler 0x%lx, data 0x%lx\n",
- (long)sim_events_time (sd),
- (long)new_event,
- (long)new_event->time_of_event,
- (long)new_event->handler,
- (long)new_event->data));
+ "signal scheduled at %" PRId64 " - tag 0x%p - time %" PRId64 ", handler 0x%p, data 0x%p\n",
+ sim_events_time (sd),
+ new_event,
+ new_event->time_of_event,
+ new_event->handler,
+ new_event->data));
}
#endif
@@ -613,12 +615,12 @@
events->watchpoints = new_event;
events->work_pending = 1;
ETRACE ((_ETRACE,
- "event watching clock at %ld - tag 0x%lx - wallclock %ld, handler 0x%lx, data 0x%lx\n",
- (long)sim_events_time (sd),
- (long)new_event,
- (long)new_event->wallclock,
- (long)new_event->handler,
- (long)new_event->data));
+ "event watching clock at %" PRId64 " - tag 0x%p - wallclock %d, handler 0x%p, data 0x%p\n",
+ sim_events_time (sd),
+ new_event,
+ new_event->wallclock,
+ new_event->handler,
+ new_event->data));
return new_event;
}
#endif
@@ -689,14 +691,14 @@
events->watchpoints = new_event;
events->work_pending = 1;
ETRACE ((_ETRACE,
- "event watching host at %ld - tag 0x%lx - host-addr 0x%lx, 0x%lx..0x%lx, handler 0x%lx, data 0x%lx\n",
- (long)sim_events_time (sd),
- (long)new_event,
- (long)new_event->host_addr,
- (long)new_event->lb,
- (long)new_event->ub,
- (long)new_event->handler,
- (long)new_event->data));
+ "event watching host at %" PRId64 " - tag 0x%p - host-addr 0x%p, 0x%x..0x%x, handler 0x%p, data 0x%p\n",
+ sim_events_time (sd),
+ new_event,
+ new_event->host_addr,
+ new_event->lb,
+ new_event->ub,
+ new_event->handler,
+ new_event->data));
return new_event;
}
#endif
@@ -769,14 +771,14 @@
events->watchpoints = new_event;
events->work_pending = 1;
ETRACE ((_ETRACE,
- "event watching host at %ld - tag 0x%lx - host-addr 0x%lx, 0x%lx..0x%lx, handler 0x%lx, data 0x%lx\n",
- (long)sim_events_time (sd),
- (long)new_event,
- (long)new_event->host_addr,
- (long)new_event->lb,
- (long)new_event->ub,
- (long)new_event->handler,
- (long)new_event->data));
+ "event watching host at %" PRId64 " - tag 0x%p - host-addr 0x%p, 0x%x..0x%x, handler 0x%p, data 0x%p\n",
+ sim_events_time (sd),
+ new_event,
+ new_event->host_addr,
+ new_event->lb,
+ new_event->ub,
+ new_event->handler,
+ new_event->data));
return new_event;
}
#endif
@@ -803,12 +805,12 @@
sim_event *dead = *ptr_to_current;
*ptr_to_current = dead->next;
ETRACE ((_ETRACE,
- "event/watch descheduled at %ld - tag 0x%lx - time %ld, handler 0x%lx, data 0x%lx%s%s\n",
- (long) sim_events_time (sd),
- (long) event_to_remove,
- (long) dead->time_of_event,
- (long) dead->handler,
- (long) dead->data,
+ "event/watch descheduled at %" PRId64 " - tag 0x%p - time %" PRId64 ", handler 0x%p, data 0x%p%s%s\n",
+ sim_events_time (sd),
+ event_to_remove,
+ dead->time_of_event,
+ dead->handler,
+ dead->data,
(dead->trace != NULL) ? ", " : "",
(dead->trace != NULL) ? dead->trace : ""));
sim_events_free (sd, dead);
@@ -819,9 +821,9 @@
}
}
ETRACE ((_ETRACE,
- "event/watch descheduled at %ld - tag 0x%lx - not found\n",
- (long) sim_events_time (sd),
- (long) event_to_remove));
+ "event/watch descheduled at %" PRId64 " - tag 0x%p - not found\n",
+ sim_events_time (sd),
+ event_to_remove));
}
#endif
@@ -1146,11 +1148,11 @@
sim_event_handler *handler = to_do->handler;
void *data = to_do->data;
ETRACE ((_ETRACE,
- "event issued at %ld - tag 0x%lx - handler 0x%lx, data 0x%lx%s%s\n",
- (long) event_time,
- (long) to_do,
- (long) handler,
- (long) data,
+ "event issued at %" PRId64 " - tag 0x%p - handler 0x%p, data 0x%p%s%s\n",
+ event_time,
+ to_do,
+ handler,
+ data,
(to_do->trace != NULL) ? ", " : "",
(to_do->trace != NULL) ? to_do->trace : ""));
sim_events_free (sd, to_do);
@@ -1174,11 +1176,11 @@
events->queue = to_do->next;
update_time_from_event (sd);
ETRACE ((_ETRACE,
- "event issued at %ld - tag 0x%lx - handler 0x%lx, data 0x%lx%s%s\n",
- (long) event_time,
- (long) to_do,
- (long) handler,
- (long) data,
+ "event issued at %" PRId64 " - tag 0x%p - handler 0x%p, data 0x%p%s%s\n",
+ event_time,
+ to_do,
+ handler,
+ data,
(to_do->trace != NULL) ? ", " : "",
(to_do->trace != NULL) ? to_do->trace : ""));
sim_events_free (sd, to_do);
diff -Naur gdb-7.5.orig/sim/erc32/ChangeLog gdb-7.5/sim/erc32/ChangeLog
--- gdb-7.5.orig/sim/erc32/ChangeLog 2012-06-15 19:20:30.000000000 +0200
+++ gdb-7.5/sim/erc32/ChangeLog 2012-10-03 05:13:35.935580117 +0200
@@ -1,3 +1,18 @@
+2012-08-16 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * func.c, sis.c: Include <inttypes.h>.
+ Apply PRI* macros to print 64 bit types.
+ * sis.h: Include <stdint.h>.
+ Derive 64 bit types from POSIX 64 types.
+ Don't define UINT64_MAX if already defined.
+
+2012-07-20 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * Makefile.in, configure.ac: Backport from rtems-4.11-gdb-7.4.1.
+ Use system-readline. Fix EXEEXT handling.
+ * erc32.c: Backport from rtems-4.11-gdb-7.4.1.
+ * configure: Regenerate.
+
2012-06-15 Joel Brobecker <brobecker@adacore.com>
* sys.h: Include "config.h".
diff -Naur gdb-7.5.orig/sim/erc32/configure gdb-7.5/sim/erc32/configure
--- gdb-7.5.orig/sim/erc32/configure 2012-06-15 19:20:00.000000000 +0200
+++ gdb-7.5/sim/erc32/configure 2012-10-03 05:13:35.938580164 +0200
@@ -591,8 +591,9 @@
ac_subst_vars='LTLIBOBJS
LIBOBJS
cgen_breaks
+READLINE_CFLAGS
+READLINE_DEPS
READLINE
-TERMCAP
REPORT_BUGS_TEXI
REPORT_BUGS_TO
PKGVERSION
@@ -723,6 +724,7 @@
enable_sim_profile
with_pkgversion
with_bugurl
+with_system_readline
'
ac_precious_vars='build_alias
host_alias
@@ -1365,6 +1367,7 @@
--with-zlib include zlib support (auto/yes/no) default=auto
--with-pkgversion=PKG Use PKG in the version string in place of "GDB"
--with-bugurl=URL Direct users to URL to report a bug
+ --with-system-readline use installed readline library
Some influential environment variables:
CC C compiler command
@@ -4811,42 +4814,19 @@
done
-# In the Cygwin environment, we need some additional flags.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
-$as_echo_n "checking for cygwin... " >&6; }
-if test "${sim_cv_os_cygwin+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __CYGWIN__
-lose
-#endif
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "lose" >/dev/null 2>&1; then :
- sim_cv_os_cygwin=yes
-else
- sim_cv_os_cygwin=no
+# Check whether --with-system-readline was given.
+if test "${with_system_readline+set}" = set; then :
+ withval=$with_system_readline;
fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_os_cygwin" >&5
-$as_echo "$sim_cv_os_cygwin" >&6; }
-if test x$sim_cv_os_cygwin = xyes; then
- TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32'
-else
- # Keep in sync with gdb's configure.ac list.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
-$as_echo_n "checking for library containing tgetent... " >&6; }
-if test "${ac_cv_search_tgetent+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+if test "$with_system_readline" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline" >&5
+$as_echo_n "checking for readline... " >&6; }
+ save_LIBS="$LIBS"
+ LIBS="-lreadline $save_LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -4855,65 +4835,20 @@
#ifdef __cplusplus
extern "C"
#endif
-char tgetent ();
+char add_history ();
int
main ()
{
-return tgetent ();
+return add_history ();
;
return 0;
}
_ACEOF
-for ac_lib in '' termcap tinfo curses ncurses; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_tgetent=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if test "${ac_cv_search_tgetent+set}" = set; then :
- break
-fi
-done
-if test "${ac_cv_search_tgetent+set}" = set; then :
-
-else
- ac_cv_search_tgetent=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
-$as_echo "$ac_cv_search_tgetent" >&6; }
-ac_res=$ac_cv_search_tgetent
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
- TERMCAP=$ac_cv_search_tgetent
-else
- TERMCAP=""
-fi
-
-fi
-
-
-# We prefer the in-tree readline. Top-level dependencies make sure
-# src/readline (if it's there) is configured before src/sim.
-if test -r ../../readline/Makefile; then
- READLINE=../../readline/libreadline.a
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
-$as_echo_n "checking for readline in -lreadline... " >&6; }
-if test "${ac_cv_lib_readline_readline+set}" = set; then :
- $as_echo_n "(cached) " >&6
+if ac_fn_c_try_link "$LINENO"; then :
+ READLINE=-lreadline
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline $TERMCAP $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ LIBS="-lreadline -lncurses $save_LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -4922,33 +4857,39 @@
#ifdef __cplusplus
extern "C"
#endif
-char readline ();
+char add_history ();
int
main ()
{
-return readline ();
+return add_history ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_readline_readline=yes
+ READLINE="-lreadline -lncurses"
else
- ac_cv_lib_readline_readline=no
+ as_fn_error "unable to detect readline" "$LINENO" 5
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
-$as_echo "$ac_cv_lib_readline_readline" >&6; }
-if test "x$ac_cv_lib_readline_readline" = x""yes; then :
- READLINE=-lreadline
-else
- as_fn_error "the required \"readline\" library is missing" "$LINENO" 5
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$save_LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE" >&5
+$as_echo "$READLINE" >&6; }
+ READLINE_DEPS=
+ READLINE_CFLAGS=
+else
+ READLINE='../../readline/libreadline.a -lncurses'
+ READLINE_DEPS='$(READLINE)'
+ READLINE_CFLAGS='-I$(READLINE_SRC)/..'
fi
-fi
+
+
ac_sources="$sim_link_files"
diff -Naur gdb-7.5.orig/sim/erc32/configure.ac gdb-7.5/sim/erc32/configure.ac
--- gdb-7.5.orig/sim/erc32/configure.ac 2011-12-31 08:06:47.000000000 +0100
+++ gdb-7.5/sim/erc32/configure.ac 2012-10-03 05:13:35.938580164 +0200
@@ -7,29 +7,32 @@
AC_CHECK_HEADERS(stdlib.h)
-# In the Cygwin environment, we need some additional flags.
-AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin,
-[AC_EGREP_CPP(lose, [
-#ifdef __CYGWIN__
-lose
-#endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])])
+AC_ARG_WITH([system-readline],
+ [AS_HELP_STRING([--with-system-readline],
+ [use installed readline library])])
-if test x$sim_cv_os_cygwin = xyes; then
- TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32'
+if test "$with_system_readline" = yes; then
+ AC_MSG_CHECKING([for readline])
+ save_LIBS="$LIBS"
+ LIBS="-lreadline $save_LIBS"
+ AC_LINK_IFELSE([AC_LANG_CALL([],
+ [add_history])], [READLINE=-lreadline],
+ [ LIBS="-lreadline -lncurses $save_LIBS"
+ AC_LINK_IFELSE([AC_LANG_CALL([],
+ [add_history])], [READLINE="-lreadline -lncurses"],
+ [AC_MSG_ERROR([unable to detect readline])])
+ ])
+ LIBS="$save_LIBS"
+ AC_MSG_RESULT($READLINE)
+ READLINE_DEPS=
+ READLINE_CFLAGS=
else
- # Keep in sync with gdb's configure.ac list.
- AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses],
- [TERMCAP=$ac_cv_search_tgetent], [TERMCAP=""])
-fi
-AC_SUBST(TERMCAP)
-
-# We prefer the in-tree readline. Top-level dependencies make sure
-# src/readline (if it's there) is configured before src/sim.
-if test -r ../../readline/Makefile; then
- READLINE=../../readline/libreadline.a
-else
- AC_CHECK_LIB(readline, readline, READLINE=-lreadline,
- AC_ERROR([the required "readline" library is missing]), $TERMCAP)
+ READLINE='../../readline/libreadline.a -lncurses'
+ READLINE_DEPS='$(READLINE)'
+ READLINE_CFLAGS='-I$(READLINE_SRC)/..'
fi
AC_SUBST(READLINE)
+AC_SUBST(READLINE_DEPS)
+AC_SUBST(READLINE_CFLAGS)
+
SIM_AC_OUTPUT
diff -Naur gdb-7.5.orig/sim/erc32/erc32.c gdb-7.5/sim/erc32/erc32.c
--- gdb-7.5.orig/sim/erc32/erc32.c 2010-05-11 16:18:20.000000000 +0200
+++ gdb-7.5/sim/erc32/erc32.c 2012-10-03 05:13:35.939580180 +0200
@@ -414,7 +414,7 @@
if (rom8) mec_memcfg &= ~0x20000;
else mec_memcfg |= 0x20000;
- mem_ramsz = (256 * 1024) << ((mec_memcfg >> 10) & 7);
+ mem_ramsz = (512 * 1024) << ((mec_memcfg >> 10) & 7);
mem_romsz = (128 * 1024) << ((mec_memcfg >> 18) & 7);
if (sparclite_board) {
diff -Naur gdb-7.5.orig/sim/erc32/func.c gdb-7.5/sim/erc32/func.c
--- gdb-7.5.orig/sim/erc32/func.c 2010-05-11 16:18:20.000000000 +0200
+++ gdb-7.5/sim/erc32/func.c 2012-10-03 05:13:35.939580180 +0200
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
+#include <inttypes.h>
#include "sis.h"
#include "end.h"
#include <dis-asm.h>
@@ -640,8 +641,8 @@
sregs->nbranch;
#endif
- printf("\n Cycles : %9d\n\r", ebase.simtime - sregs->simstart);
- printf(" Instructions : %9d\n", sregs->ninst);
+ printf("\n Cycles : %9" PRId64 "\n\r", ebase.simtime - sregs->simstart);
+ printf(" Instructions : %9" PRId64 "\n", sregs->ninst);
#ifdef STAT
printf(" integer : %9.2f %%\n", 100.0 * (float) iinst / (float) sregs->ninst);
@@ -671,8 +672,8 @@
printf(" Processor utilisation : %5.2f %%\n", 100.0 * (1.0 - ((float) sregs->pwdtime / (float) stime)));
printf(" Real-time / simulator-time : 1/%.2f \n",
((float) sregs->tottime) / ((float) (stime) / (sregs->freq * 1.0E6)));
- printf(" Simulator performance : %d KIPS\n",sregs->ninst/tottime/1000);
- printf(" Used time (sys + user) : %3d s\n\n", sregs->tottime);
+ printf(" Simulator performance : %" PRId64 " KIPS\n",sregs->ninst/tottime/1000);
+ printf(" Used time (sys + user) : %3" PRId64 " s\n\n", sregs->tottime);
}
diff -Naur gdb-7.5.orig/sim/erc32/Makefile.in gdb-7.5/sim/erc32/Makefile.in
--- gdb-7.5.orig/sim/erc32/Makefile.in 2012-01-04 09:28:09.000000000 +0100
+++ gdb-7.5/sim/erc32/Makefile.in 2012-10-03 05:13:35.936580132 +0200
@@ -19,12 +19,12 @@
## COMMON_PRE_CONFIG_FRAG
-TERMCAP_LIB = @TERMCAP@
+# TERMCAP_LIB = -lncurses
READLINE_LIB = @READLINE@
SIM_OBJS = exec.o erc32.o func.o help.o float.o interf.o
SIM_EXTRA_LIBS = $(READLINE_LIB) $(TERMCAP_LIB) -lm
-SIM_EXTRA_ALL = sis
+SIM_EXTRA_ALL = sis$(EXEEXT)
SIM_EXTRA_INSTALL = install-sis
SIM_EXTRA_CLEAN = clean-sis
@@ -38,8 +38,8 @@
# `sis' doesn't need interf.o.
SIS_OFILES = exec.o erc32.o func.o help.o float.o
-sis: sis.o $(SIS_OFILES) $(COMMON_OBJS) $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) -o sis \
+sis$(EXEEXT): sis.o $(SIS_OFILES) $(COMMON_OBJS) $(LIBDEPS)
+ $(CC) $(ALL_CFLAGS) -o sis$(EXEEXT) \
sis.o $(SIS_OFILES) $(COMMON_OBJS) $(EXTRA_LIBS)
# FIXME: This computes the build host's endianness, doesn't it?
@@ -52,11 +52,11 @@
# Copy the files into directories where they will be run.
install-sis: installdirs
- n=`echo sis | sed '$(program_transform_name)'`; \
- $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
+ n=`echo sis$(EXEEXT) | sed '$(program_transform_name)'`; \
+ $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n
clean-sis:
- rm -f sis end end.h
+ rm -f sis$(EXEEXT) end end.h
configure:
@echo "Rebuilding configure..."
diff -Naur gdb-7.5.orig/sim/erc32/sis.c gdb-7.5/sim/erc32/sis.c
--- gdb-7.5.orig/sim/erc32/sis.c 2010-05-11 16:18:20.000000000 +0200
+++ gdb-7.5/sim/erc32/sis.c 2012-10-03 05:13:35.940580196 +0200
@@ -28,6 +28,7 @@
#endif
#include <stdio.h>
#include <time.h>
+#include <inttypes.h>
#include <sys/fcntl.h>
#include "sis.h"
#include <dis-asm.h>
@@ -124,7 +125,7 @@
sregs->histind = 0;
}
if (dis) {
- printf(" %8u ", ebase.simtime);
+ printf(" %8" PRIu64, ebase.simtime);
dis_mem(sregs->pc, 1, &dinfo);
}
}
@@ -279,7 +280,7 @@
case CTRL_C:
printf("\b\bInterrupt!\n");
case TIME_OUT:
- printf(" Stopped at time %d (%.3f ms)\n", ebase.simtime,
+ printf(" Stopped at time %" PRId64 " (%.3f ms)\n", ebase.simtime,
((double) ebase.simtime / (double) sregs.freq) / 1000.0);
break;
case BPT_HIT:
@@ -289,7 +290,7 @@
case ERROR:
printf("IU in error mode (%d)\n", sregs.trap);
stat = 0;
- printf(" %8d ", ebase.simtime);
+ printf(" %8" PRId64, ebase.simtime);
dis_mem(sregs.pc, 1, &dinfo);
break;
default:
diff -Naur gdb-7.5.orig/sim/erc32/sis.h gdb-7.5/sim/erc32/sis.h
--- gdb-7.5.orig/sim/erc32/sis.h 2012-06-15 19:20:30.000000000 +0200
+++ gdb-7.5/sim/erc32/sis.h 2012-10-03 05:13:35.940580196 +0200
@@ -22,6 +22,8 @@
#include "config.h"
#include "ansidecl.h"
+#include <stdint.h>
+
#include "gdb/callback.h"
#include "gdb/remote-sim.h"
@@ -53,10 +55,12 @@
typedef double float64; /* 64-bit float */
/* FIXME: what about host compilers that don't support 64-bit ints? */
-typedef unsigned long long uint64; /* 64-bit unsigned int */
-typedef long long int64; /* 64-bit signed int */
+typedef uint64_t uint64; /* 64-bit unsigned int */
+typedef int64_t int64; /* 64-bit signed int */
+#ifndef UINT64_MAX
#define UINT64_MAX 18446744073709551615ULL
+#endif
struct pstate {
diff -Naur gdb-7.5.orig/sim/microblaze/ChangeLog gdb-7.5/sim/microblaze/ChangeLog
--- gdb-7.5.orig/sim/microblaze/ChangeLog 2012-06-15 19:20:04.000000000 +0200
+++ gdb-7.5/sim/microblaze/ChangeLog 2012-10-03 05:13:35.940580196 +0200
@@ -1,3 +1,17 @@
+2012-10-02 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * interp.c: Define SIGBUS, SIGTRAP, SIGQUIT on mingw32.
+ Extend comment on _POSIX/__MINGW32__.
+
+2012-10-02 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ Backport from rtems-4.11-gdb-7.4:
+
+ 2012-04-29 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * interp.c: Don't include <sys/times.h>, <netinet/in.h>.
+ Define _POSIX on mingw32.
+
2012-06-15 Joel Brobecker <brobecker@adacore.com>
* config.in, configure: Regenerate.
diff -Naur gdb-7.5.orig/sim/microblaze/interp.c gdb-7.5/sim/microblaze/interp.c
--- gdb-7.5.orig/sim/microblaze/interp.c 2012-06-06 23:50:03.000000000 +0200
+++ gdb-7.5/sim/microblaze/interp.c 2012-10-03 05:13:35.941580211 +0200
@@ -19,11 +19,29 @@
02110-1301, USA. */
#include "config.h"
+
+#ifdef __MINGW32__
+/* mingw-w64 defines the SIG* defines if _POSIX is defined */
+#define _POSIX
+#endif
+
#include <signal.h>
+
+#ifdef __MINGW32__
+#ifndef SIGTRAP
+#define SIGTRAP 5
+#endif
+#ifndef SIGBUS
+#define SIGBUS 10
+#endif
+#ifndef SIGQUIT
+#define SIGQUIT 3
+#endif
+#endif
+
#include "sysdep.h"
-#include <sys/times.h>
#include <sys/param.h>
-#include <netinet/in.h> /* for byte ordering macros */
+
#include "bfd.h"
#include "gdb/callback.h"
#include "libiberty.h"
diff -Naur gdb-7.5.orig/sim/ppc/ChangeLog gdb-7.5/sim/ppc/ChangeLog
--- gdb-7.5.orig/sim/ppc/ChangeLog 2012-06-15 19:20:07.000000000 +0200
+++ gdb-7.5/sim/ppc/ChangeLog 2012-10-03 05:13:35.942580226 +0200
@@ -1,3 +1,10 @@
+2012-09-28 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ Backport from gcc-7.4-rtems4.11:
+
+ * device.c, device.h: Use (void) device_error.
+ * hw_glue.c: Use %zd to print sizes.
+
2012-06-15 Joel Brobecker <brobecker@adacore.com>
* configure: Regenerate.
diff -Naur gdb-7.5.orig/sim/ppc/device.c gdb-7.5/sim/ppc/device.c
--- gdb-7.5.orig/sim/ppc/device.c 2011-02-14 06:14:27.000000000 +0100
+++ gdb-7.5/sim/ppc/device.c 2012-10-03 05:13:35.943580241 +0200
@@ -1816,7 +1816,7 @@
/* I/O */
EXTERN_DEVICE\
-(void volatile)
+(void)
device_error(device *me,
const char *fmt,
...)
diff -Naur gdb-7.5.orig/sim/ppc/device.h gdb-7.5/sim/ppc/device.h
--- gdb-7.5.orig/sim/ppc/device.h 2001-12-14 01:22:12.000000000 +0100
+++ gdb-7.5/sim/ppc/device.h 2012-10-03 05:13:35.944580256 +0200
@@ -727,7 +727,7 @@
*/
EXTERN_DEVICE\
-(void volatile) device_error
+(void) device_error
(device *me,
const char *fmt,
...) __attribute__ ((format (printf, 2, 3)));
diff -Naur gdb-7.5.orig/sim/ppc/hw_glue.c gdb-7.5/sim/ppc/hw_glue.c
--- gdb-7.5.orig/sim/ppc/hw_glue.c 1999-04-16 03:35:09.000000000 +0200
+++ gdb-7.5/sim/ppc/hw_glue.c 2012-10-03 05:13:35.944580256 +0200
@@ -194,13 +194,13 @@
if (glue->sizeof_output == 0)
device_error(me, "at least one reg property size must be nonzero");
if (glue->sizeof_output % sizeof(unsigned_word) != 0)
- device_error(me, "reg property size must be %d aligned", sizeof(unsigned_word));
+ device_error(me, "reg property size must be %zd aligned", sizeof(unsigned_word));
/* and the address */
device_address_to_attach_address(device_parent(me),
&unit.address, &glue->space, &glue->address,
me);
if (glue->address % (sizeof(unsigned_word) * max_nr_interrupts) != 0)
- device_error(me, "reg property address must be %d aligned",
+ device_error(me, "reg property address must be %zd aligned",
sizeof(unsigned_word) * max_nr_interrupts);
glue->nr_outputs = glue->sizeof_output / sizeof(unsigned_word);
glue->output = zalloc(glue->sizeof_output);

View File

@ -1,22 +0,0 @@
--- gdb-7.5.1/bfd/config.bfd.orig 2013-02-14 11:47:19.000000000 +1100
+++ gdb-7.5.1/bfd/config.bfd 2013-02-14 11:47:37.000000000 +1100
@@ -397,7 +397,7 @@
targ_selvecs=bfd_elf32_frv_vec
;;
- moxie-*-elf | moxie-*-rtems | moxie-*-uclinux)
+ moxie-*-elf | moxie-*-rtems* | moxie-*-uclinux)
targ_defvec=bfd_elf32_moxie_vec
;;
--- gdb-7.5.1/gdb/configure.tgt.orig 2013-02-14 12:01:25.000000000 +1100
+++ gdb-7.5.1/gdb/configure.tgt 2013-02-14 12:02:07.000000000 +1100
@@ -127,7 +127,7 @@
gdb_sim=../sim/frv/libsim.a
;;
-moxie-*-elf)
+moxie-*-elf | moxie-*-rtems*)
gdb_target_obs="moxie-tdep.o"
gdb_sim=../sim/moxie/libsim.a
;;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +0,0 @@
===================================================================
RCS file: /cvs/src/src/newlib/libc/machine/mips/memcpy.S,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- src/newlib/libc/machine/mips/memcpy.S 2012/12/11 21:37:59 1.1
+++ src/newlib/libc/machine/mips/memcpy.S 2013/01/07 21:29:39 1.2
@@ -56,7 +56,7 @@
#endif
#endif
-#if (_MIPS_SIM == _ABI64) || (_MIPS_SIM == _ABIN32)
+#if defined(_MIPS_SIM) && ((_MIPS_SIM == _ABI64) || (_MIPS_SIM == _ABIN32))
#ifndef DISABLE_DOUBLE
#define USE_DOUBLE
#endif
@@ -203,6 +203,6 @@
#define REG1 t1
#define REG2 t2
#define REG3 t3
-#if _MIPS_SIM == _ABIO32
+#if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64)
# define REG4 t4
# define REG5 t5
# define REG6 t6

View File

@ -1,21 +0,0 @@
===================================================================
RCS file: /cvs/src/src/newlib/libc/machine/mips/memcpy.S,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- src/newlib/libc/machine/mips/memcpy.S 2013/01/07 21:29:39 1.2
+++ src/newlib/libc/machine/mips/memcpy.S 2013/02/19 07:31:04 1.3
@@ -49,7 +49,10 @@
#include <sys/asm.h>
#endif
-#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) || \
- (_MIPS_ISA == _MIPS_ISA_MIPS32) || (_MIPS_ISA == _MIPS_ISA_MIPS64)
+/* Check to see if the MIPS architecture we are compiling for supports
+ * prefetching.
+ */
+
+#if (__mips == 4) || (__mips == 5) || (__mips == 32) || (__mips == 64)
#ifndef DISABLE_PREFETCH
#define USE_PREFETCH
#endif

View File

@ -1,21 +0,0 @@
--- binutils-2.20.orig/gas/configure.tgt 2011-07-03 18:19:58.000000000 +1000
+++ binutils-2.20/gas/configure.tgt 2011-07-03 18:14:15.000000000 +1000
@@ -315,6 +315,7 @@
nios2*-linux*) fmt=elf em=linux ;;
nios2*-*-*) fmt=elf ;;
+ nios2*-rtems*) fmt=elf ;;
ns32k-pc532-mach*) fmt=aout em=pc532mach ;;
ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
--- binutils-2.20.orig/gas/config/tc-nios2.c 2011-07-03 18:20:09.000000000 +1000
+++ binutils-2.20/gas/config/tc-nios2.c 2011-07-03 18:08:42.000000000 +1000
@@ -1340,7 +1340,7 @@
void
md_number_to_chars (char *buf, valueT val, int n)
{
- assert (n == 1 || n == 2 || n == 4);
+ assert (n == 1 || n == 2 || n == 4 || n == 8);
if (target_big_endian)
{
number_to_chars_bigendian (buf, val, n);

View File

@ -1,213 +0,0 @@
diff -ruN gcc-4.1.orig/config-ml.in gcc-4.1/config-ml.in
--- gcc-4.1.orig/config-ml.in 2011-04-26 11:29:52.000000000 +1000
+++ gcc-4.1/config-ml.in 2011-08-06 10:24:23.000000000 +1000
@@ -892,13 +892,48 @@
fi
fi
- if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
- --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
- ${ac_configure_args} ${ml_srcdiroption} ; then
- true
- else
- exit 1
- fi
+ case $(uname) in
+ MINGW32*)
+ #
+ # Work around bugs in MSYS sed or bash. The CC in
+ # ${ac_configure_args} overrides the CC built above
+ # I do not know if the CC should have been stripped
+ # before this script. It seems sed in MSYS does not
+ # handle:
+ # $ echo "'XX=hello' 'YY=world' 'CC=gcc -O3'" | sed -e "s/\'CC=.*\'//g"
+ #
+ tmp_IFS=$IFS
+ IFS="'"
+ tmp__ac_configure_args=
+ for o in ${ac_configure_args}
+ do
+ o=$(echo $o | sed -e 's/ *$//g')
+ case $o in
+ CC=*) ;;
+ '') ;;
+ *) tmp__ac_configure_args="${tmp__ac_configure_args} "\'$o\' ;;
+ esac
+ done
+ IFS=$tmp_IFS
+
+ if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
+ --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
+ ${tmp__ac_configure_args} ${ml_srcdiroption} ; then
+ true
+ else
+ exit 1
+ fi
+ ;;
+ *)
+ if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
+ --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
+ ${ac_configure_args} ${ml_srcdiroption} ; then
+ true
+ else
+ exit 1
+ fi
+ ;;
+ esac
cd ${ML_POPDIR}
diff -ruN gcc-4.1.orig/gcc/DEV-PHASE gcc-4.1/gcc/DEV-PHASE
--- gcc-4.1.orig/gcc/DEV-PHASE 2011-04-26 11:29:52.000000000 +1000
+++ gcc-4.1/gcc/DEV-PHASE 2011-08-06 10:24:25.000000000 +1000
@@ -0,0 +1 @@
+RTEMS (chrisj@rtems.org) NIOS2 gcc-4.1-11.0/newlib-1.19.0
diff -ruN gcc-4.1.orig/gcc/config/nios2/crti.asm gcc-4.1/gcc/config/nios2/crti.asm
--- gcc-4.1.orig/gcc/config/nios2/crti.asm 2011-04-26 11:29:54.000000000 +1000
+++ gcc-4.1/gcc/config/nios2/crti.asm 2011-08-18 11:14:30.000000000 +1000
@@ -67,6 +67,11 @@
stw r16, 12(sp)
stw fp, 8(sp)
addi fp, sp, 8
+
+#if !defined(__rtems__)
+/* FIXME: Disabled for now.
+ * Causes undefined refs to _GLOBAL_OFFSET_TABLE_
+ */
nextpc r22
#ifdef __nios2_6b__
1: movhi20 r2, %hi20adj(_GLOBAL_OFFSET_TABLE_ - 1b)
@@ -76,7 +81,7 @@
addi r2, r2, %lo(_GLOBAL_OFFSET_TABLE_ - 1b)
#endif
add r22, r22, r2
-
+#endif
.section ".fini"
.align 2
@@ -94,6 +99,11 @@
stw r16, 12(sp)
stw fp, 8(sp)
addi fp, sp, 8
+
+#if !defined(__rtems__)
+/* FIXME: Disabled for now.
+ * Causes undefined refs to _GLOBAL_OFFSET_TABLE_
+ */
nextpc r22
#ifdef __nios2_6b__
1: movhi20 r2, %hi20adj(_GLOBAL_OFFSET_TABLE_ - 1b)
@@ -102,7 +112,5 @@
1: movhi r2, %hiadj(_GLOBAL_OFFSET_TABLE_ - 1b)
addi r2, r2, %lo(_GLOBAL_OFFSET_TABLE_ - 1b)
#endif
-
add r22, r22, r2
-
-
+#endif
diff -ruN gcc-4.1.orig/gcc/config/nios2/nios2-protos.h gcc-4.1/gcc/config/nios2/nios2-protos.h
--- gcc-4.1.orig/gcc/config/nios2/nios2-protos.h 2011-04-26 11:29:54.000000000 +1000
+++ gcc-4.1/gcc/config/nios2/nios2-protos.h 2011-08-06 10:24:23.000000000 +1000
@@ -88,3 +88,5 @@
extern int nios2_return_in_memory (tree);
#endif /* TREE_CODE */
+
+rtx nios2_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode);
diff -ruN gcc-4.1.orig/gcc/config/nios2/rtems.h gcc-4.1/gcc/config/nios2/rtems.h
--- gcc-4.1.orig/gcc/config/nios2/rtems.h 1970-01-01 10:00:00.000000000 +1000
+++ gcc-4.1/gcc/config/nios2/rtems.h 2011-08-17 17:06:39.000000000 +1000
@@ -0,0 +1,29 @@
+/* Definitions for rtems targeting a NIOS2 using ELF.
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Chris Johns (chrisj@rtems.org).
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA. */
+
+/* Specify predefined symbols in preprocessor. */
+
+#define TARGET_OS_CPP_BUILTINS() \
+do { \
+ builtin_define ("__rtems__"); \
+ builtin_define ("__USE_INIT_FINI__"); \
+ builtin_assert ("system=rtems"); \
+} while (0)
diff -ruN gcc-4.1.orig/gcc/config/nios2/t-rtems gcc-4.1/gcc/config/nios2/t-rtems
--- gcc-4.1.orig/gcc/config/nios2/t-rtems 1970-01-01 10:00:00.000000000 +1000
+++ gcc-4.1/gcc/config/nios2/t-rtems 2011-08-18 06:03:59.000000000 +1000
@@ -0,0 +1,4 @@
+# Multilibs for NIOS2 RTEMS targets.
+
+# Use all.
+
diff -ruN gcc-4.1.orig/gcc/config.gcc gcc-4.1/gcc/config.gcc
--- gcc-4.1.orig/gcc/config.gcc 2011-04-26 11:29:54.000000000 +1000
+++ gcc-4.1/gcc/config.gcc 2011-08-06 10:24:23.000000000 +1000
@@ -1447,6 +1447,10 @@
thread_file='posix'
fi
;;
+nios2-*-rtems*)
+ tm_file=" elfos.h ${tm_file} dbxelf.h nios2/rtems.h rtems.h"
+ tmake_file="${tmake_file} nios2/t-nios2 t-rtems nios2/t-rtems"
+ ;;
nios2*-*-*)
tm_file="elfos.h ${tm_file}"
tmake_file="${tmake_file} nios2/t-nios2"
diff -ruN gcc-4.1.orig/libiberty/strsignal.c gcc-4.1/libiberty/strsignal.c
--- gcc-4.1.orig/libiberty/strsignal.c 2011-04-26 11:30:12.000000000 +1000
+++ gcc-4.1/libiberty/strsignal.c 2011-08-06 10:24:23.000000000 +1000
@@ -404,10 +404,10 @@
#ifndef HAVE_STRSIGNAL
-const char *
+char *
strsignal (int signo)
{
- const char *msg;
+ char *msg;
static char buf[32];
#ifndef HAVE_SYS_SIGLIST
@@ -428,12 +428,12 @@
{
/* In range, but no sys_siglist or no entry at this index. */
sprintf (buf, "Signal %d", signo);
- msg = (const char *) buf;
+ msg = buf;
}
else
{
/* In range, and a valid message. Just return the message. */
- msg = (const char *) sys_siglist[signo];
+ msg = (char *) sys_siglist[signo];
}
return (msg);
@@ -549,7 +549,7 @@
#ifndef HAVE_PSIGNAL
void
-psignal (unsigned signo, char *message)
+psignal (int signo, const char *message)
{
if (signal_names == NULL)
{

File diff suppressed because it is too large Load Diff