summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2013-12-20 14:56:52 +0000
committerpfg <pfg@FreeBSD.org>2013-12-20 14:56:52 +0000
commit68da7851b393603427f5fa338675e181b24b5878 (patch)
tree463ef9ca8b985dfbd15a2a02e322e81bb261be75 /contrib/gcc
parent10b4f63c53d77d153d755def23e304c3bf48f1e3 (diff)
downloadFreeBSD-src-68da7851b393603427f5fa338675e181b24b5878.zip
FreeBSD-src-68da7851b393603427f5fa338675e181b24b5878.tar.gz
gcc: more diff reductions against Apple GCC.
Mostly cosmetical changes to aid further merges. Obtained from: gcc 4.3 (rev. 120611, 124839; GPLv2) MFC after: 1 week
Diffstat (limited to 'contrib/gcc')
-rw-r--r--contrib/gcc/ChangeLog.gcc4316
-rw-r--r--contrib/gcc/config/darwin.h4
-rw-r--r--contrib/gcc/cp/ChangeLog.gcc434
-rw-r--r--contrib/gcc/cp/Make-lang.in2
-rw-r--r--contrib/gcc/cp/mangle.c2
-rw-r--r--contrib/gcc/cp/rtti.c8
-rw-r--r--contrib/gcc/doc/tm.texi6
-rw-r--r--contrib/gcc/dwarf2out.c11
-rw-r--r--contrib/gcc/sched-vis.c5
-rw-r--r--contrib/gcc/target-def.h5
-rw-r--r--contrib/gcc/target.h4
-rw-r--r--contrib/gcc/tree-dump.c2
12 files changed, 58 insertions, 11 deletions
diff --git a/contrib/gcc/ChangeLog.gcc43 b/contrib/gcc/ChangeLog.gcc43
index a252390..aa51b08 100644
--- a/contrib/gcc/ChangeLog.gcc43
+++ b/contrib/gcc/ChangeLog.gcc43
@@ -150,6 +150,14 @@
regs_invalidated_by_call, rather than just checking the
membership of REGNO (REG).
+2007-05-18 Geoffrey Keating <geoffk@apple.com> (r124839)
+
+ * dwarf2out.c (print_die): Use '%ld' not '%lu' to print a 'long'.
+ (output_die): Use 'unsigned long' with %x.
+ * sched-vis.c (print_value): Use 'unsigned HOST_WIDE_INT' and
+ HOST_WIDE_INT_PRINT_HEX to print HOST_WIDE_INT.
+ * tree-dump.c (dump_pointer): Use 'unsigned long' for %lx.
+
2007-05-16 Eric Christopher <echristo@apple.com> (r124763)
* config/rs6000/rs6000.c (rs6000_emit_prologue): Move altivec register
@@ -470,6 +478,14 @@
* c-common.c (vector_types_convertible_p): Treat opaque types as
always convertible if they have the same size, but not otherwise.
+2007-01-08 Geoffrey Keating <geoffk@apple.com> (r120611)
+
+ * target.h (struct gcc_target): New field library_rtti_comdat.
+ * target-def.h (TARGET_CXX_LIBRARY_RTTI_COMDAT): New.
+ (TARGET_CXX): Add TARGET_CXX_LIBRARY_RTTI_COMDAT.
+ * doc/tm.texi (C++ ABI): Document TARGET_CXX_LIBRARY_RTTI_COMDAT.
+ * config/darwin.h (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
+
2007-01-08 Mark Shinwell <shinwell@codesourcery.com> (r120572)
* c.opt: Add -flax-vector-conversions.
diff --git a/contrib/gcc/config/darwin.h b/contrib/gcc/config/darwin.h
index 9467bad..f4d4c7e 100644
--- a/contrib/gcc/config/darwin.h
+++ b/contrib/gcc/config/darwin.h
@@ -467,6 +467,10 @@ extern GTY(()) int darwin_ms_struct;
with names, so it's safe to make the class data not comdat. */
#define TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT hook_bool_void_false
+/* For efficiency, on Darwin the RTTI information that is always
+ emitted in the standard C++ library should not be COMDAT. */
+#define TARGET_CXX_LIBRARY_RTTI_COMDAT hook_bool_void_false
+
/* We make exception information linkonce. */
#undef TARGET_USES_WEAK_UNWIND_INFO
#define TARGET_USES_WEAK_UNWIND_INFO 1
diff --git a/contrib/gcc/cp/ChangeLog.gcc43 b/contrib/gcc/cp/ChangeLog.gcc43
index ae3005c..ed0735f 100644
--- a/contrib/gcc/cp/ChangeLog.gcc43
+++ b/contrib/gcc/cp/ChangeLog.gcc43
@@ -35,6 +35,10 @@
* typeck.c (build_binary_op): Include types in error.
+2007-05-18 Geoffrey Keating <geoffk@apple.com> (r124839)
+
+ * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
+
2007-05-05 Geoffrey Keating <geoffk@apple.com> (r124467)
PR 31775
diff --git a/contrib/gcc/cp/Make-lang.in b/contrib/gcc/cp/Make-lang.in
index ea03357..c863913 100644
--- a/contrib/gcc/cp/Make-lang.in
+++ b/contrib/gcc/cp/Make-lang.in
@@ -265,7 +265,7 @@ cp/tree.o: cp/tree.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) toplev.h $(RTL_H) \
$(TARGET_H) debug.h
cp/ptree.o: cp/ptree.c $(CXX_TREE_H) $(TM_H)
cp/rtti.o: cp/rtti.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) toplev.h convert.h \
- gt-cp-rtti.h
+ $(TARGET_H) gt-cp-rtti.h
cp/except.o: cp/except.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) $(RTL_H) except.h \
toplev.h cp/cfns.h $(EXPR_H) libfuncs.h $(TREE_INLINE_H) $(TARGET_H)
cp/expr.o: cp/expr.c $(CXX_TREE_H) $(TM_H) $(RTL_H) $(FLAGS_H) $(EXPR_H) \
diff --git a/contrib/gcc/cp/mangle.c b/contrib/gcc/cp/mangle.c
index c327133..8bfdc20 100644
--- a/contrib/gcc/cp/mangle.c
+++ b/contrib/gcc/cp/mangle.c
@@ -1340,7 +1340,7 @@ write_real_cst (const tree value)
for (; i != limit; i += dir)
{
- sprintf (buffer, "%08lx", target_real[i]);
+ sprintf (buffer, "%08lx", (unsigned long) target_real[i]);
write_chars (buffer, 8);
}
}
diff --git a/contrib/gcc/cp/rtti.c b/contrib/gcc/cp/rtti.c
index 077d3e0..5e58e5c 100644
--- a/contrib/gcc/cp/rtti.c
+++ b/contrib/gcc/cp/rtti.c
@@ -32,6 +32,7 @@ Boston, MA 02110-1301, USA. */
#include "assert.h"
#include "toplev.h"
#include "convert.h"
+#include "target.h"
/* C++ returns type information to the user in struct type_info
objects. We also use type information to implement dynamic_cast and
@@ -1427,8 +1428,11 @@ emit_support_tinfos (void)
comdat_linkage for details.) Since we want these objects
to have external linkage so that copies do not have to be
emitted in code outside the runtime library, we make them
- non-COMDAT here. */
- if (!flag_weak)
+ non-COMDAT here.
+
+ It might also not be necessary to follow this detail of the
+ ABI. */
+ if (!flag_weak || ! targetm.cxx.library_rtti_comdat ())
{
gcc_assert (TREE_PUBLIC (tinfo) && !DECL_COMDAT (tinfo));
DECL_INTERFACE_KNOWN (tinfo) = 1;
diff --git a/contrib/gcc/doc/tm.texi b/contrib/gcc/doc/tm.texi
index 0bc2784..8befbe5 100644
--- a/contrib/gcc/doc/tm.texi
+++ b/contrib/gcc/doc/tm.texi
@@ -8953,6 +8953,12 @@ classes whose virtual table will be emitted in only one translation
unit will not be COMDAT.
@end deftypefn
+@deftypefn {Target Hook} bool TARGET_CXX_LIBRARY_RTTI_COMDAT (void)
+This hook returns true (the default) if the RTTI information for
+the basic types which is defined in the C++ runtime should always
+be COMDAT, false if it should not be COMDAT.
+@end deftypefn
+
@deftypefn {Target Hook} bool TARGET_CXX_USE_AEABI_ATEXIT (void)
This hook returns true if @code{__aeabi_atexit} (as defined by the ARM EABI)
should be used to register static destructors when @option{-fuse-cxa-atexit}
diff --git a/contrib/gcc/dwarf2out.c b/contrib/gcc/dwarf2out.c
index 266973a..2a35206 100644
--- a/contrib/gcc/dwarf2out.c
+++ b/contrib/gcc/dwarf2out.c
@@ -5741,11 +5741,11 @@ print_die (dw_die_ref die, FILE *outfile)
unsigned ix;
print_spaces (outfile);
- fprintf (outfile, "DIE %4lu: %s\n",
+ fprintf (outfile, "DIE %4ld: %s\n",
die->die_offset, dwarf_tag_name (die->die_tag));
print_spaces (outfile);
fprintf (outfile, " abbrev id: %lu", die->die_abbrev);
- fprintf (outfile, " offset: %lu\n", die->die_offset);
+ fprintf (outfile, " offset: %ld\n", die->die_offset);
for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++)
{
@@ -5793,7 +5793,7 @@ print_die (dw_die_ref die, FILE *outfile)
if (AT_ref (a)->die_symbol)
fprintf (outfile, "die -> label: %s", AT_ref (a)->die_symbol);
else
- fprintf (outfile, "die -> %lu", AT_ref (a)->die_offset);
+ fprintf (outfile, "die -> %ld", AT_ref (a)->die_offset);
}
else
fprintf (outfile, "die -> <null>");
@@ -7063,7 +7063,8 @@ output_die (dw_die_ref die)
output_die_symbol (die);
dw2_asm_output_data_uleb128 (die->die_abbrev, "(DIE (0x%lx) %s)",
- die->die_offset, dwarf_tag_name (die->die_tag));
+ (unsigned long)die->die_offset,
+ dwarf_tag_name (die->die_tag));
for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++)
{
@@ -7245,7 +7246,7 @@ output_die (dw_die_ref die)
/* Add null byte to terminate sibling list. */
if (die->die_child != NULL)
dw2_asm_output_data (1, 0, "end of children of DIE 0x%lx",
- die->die_offset);
+ (unsigned long) die->die_offset);
}
/* Output the compilation unit that appears at the beginning of the
diff --git a/contrib/gcc/sched-vis.c b/contrib/gcc/sched-vis.c
index 2012955..fec0bb7 100644
--- a/contrib/gcc/sched-vis.c
+++ b/contrib/gcc/sched-vis.c
@@ -430,7 +430,10 @@ print_value (char *buf, rtx x, int verbose)
if (FLOAT_MODE_P (GET_MODE (x)))
real_to_decimal (t, CONST_DOUBLE_REAL_VALUE (x), sizeof (t), 0, 1);
else
- sprintf (t, "<0x%lx,0x%lx>", (long) CONST_DOUBLE_LOW (x), (long) CONST_DOUBLE_HIGH (x));
+ sprintf (t,
+ "<" HOST_WIDE_INT_PRINT_HEX "," HOST_WIDE_INT_PRINT_HEX ">",
+ (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x),
+ (unsigned HOST_WIDE_INT) CONST_DOUBLE_HIGH (x));
cur = safe_concat (buf, cur, t);
break;
case CONST_STRING:
diff --git a/contrib/gcc/target-def.h b/contrib/gcc/target-def.h
index 653d6fd..65b6079 100644
--- a/contrib/gcc/target-def.h
+++ b/contrib/gcc/target-def.h
@@ -587,6 +587,10 @@ Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT hook_bool_void_true
#endif
+#ifndef TARGET_CXX_LIBRARY_RTTI_COMDAT
+#define TARGET_CXX_LIBRARY_RTTI_COMDAT hook_bool_void_true
+#endif
+
#ifndef TARGET_CXX_USE_AEABI_ATEXIT
#define TARGET_CXX_USE_AEABI_ATEXIT hook_bool_void_false
#endif
@@ -606,6 +610,7 @@ Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
TARGET_CXX_KEY_METHOD_MAY_BE_INLINE, \
TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY, \
TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT, \
+ TARGET_CXX_LIBRARY_RTTI_COMDAT, \
TARGET_CXX_USE_AEABI_ATEXIT, \
TARGET_CXX_ADJUST_CLASS_AT_DEFINITION \
}
diff --git a/contrib/gcc/target.h b/contrib/gcc/target.h
index f407bb7..282871b 100644
--- a/contrib/gcc/target.h
+++ b/contrib/gcc/target.h
@@ -783,6 +783,10 @@ struct gcc_target
class data for classes whose virtual table will be emitted in
only one translation unit will not be COMDAT. */
bool (*class_data_always_comdat) (void);
+ /* Returns true (the default) if the RTTI for the basic types,
+ which is always defined in the C++ runtime, should be COMDAT;
+ false if it should not be COMDAT. */
+ bool (*library_rtti_comdat) (void);
/* Returns true if __aeabi_atexit should be used to register static
destructors. */
bool (*use_aeabi_atexit) (void);
diff --git a/contrib/gcc/tree-dump.c b/contrib/gcc/tree-dump.c
index d97dc83..0924bb4 100644
--- a/contrib/gcc/tree-dump.c
+++ b/contrib/gcc/tree-dump.c
@@ -166,7 +166,7 @@ void
dump_pointer (dump_info_p di, const char *field, void *ptr)
{
dump_maybe_newline (di);
- fprintf (di->stream, "%-4s: %-8lx ", field, (long) ptr);
+ fprintf (di->stream, "%-4s: %-8lx ", field, (unsigned long) ptr);
di->column += 15;
}
OpenPOWER on IntegriCloud