On 2019/04/14 22:26, Christian Weisgerber wrote:
> By my count there remain five ports than can ONLY be built with
> base-gcc:
>
> audio/festival/core
> devel/ti-msp430gcc
> editors/TeXmacs
> multimedia/avidemux
> sysutils/firmware/vmm
>
> These ports are living on borrowed time. base-gcc WILL go away,
> and possibly sooner than you think, so they will need to move to
> clang or ports-gcc or they will die.
>
> --
> Christian "naddy" Weisgerber [email protected]
>
This unbreaks ti-msp430gcc.
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/ti-msp430gcc/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- Makefile 29 Sep 2017 16:48:50 -0000 1.13
+++ Makefile 15 Apr 2019 14:23:41 -0000
@@ -1,13 +1,11 @@
# $OpenBSD: Makefile,v 1.13 2017/09/29 16:48:50 jca Exp $
BROKEN-alpha = relocation truncated to fit: GPRELHIGH against symbol
default_target_hard_regs
-# XXX base clang says: /usr/include/c++/v1/exception:267:5: error: no member
named 'fancy_abort' in namespace 'std::__1'; did you mean simply 'fancy_abort'?
-COMPILER = base-gcc
COMMENT = TI's open source compiler for MSP430 microcontrollers#'
V = 3_03_04_00
-REVISION = 3
+REVISION = 4
PKGNAME = ti-msp430gcc-${V:S/_/./g}
GCC_V = 4.9.1
CATEGORIES = devel
Index: patches/patch-sources_tools_gcc_bitmap_c
===================================================================
RCS file: patches/patch-sources_tools_gcc_bitmap_c
diff -N patches/patch-sources_tools_gcc_bitmap_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sources_tools_gcc_bitmap_c 15 Apr 2019 14:23:41 -0000
@@ -0,0 +1,29 @@
+$OpenBSD$
+
+clang fix
+
+Index: sources/tools/gcc/bitmap.c
+--- sources/tools/gcc/bitmap.c.orig
++++ sources/tools/gcc/bitmap.c
+@@ -2166,9 +2166,9 @@ print_statistics (bitmap_descriptor_d **slot, output_i
+ s[41] = 0;
+ fprintf (stderr,
+ "%-41s %9u"
+- " %15"HOST_WIDEST_INT_PRINT"d %15"HOST_WIDEST_INT_PRINT"d"
+- " %15"HOST_WIDEST_INT_PRINT"d"
+- " %10"HOST_WIDEST_INT_PRINT"d %10"HOST_WIDEST_INT_PRINT"d\n",
++ " %15" HOST_WIDEST_INT_PRINT "d %15" HOST_WIDEST_INT_PRINT "d"
++ " %15" HOST_WIDEST_INT_PRINT "d"
++ " %10" HOST_WIDEST_INT_PRINT "d %10" HOST_WIDEST_INT_PRINT "d\n",
+ s, d->created,
+ d->allocated, d->peak, d->current,
+ d->nsearches, d->search_iter);
+@@ -2201,7 +2201,7 @@ dump_bitmap_statistics (void)
+ bitmap_desc_hash.traverse <output_info *, print_statistics> (&info);
+ fprintf (stderr,
"---------------------------------------------------------------------------------\n");
+ fprintf (stderr,
+- "%-41s %9"HOST_WIDEST_INT_PRINT"d %15"HOST_WIDEST_INT_PRINT"d\n",
++ "%-41s %9" HOST_WIDEST_INT_PRINT "d %15" HOST_WIDEST_INT_PRINT "d\n",
+ "Total", info.count, info.size);
+ fprintf (stderr,
"---------------------------------------------------------------------------------\n");
+ }
Index: patches/patch-sources_tools_gcc_cgraph_c
===================================================================
RCS file: patches/patch-sources_tools_gcc_cgraph_c
diff -N patches/patch-sources_tools_gcc_cgraph_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sources_tools_gcc_cgraph_c 15 Apr 2019 14:23:41 -0000
@@ -0,0 +1,34 @@
+$OpenBSD$
+
+clang fix
+
+Index: sources/tools/gcc/cgraph.c
+--- sources/tools/gcc/cgraph.c.orig
++++ sources/tools/gcc/cgraph.c
+@@ -1976,7 +1976,7 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
+ fprintf (f, " First run: %i\n", node->tp_first_run);
+ fprintf (f, " Function flags:");
+ if (node->count)
+- fprintf (f, " executed "HOST_WIDEST_INT_PRINT_DEC"x",
++ fprintf (f, " executed " HOST_WIDEST_INT_PRINT_DEC "x",
+ (HOST_WIDEST_INT)node->count);
+ if (node->origin)
+ fprintf (f, " nested in: %s", node->origin->asm_name ());
+@@ -2028,7 +2028,7 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
+ fprintf (f, "%s/%i ", edge->caller->asm_name (),
+ edge->caller->order);
+ if (edge->count)
+- fprintf (f, "("HOST_WIDEST_INT_PRINT_DEC"x) ",
++ fprintf (f, "(" HOST_WIDEST_INT_PRINT_DEC "x) ",
+ (HOST_WIDEST_INT)edge->count);
+ if (edge->frequency)
+ fprintf (f, "(%.2f per call) ",
+@@ -2055,7 +2055,7 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
+ if (edge->indirect_inlining_edge)
+ fprintf (f, "(indirect_inlining) ");
+ if (edge->count)
+- fprintf (f, "("HOST_WIDEST_INT_PRINT_DEC"x) ",
++ fprintf (f, "(" HOST_WIDEST_INT_PRINT_DEC "x) ",
+ (HOST_WIDEST_INT)edge->count);
+ if (edge->frequency)
+ fprintf (f, "(%.2f per call) ",
Index: patches/patch-sources_tools_gcc_config_elfos_h
===================================================================
RCS file: patches/patch-sources_tools_gcc_config_elfos_h
diff -N patches/patch-sources_tools_gcc_config_elfos_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sources_tools_gcc_config_elfos_h 15 Apr 2019 14:23:41
-0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+clang fix
+
+Index: sources/tools/gcc/config/elfos.h
+--- sources/tools/gcc/config/elfos.h.orig
++++ sources/tools/gcc/config/elfos.h
+@@ -99,7 +99,7 @@ see the files COPYING3 and COPYING.RUNTIME respectivel
+
+ #undef ASM_OUTPUT_SKIP
+ #define ASM_OUTPUT_SKIP(FILE, SIZE) \
+- fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
++ fprintf ((FILE), "%s" HOST_WIDE_INT_PRINT_UNSIGNED "\n",\
+ SKIP_ASM_OP, (SIZE))
+
+ /* This is how to store into the string LABEL
+@@ -167,7 +167,7 @@ see the files COPYING3 and COPYING.RUNTIME respectivel
+ { \
+ fprintf ((FILE), "%s", COMMON_ASM_OP); \
+ assemble_name ((FILE), (NAME)); \
+- fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n",
\
++ fprintf ((FILE), "," HOST_WIDE_INT_PRINT_UNSIGNED ",%u\n",
\
+ (SIZE), (ALIGN) / BITS_PER_UNIT); \
+ } \
+ while (0)
Index: patches/patch-sources_tools_gcc_config_msp430_msp430_c
===================================================================
RCS file: patches/patch-sources_tools_gcc_config_msp430_msp430_c
diff -N patches/patch-sources_tools_gcc_config_msp430_msp430_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sources_tools_gcc_config_msp430_msp430_c 15 Apr 2019
14:23:41 -0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+clang fix
+
+Index: sources/tools/gcc/config/msp430/msp430.c
+--- sources/tools/gcc/config/msp430/msp430.c.orig
++++ sources/tools/gcc/config/msp430/msp430.c
+@@ -1667,7 +1667,7 @@ msp430_output_aligned_decl_common (FILE *
+ {
+ fprintf (stream, COMMON_ASM_OP);
+ assemble_name (stream, name);
+- fprintf (stream, ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n",
++ fprintf (stream, "," HOST_WIDE_INT_PRINT_UNSIGNED ",%u\n",
+ size, align / BITS_PER_UNIT);
+ }
+ else
+@@ -2209,7 +2209,7 @@ static struct
+ }
+ const_shift_helpers[] =
+ {
+-#define CSH(N,C,X,G) { "__mspabi_"N, C, X, gen_##G }
++#define CSH(N,C,X,G) { "__mspabi_" N, C, X, gen_##G }
+
+ CSH ("slli", 1, 1, slli_1),
+ CSH ("slll", 1, 1, slll_1),
Index: patches/patch-sources_tools_gcc_cppbuiltin_c
===================================================================
RCS file: patches/patch-sources_tools_gcc_cppbuiltin_c
diff -N patches/patch-sources_tools_gcc_cppbuiltin_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sources_tools_gcc_cppbuiltin_c 15 Apr 2019 14:23:41
-0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+clang fix
+
+Index: sources/tools/gcc/cppbuiltin.c
+--- sources/tools/gcc/cppbuiltin.c.orig
++++ sources/tools/gcc/cppbuiltin.c
+@@ -129,7 +129,7 @@ static void
+ define_builtin_macros_for_type_sizes (cpp_reader *pfile)
+ {
+ #define define_type_sizeof(NAME, TYPE) \
+- cpp_define_formatted (pfile, NAME"="HOST_WIDE_INT_PRINT_DEC, \
++ cpp_define_formatted (pfile, NAME "=" HOST_WIDE_INT_PRINT_DEC, \
+ tree_to_uhwi (TYPE_SIZE_UNIT (TYPE)))
+
+ define_type_sizeof ("__SIZEOF_INT__", integer_type_node);
Index: patches/patch-sources_tools_gcc_dwarf2cfi_c
===================================================================
RCS file: patches/patch-sources_tools_gcc_dwarf2cfi_c
diff -N patches/patch-sources_tools_gcc_dwarf2cfi_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sources_tools_gcc_dwarf2cfi_c 15 Apr 2019 14:23:41 -0000
@@ -0,0 +1,50 @@
+$OpenBSD$
+
+clang fix
+
+Index: sources/tools/gcc/dwarf2cfi.c
+--- sources/tools/gcc/dwarf2cfi.c.orig
++++ sources/tools/gcc/dwarf2cfi.c
+@@ -3180,7 +3180,7 @@ output_cfi_directive (FILE *f, dw_cfi_ref cfi)
+ case DW_CFA_offset_extended:
+ case DW_CFA_offset_extended_sf:
+ r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 1);
+- fprintf (f, "\t.cfi_offset %lu, "HOST_WIDE_INT_PRINT_DEC"\n",
++ fprintf (f, "\t.cfi_offset %lu, " HOST_WIDE_INT_PRINT_DEC "\n",
+ r, cfi->dw_cfi_oprnd2.dw_cfi_offset);
+ break;
+
+@@ -3203,7 +3203,7 @@ output_cfi_directive (FILE *f, dw_cfi_ref cfi)
+ case DW_CFA_def_cfa:
+ case DW_CFA_def_cfa_sf:
+ r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 1);
+- fprintf (f, "\t.cfi_def_cfa %lu, "HOST_WIDE_INT_PRINT_DEC"\n",
++ fprintf (f, "\t.cfi_def_cfa %lu, " HOST_WIDE_INT_PRINT_DEC "\n",
+ r, cfi->dw_cfi_oprnd2.dw_cfi_offset);
+ break;
+
+@@ -3221,7 +3221,7 @@ output_cfi_directive (FILE *f, dw_cfi_ref cfi)
+ case DW_CFA_def_cfa_offset:
+ case DW_CFA_def_cfa_offset_sf:
+ fprintf (f, "\t.cfi_def_cfa_offset "
+- HOST_WIDE_INT_PRINT_DEC"\n",
++ HOST_WIDE_INT_PRINT_DEC "\n",
+ cfi->dw_cfi_oprnd1.dw_cfi_offset);
+ break;
+
+@@ -3238,13 +3238,13 @@ output_cfi_directive (FILE *f, dw_cfi_ref cfi)
+ fprintf (f, "\t.cfi_escape %#x,", DW_CFA_GNU_args_size);
+ dw2_asm_output_data_uleb128_raw (cfi->dw_cfi_oprnd1.dw_cfi_offset);
+ if (flag_debug_asm)
+- fprintf (f, "\t%s args_size "HOST_WIDE_INT_PRINT_DEC,
++ fprintf (f, "\t%s args_size " HOST_WIDE_INT_PRINT_DEC,
+ ASM_COMMENT_START, cfi->dw_cfi_oprnd1.dw_cfi_offset);
+ fputc ('\n', f);
+ }
+ else
+ {
+- fprintf (f, "\t.cfi_GNU_args_size "HOST_WIDE_INT_PRINT_DEC "\n",
++ fprintf (f, "\t.cfi_GNU_args_size " HOST_WIDE_INT_PRINT_DEC "\n",
+ cfi->dw_cfi_oprnd1.dw_cfi_offset);
+ }
+ break;
Index: patches/patch-sources_tools_gcc_dwarf2out_c
===================================================================
RCS file: patches/patch-sources_tools_gcc_dwarf2out_c
diff -N patches/patch-sources_tools_gcc_dwarf2out_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sources_tools_gcc_dwarf2out_c 15 Apr 2019 14:23:41 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+clang fix
+
+Index: sources/tools/gcc/dwarf2out.c
+--- sources/tools/gcc/dwarf2out.c.orig
++++ sources/tools/gcc/dwarf2out.c
+@@ -5335,8 +5335,8 @@ print_die (dw_die_ref die, FILE *outfile)
+ fprintf (outfile, HOST_WIDE_INT_PRINT_UNSIGNED, AT_unsigned (a));
+ break;
+ case dw_val_class_const_double:
+- fprintf (outfile, "constant ("HOST_WIDE_INT_PRINT_DEC","\
+- HOST_WIDE_INT_PRINT_UNSIGNED")",
++ fprintf (outfile, "constant (" HOST_WIDE_INT_PRINT_DEC ","\
++ HOST_WIDE_INT_PRINT_UNSIGNED ")",
+ a->dw_attr_val.v.val_double.high,
+ a->dw_attr_val.v.val_double.low);
+ break;
Index: patches/patch-sources_tools_gcc_ipa-devirt_c
===================================================================
RCS file: patches/patch-sources_tools_gcc_ipa-devirt_c
diff -N patches/patch-sources_tools_gcc_ipa-devirt_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sources_tools_gcc_ipa-devirt_c 15 Apr 2019 14:23:41
-0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+clang fix
+
+Index: sources/tools/gcc/ipa-devirt.c
+--- sources/tools/gcc/ipa-devirt.c.orig
++++ sources/tools/gcc/ipa-devirt.c
+@@ -1633,7 +1633,7 @@ dump_possible_polymorphic_call_targets (FILE *f,
+ {
+ fprintf (f, " Contained in type:");
+ print_generic_expr (f, ctx.outer_type, TDF_SLIM);
+- fprintf (f, " at offset "HOST_WIDE_INT_PRINT_DEC"\n",
++ fprintf (f, " at offset " HOST_WIDE_INT_PRINT_DEC "\n",
+ ctx.offset);
+ }
+
Index: patches/patch-sources_tools_gcc_ipa-inline_c
===================================================================
RCS file: patches/patch-sources_tools_gcc_ipa-inline_c
diff -N patches/patch-sources_tools_gcc_ipa-inline_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sources_tools_gcc_ipa-inline_c 15 Apr 2019 14:23:41
-0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+clang fix
+
+Index: sources/tools/gcc/ipa-inline.c
+--- sources/tools/gcc/ipa-inline.c.orig
++++ sources/tools/gcc/ipa-inline.c
+@@ -1727,7 +1727,7 @@ inline_small_functions (void)
+ badness,
+ edge->frequency / (double)CGRAPH_FREQ_BASE);
+ if (edge->count)
+- fprintf (dump_file," Called "HOST_WIDEST_INT_PRINT_DEC"x\n",
++ fprintf (dump_file," Called " HOST_WIDEST_INT_PRINT_DEC "x\n",
+ edge->count);
+ if (dump_flags & TDF_DETAILS)
+ edge_badness (edge, true);
Index: patches/patch-sources_tools_gcc_ipa-profile_c
===================================================================
RCS file: patches/patch-sources_tools_gcc_ipa-profile_c
diff -N patches/patch-sources_tools_gcc_ipa-profile_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sources_tools_gcc_ipa-profile_c 15 Apr 2019 14:23:41
-0000
@@ -0,0 +1,43 @@
+$OpenBSD$
+
+clang fix
+
+Index: sources/tools/gcc/ipa-profile.c
+--- sources/tools/gcc/ipa-profile.c.orig
++++ sources/tools/gcc/ipa-profile.c
+@@ -163,7 +163,7 @@ dump_histogram (FILE *file, vec<histogram_entry *> his
+ {
+ cumulated_time += histogram[i]->count * histogram[i]->time;
+ cumulated_size += histogram[i]->size;
+- fprintf (file, " "HOST_WIDEST_INT_PRINT_DEC": time:%i (%2.2f) size:%i
(%2.2f)\n",
++ fprintf (file, " " HOST_WIDEST_INT_PRINT_DEC ": time:%i (%2.2f)
size:%i (%2.2f)\n",
+ (HOST_WIDEST_INT) histogram[i]->count,
+ histogram[i]->time,
+ cumulated_time * 100.0 / overall_time,
+@@ -516,7 +516,7 @@ ipa_profile (void)
+ {
+ gcov_type min, cumulated_time = 0, cumulated_size = 0;
+
+- fprintf (dump_file, "Overall time: "HOST_WIDEST_INT_PRINT_DEC"\n",
++ fprintf (dump_file, "Overall time: " HOST_WIDEST_INT_PRINT_DEC "\n",
+ (HOST_WIDEST_INT)overall_time);
+ min = get_hot_bb_threshold ();
+ for (i = 0; i < (int)histogram.length () && histogram[i]->count >=
min;
+@@ -525,7 +525,7 @@ ipa_profile (void)
+ cumulated_time += histogram[i]->count * histogram[i]->time;
+ cumulated_size += histogram[i]->size;
+ }
+- fprintf (dump_file, "GCOV min count: "HOST_WIDEST_INT_PRINT_DEC
++ fprintf (dump_file, "GCOV min count: " HOST_WIDEST_INT_PRINT_DEC
+ " Time:%3.2f%% Size:%3.2f%%\n",
+ (HOST_WIDEST_INT)min,
+ cumulated_time * 100.0 / overall_time,
+@@ -551,7 +551,7 @@ ipa_profile (void)
+ cumulated_time += histogram[i]->count * histogram[i]->time;
+ cumulated_size += histogram[i]->size;
+ }
+- fprintf (dump_file, "Determined min count: "HOST_WIDEST_INT_PRINT_DEC
++ fprintf (dump_file, "Determined min count: " HOST_WIDEST_INT_PRINT_DEC
+ " Time:%3.2f%% Size:%3.2f%%\n",
+ (HOST_WIDEST_INT)threshold,
+ cumulated_time * 100.0 / overall_time,
Index: patches/patch-sources_tools_gcc_ipa-prop_c
===================================================================
RCS file: patches/patch-sources_tools_gcc_ipa-prop_c
diff -N patches/patch-sources_tools_gcc_ipa-prop_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sources_tools_gcc_ipa-prop_c 15 Apr 2019 14:23:41 -0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+clang fix
+
+Index: sources/tools/gcc/ipa-prop.c
+--- sources/tools/gcc/ipa-prop.c.orig
++++ sources/tools/gcc/ipa-prop.c
+@@ -244,7 +244,7 @@ ipa_print_node_jump_functions_for_edge (FILE *f, struc
+ {
+ fprintf (f, "KNOWN TYPE: base ");
+ print_generic_expr (f, jump_func->value.known_type.base_type, 0);
+- fprintf (f, ", offset "HOST_WIDE_INT_PRINT_DEC", component ",
++ fprintf (f, ", offset " HOST_WIDE_INT_PRINT_DEC ", component ",
+ jump_func->value.known_type.offset);
+ print_generic_expr (f, jump_func->value.known_type.component_type, 0);
+ fprintf (f, "\n");
+@@ -284,7 +284,7 @@ ipa_print_node_jump_functions_for_edge (FILE *f, struc
+ else if (type == IPA_JF_ANCESTOR)
+ {
+ fprintf (f, "ANCESTOR: ");
+- fprintf (f, "%d, offset "HOST_WIDE_INT_PRINT_DEC", ",
++ fprintf (f, "%d, offset " HOST_WIDE_INT_PRINT_DEC ", ",
+ jump_func->value.ancestor.formal_id,
+ jump_func->value.ancestor.offset);
+ print_generic_expr (f, jump_func->value.ancestor.type, 0);
Index: patches/patch-sources_tools_gcc_loop-iv_c
===================================================================
RCS file: patches/patch-sources_tools_gcc_loop-iv_c
diff -N patches/patch-sources_tools_gcc_loop-iv_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sources_tools_gcc_loop-iv_c 15 Apr 2019 14:23:41 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+clang fix
+
+Index: sources/tools/gcc/loop-iv.c
+--- sources/tools/gcc/loop-iv.c.orig
++++ sources/tools/gcc/loop-iv.c
+@@ -2297,7 +2297,7 @@ determine_max_iter (struct loop *loop, struct niter_de
+ if (andmax)
+ nmax = MIN (nmax, andmax);
+ if (dump_file)
+- fprintf (dump_file, ";; Determined upper bound
"HOST_WIDEST_INT_PRINT_DEC".\n",
++ fprintf (dump_file, ";; Determined upper bound "
HOST_WIDEST_INT_PRINT_DEC ".\n",
+ nmax);
+ return nmax;
+ }
Index: patches/patch-sources_tools_gcc_profile_c
===================================================================
RCS file: patches/patch-sources_tools_gcc_profile_c
diff -N patches/patch-sources_tools_gcc_profile_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sources_tools_gcc_profile_c 15 Apr 2019 14:23:41 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+clang fix
+
+Index: sources/tools/gcc/profile.c
+--- sources/tools/gcc/profile.c.orig
++++ sources/tools/gcc/profile.c
+@@ -318,7 +318,7 @@ is_edge_inconsistent (vec<edge, va_gc> *edges)
+ if (dump_file)
+ {
+ fprintf (dump_file,
+- "Edge %i->%i is inconsistent,
count"HOST_WIDEST_INT_PRINT_DEC,
++ "Edge %i->%i is inconsistent, count"
HOST_WIDEST_INT_PRINT_DEC,
+ e->src->index, e->dest->index, e->count);
+ dump_bb (dump_file, e->src, 0, TDF_DETAILS);
+ dump_bb (dump_file, e->dest, 0, TDF_DETAILS);
Index: patches/patch-sources_tools_gcc_stor-layout_c
===================================================================
RCS file: patches/patch-sources_tools_gcc_stor-layout_c
diff -N patches/patch-sources_tools_gcc_stor-layout_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sources_tools_gcc_stor-layout_c 15 Apr 2019 14:23:41
-0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+clang fix
+
+Index: sources/tools/gcc/stor-layout.c
+--- sources/tools/gcc/stor-layout.c.orig
++++ sources/tools/gcc/stor-layout.c
+@@ -241,7 +241,7 @@ self_referential_size (tree size)
+ fntype = build_function_type (return_type, param_type_list);
+
+ /* Build the function declaration. */
+- sprintf (buf, "SZ"HOST_WIDE_INT_PRINT_UNSIGNED, fnno++);
++ sprintf (buf, "SZ" HOST_WIDE_INT_PRINT_UNSIGNED, fnno++);
+ fnname = get_file_function_name (buf);
+ fndecl = build_decl (input_location, FUNCTION_DECL, fnname, fntype);
+ for (t = param_decl_list; t; t = DECL_CHAIN (t))
Index: patches/patch-sources_tools_gcc_system_h
===================================================================
RCS file: patches/patch-sources_tools_gcc_system_h
diff -N patches/patch-sources_tools_gcc_system_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sources_tools_gcc_system_h 15 Apr 2019 14:23:41 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+Fix build with clang as system compiler.
+
+/usr/include/c++/v1/exception:267:5: error: no member named 'fancy_abort' in
namespace 'std::__1'; did you mean simply 'fancy_abort'?
+
+Index: sources/tools/gcc/system.h
+--- sources/tools/gcc/system.h.orig
++++ sources/tools/gcc/system.h
+@@ -203,6 +203,7 @@ extern int errno;
+
+ #ifdef __cplusplus
+ # include <cstring>
++# include <new>
+ #endif
+
+ /* Some of glibc's string inlines cause warnings. Plus we'd rather
Index: patches/patch-sources_tools_gcc_toplev_c
===================================================================
RCS file: patches/patch-sources_tools_gcc_toplev_c
diff -N patches/patch-sources_tools_gcc_toplev_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sources_tools_gcc_toplev_c 15 Apr 2019 14:23:41 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+clang fix
+
+Index: sources/tools/gcc/toplev.c
+--- sources/tools/gcc/toplev.c.orig
++++ sources/tools/gcc/toplev.c
+@@ -1041,7 +1041,7 @@ output_stack_usage (void)
+ }
+
+ fprintf (stack_usage_file,
+- "%s:%d:%d:%s\t"HOST_WIDE_INT_PRINT_DEC"\t%s\n",
++ "%s:%d:%d:%s\t" HOST_WIDE_INT_PRINT_DEC "\t%s\n",
+ lbasename (loc.file),
+ loc.line,
+ loc.column,
Index: patches/patch-sources_tools_gcc_tree-ssa-reassoc_c
===================================================================
RCS file: patches/patch-sources_tools_gcc_tree-ssa-reassoc_c
diff -N patches/patch-sources_tools_gcc_tree-ssa-reassoc_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sources_tools_gcc_tree-ssa-reassoc_c 15 Apr 2019 14:23:41
-0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+clang fix
+
+Index: sources/tools/gcc/tree-ssa-reassoc.c
+--- sources/tools/gcc/tree-ssa-reassoc.c.orig
++++ sources/tools/gcc/tree-ssa-reassoc.c
+@@ -4208,7 +4208,7 @@ attempt_builtin_powi (gimple stmt, vec<operand_entry_t
+ if (elt < vec_len - 1)
+ fputs (" * ", dump_file);
+ }
+- fprintf (dump_file, ")^"HOST_WIDE_INT_PRINT_DEC"\n",
++ fprintf (dump_file, ")^" HOST_WIDE_INT_PRINT_DEC "\n",
+ power);
+ }
+ }
+@@ -4242,7 +4242,7 @@ attempt_builtin_powi (gimple stmt, vec<operand_entry_t
+ if (elt < vec_len - 1)
+ fputs (" * ", dump_file);
+ }
+- fprintf (dump_file, ")^"HOST_WIDE_INT_PRINT_DEC"\n", power);
++ fprintf (dump_file, ")^" HOST_WIDE_INT_PRINT_DEC "\n", power);
+ }
+
+ reassociate_stats.pows_created++;
Index: patches/patch-sources_tools_gcc_value-prof_c
===================================================================
RCS file: patches/patch-sources_tools_gcc_value-prof_c
diff -N patches/patch-sources_tools_gcc_value-prof_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-sources_tools_gcc_value-prof_c 15 Apr 2019 14:23:41
-0000
@@ -0,0 +1,110 @@
+$OpenBSD$
+
+clang fix
+
+Index: sources/tools/gcc/value-prof.c
+--- sources/tools/gcc/value-prof.c.orig
++++ sources/tools/gcc/value-prof.c
+@@ -266,10 +266,10 @@ dump_histogram_value (FILE *dump_file, histogram_value
+ unsigned int i;
+ fprintf (dump_file, " [");
+ for (i = 0; i < hist->hdata.intvl.steps; i++)
+- fprintf (dump_file, " %d:"HOST_WIDEST_INT_PRINT_DEC,
++ fprintf (dump_file, " %d:" HOST_WIDEST_INT_PRINT_DEC,
+ hist->hdata.intvl.int_start + i,
+ (HOST_WIDEST_INT) hist->hvalue.counters[i]);
+- fprintf (dump_file, " ] outside range:"HOST_WIDEST_INT_PRINT_DEC,
++ fprintf (dump_file, " ] outside range:" HOST_WIDEST_INT_PRINT_DEC,
+ (HOST_WIDEST_INT) hist->hvalue.counters[i]);
+ }
+ fprintf (dump_file, ".\n");
+@@ -279,8 +279,8 @@ dump_histogram_value (FILE *dump_file, histogram_value
+ fprintf (dump_file, "Pow2 counter ");
+ if (hist->hvalue.counters)
+ {
+- fprintf (dump_file, "pow2:"HOST_WIDEST_INT_PRINT_DEC
+- " nonpow2:"HOST_WIDEST_INT_PRINT_DEC,
++ fprintf (dump_file, "pow2:" HOST_WIDEST_INT_PRINT_DEC
++ " nonpow2:" HOST_WIDEST_INT_PRINT_DEC,
+ (HOST_WIDEST_INT) hist->hvalue.counters[0],
+ (HOST_WIDEST_INT) hist->hvalue.counters[1]);
+ }
+@@ -291,9 +291,9 @@ dump_histogram_value (FILE *dump_file, histogram_value
+ fprintf (dump_file, "Single value ");
+ if (hist->hvalue.counters)
+ {
+- fprintf (dump_file, "value:"HOST_WIDEST_INT_PRINT_DEC
+- " match:"HOST_WIDEST_INT_PRINT_DEC
+- " wrong:"HOST_WIDEST_INT_PRINT_DEC,
++ fprintf (dump_file, "value:" HOST_WIDEST_INT_PRINT_DEC
++ " match:" HOST_WIDEST_INT_PRINT_DEC
++ " wrong:" HOST_WIDEST_INT_PRINT_DEC,
+ (HOST_WIDEST_INT) hist->hvalue.counters[0],
+ (HOST_WIDEST_INT) hist->hvalue.counters[1],
+ (HOST_WIDEST_INT) hist->hvalue.counters[2]);
+@@ -305,8 +305,8 @@ dump_histogram_value (FILE *dump_file, histogram_value
+ fprintf (dump_file, "Average value ");
+ if (hist->hvalue.counters)
+ {
+- fprintf (dump_file, "sum:"HOST_WIDEST_INT_PRINT_DEC
+- " times:"HOST_WIDEST_INT_PRINT_DEC,
++ fprintf (dump_file, "sum:" HOST_WIDEST_INT_PRINT_DEC
++ " times:" HOST_WIDEST_INT_PRINT_DEC,
+ (HOST_WIDEST_INT) hist->hvalue.counters[0],
+ (HOST_WIDEST_INT) hist->hvalue.counters[1]);
+ }
+@@ -317,7 +317,7 @@ dump_histogram_value (FILE *dump_file, histogram_value
+ fprintf (dump_file, "IOR value ");
+ if (hist->hvalue.counters)
+ {
+- fprintf (dump_file, "ior:"HOST_WIDEST_INT_PRINT_DEC,
++ fprintf (dump_file, "ior:" HOST_WIDEST_INT_PRINT_DEC,
+ (HOST_WIDEST_INT) hist->hvalue.counters[0]);
+ }
+ fprintf (dump_file, ".\n");
+@@ -327,9 +327,9 @@ dump_histogram_value (FILE *dump_file, histogram_value
+ fprintf (dump_file, "Constant delta ");
+ if (hist->hvalue.counters)
+ {
+- fprintf (dump_file, "value:"HOST_WIDEST_INT_PRINT_DEC
+- " match:"HOST_WIDEST_INT_PRINT_DEC
+- " wrong:"HOST_WIDEST_INT_PRINT_DEC,
++ fprintf (dump_file, "value:" HOST_WIDEST_INT_PRINT_DEC
++ " match:" HOST_WIDEST_INT_PRINT_DEC
++ " wrong:" HOST_WIDEST_INT_PRINT_DEC,
+ (HOST_WIDEST_INT) hist->hvalue.counters[0],
+ (HOST_WIDEST_INT) hist->hvalue.counters[1],
+ (HOST_WIDEST_INT) hist->hvalue.counters[2]);
+@@ -340,9 +340,9 @@ dump_histogram_value (FILE *dump_file, histogram_value
+ fprintf (dump_file, "Indirect call ");
+ if (hist->hvalue.counters)
+ {
+- fprintf (dump_file, "value:"HOST_WIDEST_INT_PRINT_DEC
+- " match:"HOST_WIDEST_INT_PRINT_DEC
+- " all:"HOST_WIDEST_INT_PRINT_DEC,
++ fprintf (dump_file, "value:" HOST_WIDEST_INT_PRINT_DEC
++ " match:" HOST_WIDEST_INT_PRINT_DEC
++ " all:" HOST_WIDEST_INT_PRINT_DEC,
+ (HOST_WIDEST_INT) hist->hvalue.counters[0],
+ (HOST_WIDEST_INT) hist->hvalue.counters[1],
+ (HOST_WIDEST_INT) hist->hvalue.counters[2]);
+@@ -353,7 +353,7 @@ dump_histogram_value (FILE *dump_file, histogram_value
+ fprintf (dump_file, "Time profile ");
+ if (hist->hvalue.counters)
+ {
+- fprintf (dump_file, "time:"HOST_WIDEST_INT_PRINT_DEC,
++ fprintf (dump_file, "time:" HOST_WIDEST_INT_PRINT_DEC,
+ (HOST_WIDEST_INT) hist->hvalue.counters[0]);
+ }
+ fprintf (dump_file, ".\n");
+@@ -1533,8 +1533,8 @@ gimple_ic_transform (gimple_stmt_iterator *gsi)
+ print_generic_expr (dump_file, direct_call->decl, TDF_SLIM);
+ fprintf (dump_file, " transformation on insn postponned to
ipa-profile");
+ print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM);
+- fprintf (dump_file, "hist->count "HOST_WIDEST_INT_PRINT_DEC
+- " hist->all "HOST_WIDEST_INT_PRINT_DEC"\n", count, all);
++ fprintf (dump_file, "hist->count " HOST_WIDEST_INT_PRINT_DEC
++ " hist->all " HOST_WIDEST_INT_PRINT_DEC"\n", count, all);
+ }
+
+ return true;