aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2008-07-07 13:43:38 +0000
committerH.J. Lu <hongjiu.lu@intel.com>2008-07-07 13:43:38 +0000
commit2b75b1686ad266868cad5b7e43e17360027a9e92 (patch)
treebebcd6a45b458776a2ee40c9a4232d95d650855b
parent0db1a4336b3fd6bcc5c3387240153cc06873c1f1 (diff)
Merged with trunk at revision 137561.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/ix86/avx@137563 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog56
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/config.gcc4
-rw-r--r--gcc/config/host-solaris.c8
-rw-r--r--gcc/config/ia64/ia64.c4
-rw-r--r--gcc/config/m68k/lb1sf68.asm36
-rw-r--r--gcc/config/m68k/m68k-devices.def30
-rw-r--r--gcc/config/m68k/m68k.c4
-rw-r--r--gcc/config/m68k/t-cf3
-rw-r--r--gcc/config/m68k/t-linux11
-rw-r--r--gcc/config/mips/mips.c40
-rw-r--r--gcc/config/mips/mips.h3
-rwxr-xr-xgcc/configure94
-rw-r--r--gcc/configure.ac1
-rw-r--r--gcc/doc/install.texi8
-rw-r--r--gcc/gcc.c2
-rw-r--r--gcc/ggc-common.c4
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-1.c6
-rw-r--r--gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-2.c8
-rw-r--r--gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-3.c23
-rw-r--r--gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-4.c23
-rw-r--r--libjava/ChangeLog9
-rw-r--r--libjava/Makefile.am3
-rw-r--r--libjava/Makefile.in5
-rw-r--r--libjava/gnu/gcj/convert/gen-from-JIS.c16
-rw-r--r--libjava/gnu/gcj/convert/make-trie.c1
27 files changed, 332 insertions, 80 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3dd4618a0b9..2bf1fd6e510 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,59 @@
+2008-07-07 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * config/m68k/m68k.c (m68k_return_in_memory): Fix arguments types.
+
+2008-07-07 Mark Shinwell <shinwell@codesourcery.com>
+
+ * config/m68k/lb1sf68.asm: Add PIC macros for Linux targets.
+
+2008-07-07 Maxim Kuvyrkov <maxim@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+
+ * config.gcc (m68k-*-linux*): Add with_arch. Add sysroot-suffix.h
+ to tm_file. Add m68k/t-floatlib, m68k/t-linux & m68k/t-mlibs to
+ tmake_file.
+ * config/m68k/t-linux: New.
+ * doc/install.texi: Document m68k-*-linux is now multilibbed by
+ default.
+
+2008-07-07 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config/m68k/t-cf (MULTILIB_EXTRA_OPTS): Add no-mac.
+ * config/m68k/m68k-devices.def: Remove multilibs that only differ
+ by MAC/EMAC.
+
+2008-07-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * gcc.c (execute): Fix -Wc++-compat warning.
+
+2008-07-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/36720
+ * config/ia64/ia64.c (ia64_split_tmode): Fix typo in TImode
+ constant for little endian.
+
+2008-07-06 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Check
+ mips_base_mips16 instead of TARGET_MIPS16.
+ (mips_base_mips16): Declare.
+ * config/mips/mips.c (mips_base_mips16): Make global.
+ (was_mips16_p): Remove GTY marker.
+ (was_mips16_pch_p): New variable.
+ (mips_set_mips16_mode): Check both was_mips16_p and was_mips16_pch_p.
+ (mips_override_options): Force to non-MIPS16 mode initially.
+ Do not complain about MIPS16 PIC incompatibilities here.
+ Only allow -mgpopt if -mexplicit-relocs is in force for
+ non-MIPS16 code.
+
+2008-07-06 Andreas Tobler <a.tobler@schweiz.org>
+
+ * configure.ac: Check for caddr_t, define to char * if not defined.
+ * configure: Regenerate.
+ * ggc-common.c (mmap_gt_pch_get_address): Fix -Wc++-compat warnings.
+ (mmap_gt_pch_use_address): Likewise.
+ * config/host-solaris.c (sol_gt_pch_use_address): Likewise.
+
2008-07-06 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (struct variable_info): Remove has_union.
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 66b648028b4..e0e8921cbc2 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20080706
+20080707
diff --git a/gcc/config.gcc b/gcc/config.gcc
index def16624a97..72c1e91d9ad 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1459,9 +1459,11 @@ m68k-*-linux*) # Motorola m68k's running GNU/Linux
# aka the GNU/Linux C library 6.
default_m68k_cpu=68020
default_cf_cpu=5475
- tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h m68k/linux.h"
+ with_arch=${with_arch:-m68k}
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h m68k/linux.h ./sysroot-suffix.h"
extra_options="${extra_options} m68k/ieee.opt"
tm_defines="${tm_defines} MOTOROLA=1"
+ tmake_file="${tmake_file} m68k/t-floatlib m68k/t-linux m68k/t-mlibs"
# if not configured with --enable-sjlj-exceptions, bump the
# libgcc version number
if test x$sjlj != x1; then
diff --git a/gcc/config/host-solaris.c b/gcc/config/host-solaris.c
index 9a471b49f4c..bde01db9813 100644
--- a/gcc/config/host-solaris.c
+++ b/gcc/config/host-solaris.c
@@ -42,7 +42,7 @@ sol_gt_pch_use_address (void *base, size_t size, int fd, size_t offset)
if (size == 0)
return -1;
- addr = mmap (base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE,
+ addr = mmap ((caddr_t) base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE,
fd, offset);
/* Solaris isn't good about honoring the mmap START parameter
@@ -55,18 +55,18 @@ sol_gt_pch_use_address (void *base, size_t size, int fd, size_t offset)
size_t i;
if (addr != (void *) MAP_FAILED)
- munmap (addr, size);
+ munmap ((caddr_t) addr, size);
errno = 0;
for (i = 0; i < size; i += page_size)
- if (mincore ((char *)base + i, page_size, (void *)&one_byte) == -1
+ if (mincore ((char *)base + i, page_size, (char *) &one_byte) == -1
&& errno == ENOMEM)
continue; /* The page is not mapped. */
else
break;
if (i >= size)
- addr = mmap (base, size,
+ addr = mmap ((caddr_t) base, size,
PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED,
fd, offset);
}
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index de39ab12946..e93ae31b0bd 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -1119,8 +1119,8 @@ ia64_split_tmode (rtx out[2], rtx in, bool reversed, bool dead)
}
else
{
- p[0] = (((unsigned HOST_WIDE_INT) l[3]) << 32) + l[2];
- p[1] = (((unsigned HOST_WIDE_INT) l[1]) << 32) + l[0];
+ p[0] = (((unsigned HOST_WIDE_INT) l[1]) << 32) + l[0];
+ p[1] = (((unsigned HOST_WIDE_INT) l[3]) << 32) + l[2];
}
out[0] = GEN_INT (p[0]);
out[1] = GEN_INT (p[1]);
diff --git a/gcc/config/m68k/lb1sf68.asm b/gcc/config/m68k/lb1sf68.asm
index d09213fc033..e03b7b30d87 100644
--- a/gcc/config/m68k/lb1sf68.asm
+++ b/gcc/config/m68k/lb1sf68.asm
@@ -129,10 +129,11 @@ Boston, MA 02110-1301, USA. */
#else /* __PIC__ */
- /* Common for -mid-shared-libary and -msep-data */
+ /* Common for Linux and uClinux, the latter with either
+ -mid-shared-library or -msep-data. */
.macro PICCALL addr
-#if defined (__mcoldfire__) && !defined (__mcfisab__)
+#if defined (__mcoldfire__) && !defined (__mcfisab__) && !defined (__mcfisac__)
lea \addr-.-8,a0
jsr pc@(a0)
#else
@@ -141,6 +142,9 @@ Boston, MA 02110-1301, USA. */
.endm
.macro PICJUMP addr
+ /* ISA C has no bra.l instruction, and since this assembly file
+ gets assembled into multiple object files, we avoid the
+ bra instruction entirely. */
#if defined (__mcoldfire__) && !defined (__mcfisab__)
lea \addr-.-8,a0
jmp pc@(a0)
@@ -149,7 +153,11 @@ Boston, MA 02110-1301, USA. */
#endif
.endm
-# if defined(__ID_SHARED_LIBRARY__)
+# if defined (__uClinux__)
+
+ /* Versions for uClinux */
+
+# if defined(__ID_SHARED_LIBRARY__)
/* -mid-shared-library versions */
@@ -163,7 +171,7 @@ Boston, MA 02110-1301, USA. */
movel \sym@GOT(\areg), sp@-
.endm
-# else /* !__ID_SHARED_LIBRARY__ */
+# else /* !__ID_SHARED_LIBRARY__ */
/* Versions for -msep-data */
@@ -175,7 +183,25 @@ Boston, MA 02110-1301, USA. */
movel \sym@GOT(a5), sp@-
.endm
-# endif /* !__ID_SHARED_LIBRARY__ */
+# endif
+
+# else /* !__uClinux__ */
+
+ /* Versions for Linux */
+
+ .macro PICLEA sym, reg
+ movel #_GLOBAL_OFFSET_TABLE_@GOTPC, \reg
+ lea (-6, pc, \reg), \reg
+ movel \sym@GOT(\reg), \reg
+ .endm
+
+ .macro PICPEA sym, areg
+ movel #_GLOBAL_OFFSET_TABLE_@GOTPC, \areg
+ lea (-6, pc, \areg), \areg
+ movel \sym@GOT(\areg), sp@-
+ .endm
+
+# endif
#endif /* __PIC__ */
diff --git a/gcc/config/m68k/m68k-devices.def b/gcc/config/m68k/m68k-devices.def
index 7b06e35b737..fb5cde3b451 100644
--- a/gcc/config/m68k/m68k-devices.def
+++ b/gcc/config/m68k/m68k-devices.def
@@ -63,7 +63,11 @@
There is a bit of duplication between devices in the same family,
but this approach makes scripting easier. We keep each entry on
- a single line for the same reason. */
+ a single line for the same reason.
+
+ As the compiler does not (currently) generate MAC or EMAC commands,
+ we do not need separate multilibs for cores that only differ in
+ their MAC functionality. */
/* 680x0 series processors. */
M68K_DEVICE ("68000", m68000, "68000", "68000", 68000, isa_00, 0)
@@ -86,31 +90,31 @@ M68K_DEVICE ("5206", mcf5206, "5206", "5206", cfv2, isa_a, 0)
M68K_DEVICE ("5206e", mcf5206e, "5206e", "5206e", cfv2, isa_a, FL_CF_HWDIV | FL_CF_MAC)
M68K_DEVICE ("5207", mcf5207, "5208", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_EMAC)
M68K_DEVICE ("5208", mcf5208, "5208", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_EMAC)
-M68K_DEVICE ("5210a", mcf5210a, "5211a", "5213", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_MAC)
-M68K_DEVICE ("5211a", mcf5211a, "5211a", "5213", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_MAC)
-M68K_DEVICE ("5211", mcf5211, "5213", "5213", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_MAC)
-M68K_DEVICE ("5212", mcf5212, "5213", "5213", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_MAC)
-M68K_DEVICE ("5213", mcf5213, "5213", "5213", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_MAC)
+M68K_DEVICE ("5210a", mcf5210a, "5211a", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_MAC)
+M68K_DEVICE ("5211a", mcf5211a, "5211a", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_MAC)
+M68K_DEVICE ("5211", mcf5211, "5213", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_MAC)
+M68K_DEVICE ("5212", mcf5212, "5213", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_MAC)
+M68K_DEVICE ("5213", mcf5213, "5213", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_MAC)
M68K_DEVICE ("5214", mcf5214, "5216", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_EMAC)
M68K_DEVICE ("5216", mcf5216, "5216", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_EMAC)
-M68K_DEVICE ("52221", mcf52221, "52223", "5213", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_MAC)
-M68K_DEVICE ("52223", mcf52223, "52223", "5213", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_MAC)
+M68K_DEVICE ("52221", mcf52221, "52223", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_MAC)
+M68K_DEVICE ("52223", mcf52223, "52223", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_MAC)
M68K_DEVICE ("52230", mcf52230, "52235", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_EMAC)
M68K_DEVICE ("52231", mcf52231, "52235", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_EMAC)
M68K_DEVICE ("52232", mcf52232, "52235", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_EMAC)
M68K_DEVICE ("52233", mcf52233, "52235", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_EMAC)
M68K_DEVICE ("52234", mcf52234, "52235", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_EMAC)
M68K_DEVICE ("52235", mcf52235, "52235", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_EMAC)
-M68K_DEVICE ("5224", mcf5224, "5225", "5213", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_MAC)
-M68K_DEVICE ("5225", mcf5225, "5225", "5213", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_MAC)
+M68K_DEVICE ("5224", mcf5224, "5225", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_MAC)
+M68K_DEVICE ("5225", mcf5225, "5225", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_MAC)
M68K_DEVICE ("5232", mcf5232, "5235", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_EMAC)
M68K_DEVICE ("5233", mcf5233, "5235", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_EMAC)
M68K_DEVICE ("5234", mcf5234, "5235", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_EMAC)
M68K_DEVICE ("5235", mcf5235, "5235", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_EMAC)
M68K_DEVICE ("523x", mcf523x, "5235", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_EMAC)
-M68K_DEVICE ("5249", mcf5249, "5249", "5249", cfv2, isa_a, FL_CF_HWDIV | FL_CF_EMAC)
-M68K_DEVICE ("5250", mcf5250, "5250", "5249", cfv2, isa_a, FL_CF_HWDIV | FL_CF_EMAC)
-M68K_DEVICE ("5253", mcf5253, "5253", "5249", cfv2, isa_a, FL_CF_HWDIV | FL_CF_EMAC)
+M68K_DEVICE ("5249", mcf5249, "5249", "5206e", cfv2, isa_a, FL_CF_HWDIV | FL_CF_EMAC)
+M68K_DEVICE ("5250", mcf5250, "5250", "5206e", cfv2, isa_a, FL_CF_HWDIV | FL_CF_EMAC)
+M68K_DEVICE ("5253", mcf5253, "5253", "5206e", cfv2, isa_a, FL_CF_HWDIV | FL_CF_EMAC)
M68K_DEVICE ("5270", mcf5270, "5271", "5208", cfv2, isa_aplus, FL_CF_HWDIV | FL_CF_EMAC)
M68K_DEVICE ("5271", mcf5271, "5271", "5208", cfv2, isa_aplus, FL_CF_HWDIV)
M68K_DEVICE ("5272", mcf5272, "5272", "5206e", cfv2, isa_a, FL_CF_HWDIV | FL_CF_MAC)
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index 046132088bc..1853073af81 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -148,7 +148,7 @@ static bool m68k_save_reg (unsigned int regno, bool interrupt_handler);
static bool m68k_ok_for_sibcall_p (tree, tree);
static bool m68k_rtx_costs (rtx, int, int, int *);
#if M68K_HONOR_TARGET_STRICT_ALIGNMENT
-static bool m68k_return_in_memory (tree, tree);
+static bool m68k_return_in_memory (const_tree, const_tree);
#endif
@@ -4627,7 +4627,7 @@ m68k_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED)
/* Worker function for TARGET_RETURN_IN_MEMORY. */
#if M68K_HONOR_TARGET_STRICT_ALIGNMENT
static bool
-m68k_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+m68k_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
{
enum machine_mode mode = TYPE_MODE (type);
diff --git a/gcc/config/m68k/t-cf b/gcc/config/m68k/t-cf
index 697946654af..7bf8e11ee82 100644
--- a/gcc/config/m68k/t-cf
+++ b/gcc/config/m68k/t-cf
@@ -2,3 +2,6 @@
M68K_MLIB_CPU += && (CPU ~ "^mcf")
M68K_ARCH := cf
+# Do not stamp the multilibs with a MAC type, as we never use those
+# instructions in compiler-generated code.
+MULTILIB_EXTRA_OPTS += Wa,-mno-mac
diff --git a/gcc/config/m68k/t-linux b/gcc/config/m68k/t-linux
new file mode 100644
index 00000000000..f46d3a873d5
--- /dev/null
+++ b/gcc/config/m68k/t-linux
@@ -0,0 +1,11 @@
+EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
+
+# Only include multilibs for CPUs with an MMU.
+M68K_MLIB_CPU += && match(FLAGS, "FL_MMU")
+
+# This rule uses MULTILIB_MATCHES to generate a definition of
+# SYSROOT_SUFFIX_SPEC.
+sysroot-suffix.h: $(srcdir)/config/m68k/print-sysroot-suffix.sh
+ $(SHELL) $(srcdir)/config/m68k/print-sysroot-suffix.sh \
+ "$(SYSTEM_HEADER_DIR)/../.." "$(MULTILIB_MATCHES)" \
+ "$(MULTILIB_OPTIONS)" > $@
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 48ba54b1cef..e8d51bcd40e 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -442,7 +442,7 @@ const struct mips_rtx_cost_data *mips_cost;
static int mips_base_target_flags;
/* True if MIPS16 is the default mode. */
-static bool mips_base_mips16;
+bool mips_base_mips16;
/* The ambient values of other global variables. */
static int mips_base_delayed_branch; /* flag_delayed_branch */
@@ -12333,8 +12333,14 @@ mips_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
}
/* The last argument passed to mips_set_mips16_mode, or negative if the
- function hasn't been called yet. */
-static GTY(()) int was_mips16_p = -1;
+ function hasn't been called yet.
+
+ There are two copies of this information. One is saved and restored
+ by the PCH process while the other is specific to this compiler
+ invocation. The information calculated by mips_set_mips16_mode
+ is invalid unless the two variables are the same. */
+static int was_mips16_p = -1;
+static GTY(()) int was_mips16_pch_p = -1;
/* Set up the target-dependent global state so that it matches the
current function's ISA mode. */
@@ -12342,7 +12348,8 @@ static GTY(()) int was_mips16_p = -1;
static void
mips_set_mips16_mode (int mips16_p)
{
- if (mips16_p == was_mips16_p)
+ if (mips16_p == was_mips16_p
+ && mips16_p == was_mips16_pch_p)
return;
/* Restore base settings of various flags. */
@@ -12417,11 +12424,12 @@ mips_set_mips16_mode (int mips16_p)
/* (Re)initialize MIPS target internals for new ISA. */
mips_init_relocs ();
- if (was_mips16_p >= 0)
+ if (was_mips16_p >= 0 || was_mips16_pch_p >= 0)
/* Reinitialize target-dependent state. */
target_reinit ();
was_mips16_p = mips16_p;
+ was_mips16_pch_p = mips16_p;
}
/* Implement TARGET_SET_CURRENT_FUNCTION. Decide whether the current
@@ -12627,6 +12635,10 @@ mips_override_options (void)
{
int i, start, regno, mode;
+ /* Process flags as though we were generating non-MIPS16 code. */
+ mips_base_mips16 = TARGET_MIPS16;
+ target_flags &= ~MASK_MIPS16;
+
#ifdef SUBTARGET_OVERRIDE_OPTIONS
SUBTARGET_OVERRIDE_OPTIONS;
#endif
@@ -12772,14 +12784,6 @@ mips_override_options (void)
target_flags &= ~MASK_ABICALLS;
}
- /* MIPS16 cannot generate PIC yet. */
- if (TARGET_MIPS16 && (flag_pic || TARGET_ABICALLS))
- {
- sorry ("MIPS16 PIC");
- target_flags &= ~MASK_ABICALLS;
- flag_pic = flag_pie = flag_shlib = 0;
- }
-
if (TARGET_ABICALLS)
/* We need to set flag_pic for executables as well as DSOs
because we may reference symbols that are not defined in
@@ -12807,7 +12811,7 @@ mips_override_options (void)
{
if (!TARGET_GPOPT)
{
- if (!TARGET_MIPS16 && !TARGET_EXPLICIT_RELOCS)
+ if (!TARGET_EXPLICIT_RELOCS)
error ("%<-mno-gpopt%> needs %<-mexplicit-relocs%>");
TARGET_LOCAL_SDATA = false;
@@ -12911,7 +12915,6 @@ mips_override_options (void)
target_flags |= MASK_FIX_R4400;
/* Save base state of options. */
- mips_base_mips16 = TARGET_MIPS16;
mips_base_target_flags = target_flags;
mips_base_delayed_branch = flag_delayed_branch;
mips_base_schedule_insns = flag_schedule_insns;
@@ -12921,8 +12924,11 @@ mips_override_options (void)
mips_base_align_jumps = align_jumps;
mips_base_align_functions = align_functions;
- /* Now select the ISA mode. */
- mips_set_mips16_mode (mips_base_mips16);
+ /* Now select the ISA mode.
+
+ Do all CPP-sensitive stuff in non-MIPS16 mode; we'll switch to
+ MIPS16 mode afterwards if need be. */
+ mips_set_mips16_mode (false);
/* We call dbr_schedule from within mips_reorg. */
flag_delayed_branch = 0;
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 781528d01ba..8518a86233b 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -390,7 +390,7 @@ enum mips_code_readable_setting {
else \
builtin_define ("__mips_fpr=32"); \
\
- if (TARGET_MIPS16) \
+ if (mips_base_mips16) \
builtin_define ("__mips16"); \
\
if (TARGET_MIPS3D) \
@@ -3232,6 +3232,7 @@ extern int mips_abi; /* which ABI to use */
extern const struct mips_cpu_info *mips_arch_info;
extern const struct mips_cpu_info *mips_tune_info;
extern const struct mips_rtx_cost_data *mips_cost;
+extern bool mips_base_mips16;
extern enum mips_code_readable_setting mips_code_readable;
#endif
diff --git a/gcc/configure b/gcc/configure
index f2b15d192e7..5d2ceb5308a 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -10326,6 +10326,72 @@ _ACEOF
fi
+echo "$as_me:$LINENO: checking for caddr_t" >&5
+echo $ECHO_N "checking for caddr_t... $ECHO_C" >&6
+if test "${ac_cv_type_caddr_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((caddr_t *) 0)
+ return 0;
+if (sizeof (caddr_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_caddr_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_caddr_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_caddr_t" >&5
+echo "${ECHO_T}$ac_cv_type_caddr_t" >&6
+if test $ac_cv_type_caddr_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define caddr_t char *
+_ACEOF
+
+fi
+
# Try to determine the array type of the second argument of getgroups
# for the target system (int or gid_t).
@@ -14659,13 +14725,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:14662: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:14728: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:14665: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:14731: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:14668: output\"" >&5)
+ (eval echo "\"\$as_me:14734: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -15720,7 +15786,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 15723 "configure"' > conftest.$ac_ext
+ echo '#line 15789 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -16340,11 +16406,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16343: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16409: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16347: \$? = $ac_status" >&5
+ echo "$as_me:16413: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16662,11 +16728,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16665: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16731: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16669: \$? = $ac_status" >&5
+ echo "$as_me:16735: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16767,11 +16833,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16770: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16836: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16774: \$? = $ac_status" >&5
+ echo "$as_me:16840: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -16822,11 +16888,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16825: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16891: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16829: \$? = $ac_status" >&5
+ echo "$as_me:16895: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -19619,7 +19685,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 19622 "configure"
+#line 19688 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -19719,7 +19785,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 19722 "configure"
+#line 19788 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 31b448720a2..1e9e8d87b78 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1010,6 +1010,7 @@ int main()
fi
AC_CHECK_TYPE(ssize_t, int)
+AC_CHECK_TYPE(caddr_t, char *)
# Try to determine the array type of the second argument of getgroups
# for the target system (int or gid_t).
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 86c2f46a49e..8913ec0c923 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -3427,15 +3427,17 @@ applications. There are no standard Unix configurations.
@end html
@heading @anchor{m68k-x-x}m68k-*-*
By default, @samp{m68k-*-aout}, @samp{m68k-*-coff*},
-@samp{m68k-*-elf*}, @samp{m68k-*-rtems} and @samp{m68k-*-uclinux}
+@samp{m68k-*-elf*}, @samp{m68k-*-rtems}, @samp{m68k-*-uclinux} and
+@samp{m68k-*-linux}
build libraries for both M680x0 and ColdFire processors. If you only
need the M680x0 libraries, you can omit the ColdFire ones by passing
@option{--with-arch=m68k} to @command{configure}. Alternatively, you
can omit the M680x0 libraries by passing @option{--with-arch=cf} to
-@command{configure}. These targets default to 5206 code when
+@command{configure}. These targets default to 5206 or 5475 code as
+appropriate for the target system when
configured with @option{--with-arch=cf} and 68020 code otherwise.
-The @samp{m68k-*-linux-gnu}, @samp{m68k-*-netbsd} and
+The @samp{m68k-*-netbsd} and
@samp{m68k-*-openbsd} targets also support the @option{--with-arch}
option. They will generate ColdFire CFV4e code when configured with
@option{--with-arch=cf} and 68020 code otherwise.
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 3da40a8c2a7..00533247163 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -2973,7 +2973,7 @@ execute (void)
for (argc = 0; commands[i].argv[argc] != NULL; argc++)
;
- argv = alloca ((argc + 3) * sizeof (char *));
+ argv = XALLOCAVEC (const char *, argc + 3);
argv[0] = VALGRIND_PATH;
argv[1] = "-q";
diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c
index d1022a1da85..8c0e459fe38 100644
--- a/gcc/ggc-common.c
+++ b/gcc/ggc-common.c
@@ -638,7 +638,7 @@ mmap_gt_pch_get_address (size_t size, int fd)
if (ret == (void *) MAP_FAILED)
ret = NULL;
else
- munmap (ret, size);
+ munmap ((caddr_t) ret, size);
return ret;
}
@@ -662,7 +662,7 @@ mmap_gt_pch_use_address (void *base, size_t size, int fd, size_t offset)
if (size == 0)
return -1;
- addr = mmap (base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE,
+ addr = mmap ((caddr_t) base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE,
fd, offset);
return addr == base ? 1 : -1;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 25c118edec2..841f216c136 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2008-07-06 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/gcc-have-sync-compare-and-swap-1.c: Expect the
+ macros to be defined for MIPS16 too.
+ * gcc.target/mips/gcc-have-sync-compare-and-swap-2.c: Likewise.
+ * gcc.target/mips/gcc-have-sync-compare-and-swap-3.c: New test.
+ * gcc.target/mips/gcc-have-sync-compare-and-swap-4.c: Likewise.
+
2008-07-06 Richard Guenther <rguenther@suse.de>
* gcc.dg/tree-ssa/pta-callused.c: Adjust testcase.
diff --git a/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-1.c b/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-1.c
index 4c642258f7b..c12d08e0521 100644
--- a/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-1.c
+++ b/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-1.c
@@ -1,15 +1,15 @@
/* { dg-do preprocess } */
/* { dg-mips-options "-mips2" } */
-#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1) == defined (__mips16)
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1
#error nonono
#endif
-#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) == defined (__mips16)
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2
#error nonono
#endif
-#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) == defined (__mips16)
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
#error nonono
#endif
diff --git a/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-2.c b/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-2.c
index 4265e4167ba..eaae7801754 100644
--- a/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-2.c
+++ b/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-2.c
@@ -1,19 +1,19 @@
/* { dg-do preprocess } */
/* { dg-mips-options "-mgp64" } */
-#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1) == defined (__mips16)
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1
#error nonono
#endif
-#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) == defined (__mips16)
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2
#error nonono
#endif
-#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) == defined (__mips16)
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
#error nonono
#endif
-#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) == defined (__mips16)
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
#error nonono
#endif
diff --git a/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-3.c b/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-3.c
new file mode 100644
index 00000000000..faf50fc69ca
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-3.c
@@ -0,0 +1,23 @@
+/* { dg-do preprocess { target mips16_attribute } } */
+/* { dg-mips-options "-mips2 -mips16" } */
+/* { dg-add-options mips16_attribute } */
+
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1
+#error nonono
+#endif
+
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2
+#error nonono
+#endif
+
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
+#error nonono
+#endif
+
+#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
+#error nonono
+#endif
+
+#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
+#error nonono
+#endif
diff --git a/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-4.c b/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-4.c
new file mode 100644
index 00000000000..b53f4b05b61
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-4.c
@@ -0,0 +1,23 @@
+/* { dg-do preprocess { target mips16_attribute } } */
+/* { dg-mips-options "-mgp64 -mips16" } */
+/* { dg-add-options mips16_attribute } */
+
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1
+#error nonono
+#endif
+
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2
+#error nonono
+#endif
+
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
+#error nonono
+#endif
+
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
+#error nonono
+#endif
+
+#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
+#error nonono
+#endif
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index d0c1d068dbb..4fb9d68fb3f 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,12 @@
+2008-07-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * gnu/gcj/convert/make-trie.h: New.
+ * gnu/gcj/convert/gen-from-JIS.c: Include it.
+ * gnu/gcj/convert/make-trie.c: Likewise.
+ Fix typos and compiler warnings, diagnose a missing argument.
+ * Makefile.am (gen_from_JIS_SOURCES): Add gnu/gcj/convert/make-trie.h.
+ * Makefile.in: Regenerate.
+
2008-06-30 Joshua Sumali <jsumali@redhat.com>
Andrew Haley <aph@redhat.com>
diff --git a/libjava/Makefile.am b/libjava/Makefile.am
index c074f5752a0..ce6dbd201f7 100644
--- a/libjava/Makefile.am
+++ b/libjava/Makefile.am
@@ -727,7 +727,8 @@ noinst_PROGRAMS = gen-from-JIS
gen_from_JIS_SOURCES = \
gnu/gcj/convert/gen-from-JIS.c \
- gnu/gcj/convert/make-trie.c
+ gnu/gcj/convert/make-trie.c \
+ gnu/gcj/convert/make-trie.h
gen_from_JIS_DEPENDENCIES = \
gnu/gcj/convert/JIS0201.h \
diff --git a/libjava/Makefile.in b/libjava/Makefile.in
index ba487885efc..4aab2bcc835 100644
--- a/libjava/Makefile.in
+++ b/libjava/Makefile.in
@@ -471,7 +471,7 @@ gcj_dbtool_OBJECTS = $(am_gcj_dbtool_OBJECTS)
am_gcjh_OBJECTS =
gcjh_OBJECTS = $(am_gcjh_OBJECTS)
am__gen_from_JIS_SOURCES_DIST = gnu/gcj/convert/gen-from-JIS.c \
- gnu/gcj/convert/make-trie.c
+ gnu/gcj/convert/make-trie.c gnu/gcj/convert/make-trie.h
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@am_gen_from_JIS_OBJECTS = gnu/gcj/convert/gen-from-JIS.$(OBJEXT) \
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@ gnu/gcj/convert/make-trie.$(OBJEXT)
gen_from_JIS_OBJECTS = $(am_gen_from_JIS_OBJECTS)
@@ -8176,7 +8176,8 @@ extra_headers = java/lang/Object.h java/lang/Class.h
install_data_local_split = 50
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@gen_from_JIS_SOURCES = \
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@ gnu/gcj/convert/gen-from-JIS.c \
-@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@ gnu/gcj/convert/make-trie.c
+@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@ gnu/gcj/convert/make-trie.c \
+@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@ gnu/gcj/convert/make-trie.h
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@gen_from_JIS_DEPENDENCIES = \
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@ gnu/gcj/convert/JIS0201.h \
diff --git a/libjava/gnu/gcj/convert/gen-from-JIS.c b/libjava/gnu/gcj/convert/gen-from-JIS.c
index 13745805ab8..d4cca14474e 100644
--- a/libjava/gnu/gcj/convert/gen-from-JIS.c
+++ b/libjava/gnu/gcj/convert/gen-from-JIS.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999 Free Software Foundation
+/* Copyright (C) 1999, 2008 Free Software Foundation
This file is part of libgcj.
@@ -7,6 +7,10 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include "make-trie.h"
+
struct chval
{
unsigned char b1; /* 1st byte */
@@ -59,6 +63,11 @@ main(int argc, char** argv)
int low1_uc = 0xFFFF, high1_uc = 0;
int low2_uc = 0xFFFF, high2_uc = 0;
int i; int row, col;
+ if (argc < 2)
+ {
+ fprintf (stderr, "missing argument!\n");
+ exit (-1);
+ }
if (strcmp (argv[1], "JIS0208") == 0)
chtab = chtab_0208;
else if (strcmp (argv[1], "JIS0212") == 0)
@@ -106,8 +115,7 @@ main(int argc, char** argv)
fprintf(out,"/* This file is automatically generated from %s.TXT. */\n",
argv[1]);
- fprintf(out,"#pragma GCC java_exceptions\n",
- argv[1]);
+ fprintf(out,"#pragma GCC java_exceptions\n");
fprintf(out, "unsigned short %s_to_Unicode[%d][%d] = {\n",
argv[1], max1 - min1 + 1, max2 - min2 + 1);
i = 0;
@@ -156,7 +164,7 @@ main(int argc, char** argv)
}
else
{
- fprintf (stderr, "error - char table our of order!\n");
+ fprintf (stderr, "error - char table out of order!\n");
exit (-1);
}
if (col != max2)
diff --git a/libjava/gnu/gcj/convert/make-trie.c b/libjava/gnu/gcj/convert/make-trie.c
index e89f70c5c9f..fe2d7892641 100644
--- a/libjava/gnu/gcj/convert/make-trie.c
+++ b/libjava/gnu/gcj/convert/make-trie.c
@@ -8,6 +8,7 @@ details. */
#include <stdio.h>
#include <stdlib.h>
+#include "make-trie.h"
typedef struct trie_node
{