diff options
author | Alan Modra <amodra@bigpond.net.au> | 2009-03-18 11:27:16 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2009-03-18 11:27:16 +0000 |
commit | 41f3f3478ace2386cd55dd7ddaa4b01d07fea4c2 (patch) | |
tree | 8bb013bed355d31be65c7d41376d428ed844c2b1 | |
parent | 828ee76fe6e084e7844b9728fc16b07d80e55bef (diff) | |
download | gdb-41f3f3478ace2386cd55dd7ddaa4b01d07fea4c2.tar.gz |
include/
* alloca-conf.h: Revise based on autoconf-2.61, autoconf-2.13
documentation.
bfd/
* elf32-m68hc1x.c: Include alloca-conf.h.
* xsym.c: Likewise.
* elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
* som.c: Likewise.
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
binutils/
* sysdep.h: Include alloca-conf.h instead of config.h and remove
existing #if's handling alloca.
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
gas/
* as.h: Include alloca-conf.h instead of config.h and remove
existing #if's handling alloca.
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
opcodes/
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
* openrisc-opc.c: Regenerate.
ld/
* ld.h: Remove alloca handling.
-rw-r--r-- | bfd/ChangeLog | 9 | ||||
-rw-r--r-- | bfd/Makefile.am | 25 | ||||
-rw-r--r-- | bfd/Makefile.in | 26 | ||||
-rw-r--r-- | bfd/elf32-m68hc1x.c | 5 | ||||
-rw-r--r-- | bfd/elf64-hppa.c | 26 | ||||
-rw-r--r-- | bfd/som.c | 27 | ||||
-rw-r--r-- | bfd/xsym.c | 5 | ||||
-rw-r--r-- | include/ChangeLog | 5 | ||||
-rw-r--r-- | include/alloca-conf.h | 60 | ||||
-rw-r--r-- | opcodes/ChangeLog | 6 | ||||
-rw-r--r-- | opcodes/Makefile.am | 3 | ||||
-rw-r--r-- | opcodes/Makefile.in | 4 | ||||
-rw-r--r-- | opcodes/openrisc-opc.c | 5 |
13 files changed, 104 insertions, 102 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b2f3750a73c..c2dd2079dda 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,12 @@ +2009-03-18 Alan Modra <amodra@bigpond.net.au> + + * elf32-m68hc1x.c: Include alloca-conf.h. + * xsym.c: Likewise. + * elf64-hppa.c: Likewise. Remove existing #if's handling alloca. + * som.c: Likewise. + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + 2009-03-17 Daniel Jacobowitz <dan@codesourcery.com> * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test. diff --git a/bfd/Makefile.am b/bfd/Makefile.am index 1c150cd1a1c..62fae5ba57d 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -1487,11 +1487,11 @@ elf32-m68hc12.lo: elf32-m68hc12.c $(INCDIR)/filenames.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elf32-m68hc1x.h \ $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \ $(INCDIR)/opcode/m68hc11.h elf32-target.h -elf32-m68hc1x.lo: elf32-m68hc1x.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elf32-m68hc1x.h \ - $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/opcode/m68hc11.h +elf32-m68hc1x.lo: elf32-m68hc1x.c $(INCDIR)/alloca-conf.h \ + $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ + $(INCDIR)/elf/internal.h elf32-m68hc1x.h $(INCDIR)/elf/m68hc11.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/m68hc11.h elf32-m88k.lo: elf32-m88k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h elf32-target.h @@ -1666,7 +1666,7 @@ hp300hpux.lo: hp300hpux.c $(INCDIR)/aout/hp300hpux.h \ $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ aout-target.h -som.lo: som.c $(INCDIR)/filenames.h +som.lo: som.c $(INCDIR)/alloca-conf.h $(INCDIR)/filenames.h i386aout.lo: i386aout.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ $(INCDIR)/aout/aout64.h libaout.h $(INCDIR)/bfdlink.h \ aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ @@ -1876,7 +1876,8 @@ vmsutil.lo: vmsutil.c vmsutil.h xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h \ libcoff.h libxcoff.h -xsym.lo: xsym.c $(INCDIR)/filenames.h xsym.h $(INCDIR)/hashtab.h +xsym.lo: xsym.c $(INCDIR)/alloca-conf.h $(INCDIR)/filenames.h \ + xsym.h $(INCDIR)/hashtab.h xtensa-isa.lo: xtensa-isa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ $(INCDIR)/xtensa-isa.h $(INCDIR)/xtensa-isa-internal.h xtensa-modules.lo: xtensa-modules.c $(INCDIR)/xtensa-isa.h \ @@ -1940,11 +1941,11 @@ elf64-alpha.lo: elf64-alpha.c $(INCDIR)/filenames.h \ $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h \ libcoff.h libecoff.h ecoffswap.h elf64-target.h -elf64-hppa.lo: elf64-hppa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h \ - $(INCDIR)/elf/reloc-macros.h libhppa.h elf64-hppa.h \ - elf-hppa.h elf64-target.h +elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \ + $(INCDIR)/filenames.h $(INCDIR)/hashtab.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \ + libhppa.h elf64-hppa.h elf-hppa.h elf64-target.h elf64-gen.lo: elf64-gen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h elf64-target.h diff --git a/bfd/Makefile.in b/bfd/Makefile.in index 32191a16cd7..b0112521c39 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -169,6 +169,7 @@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBINTL = @LIBINTL@ LIBINTL_DEP = @LIBINTL_DEP@ +LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ @@ -2083,11 +2084,11 @@ elf32-m68hc12.lo: elf32-m68hc12.c $(INCDIR)/filenames.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elf32-m68hc1x.h \ $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \ $(INCDIR)/opcode/m68hc11.h elf32-target.h -elf32-m68hc1x.lo: elf32-m68hc1x.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elf32-m68hc1x.h \ - $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/opcode/m68hc11.h +elf32-m68hc1x.lo: elf32-m68hc1x.c $(INCDIR)/alloca-conf.h \ + $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ + $(INCDIR)/elf/internal.h elf32-m68hc1x.h $(INCDIR)/elf/m68hc11.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/m68hc11.h elf32-m88k.lo: elf32-m88k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h elf32-target.h @@ -2262,7 +2263,7 @@ hp300hpux.lo: hp300hpux.c $(INCDIR)/aout/hp300hpux.h \ $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ aout-target.h -som.lo: som.c $(INCDIR)/filenames.h +som.lo: som.c $(INCDIR)/alloca-conf.h $(INCDIR)/filenames.h i386aout.lo: i386aout.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ $(INCDIR)/aout/aout64.h libaout.h $(INCDIR)/bfdlink.h \ aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ @@ -2472,7 +2473,8 @@ vmsutil.lo: vmsutil.c vmsutil.h xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h \ libcoff.h libxcoff.h -xsym.lo: xsym.c $(INCDIR)/filenames.h xsym.h $(INCDIR)/hashtab.h +xsym.lo: xsym.c $(INCDIR)/alloca-conf.h $(INCDIR)/filenames.h \ + xsym.h $(INCDIR)/hashtab.h xtensa-isa.lo: xtensa-isa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ $(INCDIR)/xtensa-isa.h $(INCDIR)/xtensa-isa-internal.h xtensa-modules.lo: xtensa-modules.c $(INCDIR)/xtensa-isa.h \ @@ -2536,11 +2538,11 @@ elf64-alpha.lo: elf64-alpha.c $(INCDIR)/filenames.h \ $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h \ libcoff.h libecoff.h ecoffswap.h elf64-target.h -elf64-hppa.lo: elf64-hppa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h \ - $(INCDIR)/elf/reloc-macros.h libhppa.h elf64-hppa.h \ - elf-hppa.h elf64-target.h +elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \ + $(INCDIR)/filenames.h $(INCDIR)/hashtab.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \ + libhppa.h elf64-hppa.h elf-hppa.h elf64-target.h elf64-gen.lo: elf64-gen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h elf64-target.h diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c index 2660c890cb8..bcc0b87b95a 100644 --- a/bfd/elf32-m68hc1x.c +++ b/bfd/elf32-m68hc1x.c @@ -1,6 +1,6 @@ /* Motorola 68HC11/HC12-specific support for 32-bit ELF - Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 - Free Software Foundation, Inc. + Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, + 2009 Free Software Foundation, Inc. Contributed by Stephane Carrez (stcarrez@nerim.fr) This file is part of BFD, the Binary File Descriptor library. @@ -20,6 +20,7 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "alloca-conf.h" #include "sysdep.h" #include "bfd.h" #include "bfdlink.h" diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c index 10b0b8ce211..1b5de6e4ef2 100644 --- a/bfd/elf64-hppa.c +++ b/bfd/elf64-hppa.c @@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "alloca-conf.h" #include "sysdep.h" #include "bfd.h" #include "libbfd.h" @@ -27,31 +28,6 @@ #include "libhppa.h" #include "elf64-hppa.h" -/* This is the code recommended in the autoconf documentation, almost - verbatim. */ -#ifndef __GNUC__ -# if HAVE_ALLOCA_H -# include <alloca.h> -# else -# ifdef _AIX -/* Indented so that pre-ansi C compilers will ignore it, rather than - choke on it. Some versions of AIX require this to be the first - thing in the file. */ - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -# if !defined (__STDC__) && !defined (__hpux) -extern char *alloca (); -# else -extern void *alloca (); -# endif /* __STDC__, __hpux */ -# endif /* alloca */ -# endif /* _AIX */ -# endif /* HAVE_ALLOCA_H */ -#else -extern void *alloca (size_t); -#endif /* __GNUC__ */ - #define ARCH_SIZE 64 diff --git a/bfd/som.c b/bfd/som.c index 9e3dc788e57..ccf760ab5d4 100644 --- a/bfd/som.c +++ b/bfd/som.c @@ -23,6 +23,7 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "alloca-conf.h" #include "sysdep.h" #include "bfd.h" @@ -37,32 +38,6 @@ #include <machine/reg.h> #include <sys/file.h> -/* This is the code recommended in the autoconf documentation, almost - verbatim. */ - -#ifndef __GNUC__ -# if HAVE_ALLOCA_H -# include <alloca.h> -# else -# ifdef _AIX -/* Indented so that pre-ansi C compilers will ignore it, rather than - choke on it. Some versions of AIX require this to be the first - thing in the file. */ - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -# if !defined (__STDC__) && !defined (__hpux) -extern char *alloca (); -# else -extern void *alloca (); -# endif /* __STDC__, __hpux */ -# endif /* alloca */ -# endif /* _AIX */ -# endif /* HAVE_ALLOCA_H */ -#else -extern void *alloca (size_t); -#endif /* __GNUC__ */ - static bfd_reloc_status_type hppa_som_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); static bfd_boolean som_mkobject (bfd *); diff --git a/bfd/xsym.c b/bfd/xsym.c index ac5d80b6119..793dd241446 100644 --- a/bfd/xsym.c +++ b/bfd/xsym.c @@ -1,6 +1,6 @@ /* xSYM symbol-file support for BFD. - Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 - Free Software Foundation, Inc. + Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, + 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "alloca-conf.h" #include "sysdep.h" #include "xsym.h" #include "bfd.h" diff --git a/include/ChangeLog b/include/ChangeLog index ac8f2848ae7..fe68874638b 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2009-03-18 Alan Modra <amodra@bigpond.net.au> + + * alloca-conf.h: Revise based on autoconf-2.61, autoconf-2.13 + documentation. + 2009-03-17 Jason Merrill <jason@redhat.com> * demangle.h (enum demangle_component_type): Add diff --git a/include/alloca-conf.h b/include/alloca-conf.h index 9c3eea396c1..9ba77953d80 100644 --- a/include/alloca-conf.h +++ b/include/alloca-conf.h @@ -1,24 +1,44 @@ #include "config.h" -#if defined(__GNUC__) && !defined(C_ALLOCA) -# ifndef alloca -# define alloca __builtin_alloca -# endif -#else /* ! defined (__GNUC__) */ -# ifdef _AIX - #pragma alloca +/* This is a merge of code recommended in the autoconf-2.61 documentation + with that recommended in the autoconf-2.13 documentation, with added + tweaks to heed C_ALLOCA. */ + +#if defined HAVE_ALLOCA_H && !defined C_ALLOCA +# include <alloca.h> +#else +# if defined __GNUC__ && !defined C_ALLOCA +# if !defined alloca +# define alloca __builtin_alloca +# endif +# else +# if defined _AIX +/* Indented so that pre-ansi C compilers will ignore it, rather than + choke on it. Some versions of AIX require this to be the first + thing in the file except for comments and preprocessor directives. */ + #pragma alloca # else -# if defined(HAVE_ALLOCA_H) && !defined(C_ALLOCA) -# include <alloca.h> -# else /* ! defined (HAVE_ALLOCA_H) */ -# ifdef __STDC__ -extern PTR alloca (size_t); -# else /* ! defined (__STDC__) */ -extern PTR alloca (); -# endif /* ! defined (__STDC__) */ -# endif /* ! defined (HAVE_ALLOCA_H) */ -# ifdef _WIN32 -# include <malloc.h> +# if defined _MSC_VER && !defined C_ALLOCA +# include <malloc.h> +# define alloca _alloca +# else +# if !defined alloca +# if defined __STDC__ || defined __hpux +# if defined HAVE_STDDEF_H +# include <stddef.h> +# if defined __cplusplus +extern "C" void *alloca (size_t); +# else +extern void *alloca (size_t); +# endif +# else +extern void *alloca (); +# endif +# else +extern char *alloca (); +# endif +# endif +# endif # endif -# endif /* ! defined (_AIX) */ -#endif /* ! defined (__GNUC__) */ +# endif +#endif diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 23b0927d12f..8a8a7869e49 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,9 @@ +2009-03-18 Alan Modra <amodra@bigpond.net.au> + + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + * openrisc-opc.c: Regenerate. + 2009-03-10 Nick Clifton <nickc@redhat.com> * po/id.po: Updated Indonesian translation. diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am index 06690749b31..a7e9a04834f 100644 --- a/opcodes/Makefile.am +++ b/opcodes/Makefile.am @@ -1065,7 +1065,8 @@ pj-dis.lo: pj-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ pj-opc.lo: pj-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/pj.h ppc-dis.lo: ppc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/ppc.h + $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h \ + $(INCDIR)/opcode/ppc.h ppc-opc.lo: ppc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/ppc.h opintl.h s390-mkopc.lo: s390-mkopc.c diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in index d05432fc575..578b38c04e2 100644 --- a/opcodes/Makefile.in +++ b/opcodes/Makefile.in @@ -155,6 +155,7 @@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBINTL = @LIBINTL@ LIBINTL_DEP = @LIBINTL_DEP@ +LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ @@ -1629,7 +1630,8 @@ pj-dis.lo: pj-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ pj-opc.lo: pj-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/pj.h ppc-dis.lo: ppc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/ppc.h + $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h \ + $(INCDIR)/opcode/ppc.h ppc-opc.lo: ppc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \ $(INCDIR)/opcode/ppc.h opintl.h s390-mkopc.lo: s390-mkopc.c diff --git a/opcodes/openrisc-opc.c b/opcodes/openrisc-opc.c index 9cfa8b91d1d..c3aa09deda3 100644 --- a/opcodes/openrisc-opc.c +++ b/opcodes/openrisc-opc.c @@ -671,7 +671,10 @@ openrisc_cgen_init_opcode_table (CGEN_CPU_DESC cd) const CGEN_OPCODE *oc = & openrisc_cgen_macro_insn_opcode_table[0]; CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN)); - memset (insns, 0, num_macros * sizeof (CGEN_INSN)); + /* This test has been added to avoid a warning generated + if memset is called with a third argument of value zero. */ + if (num_macros >= 1) + memset (insns, 0, num_macros * sizeof (CGEN_INSN)); for (i = 0; i < num_macros; ++i) { insns[i].base = &ib[i]; |