Here is a start at an update to GCC 8.3.0. Build tested on amd64.
Index: Makefile =================================================================== RCS file: /home/cvs/ports/lang/gcc/8/Makefile,v retrieving revision 1.6 diff -u -p -u -p -r1.6 Makefile --- Makefile 12 Feb 2019 18:37:17 -0000 1.6 +++ Makefile 22 Feb 2019 19:05:41 -0000 @@ -10,29 +10,28 @@ ONLY_FOR_ARCHS-ada = amd64 hppa i386 mip DPB_PROPERTIES = parallel -V = 8.2.0 +V = 8.3.0 FULL_VERSION = $V FULL_PKGVERSION = $V -REVISION = 1 ADASTRAP_LIBC-amd64 = 93.0 ADASTRAP_LIBM-amd64 = 10.1 -ADASTRAP-amd64 = adastrap-amd64-$V-0.tar.xz +ADASTRAP-amd64 = adastrap-amd64-8.2.0-0.tar.xz ADASTRAP_LIBC-arm = 88.0 ADASTRAP_LIBM-arm = 9.0 ADASTRAP-arm = adastrap-arm-4.9.4-0.tar.xz ADASTRAP_LIBC-hppa = 93.0 ADASTRAP_LIBM-hppa = 10.1 -ADASTRAP-hppa = adastrap-hppa-$V-0.tar.xz +ADASTRAP-hppa = adastrap-hppa-8.2.0-0.tar.xz ADASTRAP_LIBC-i386 = 93.0 ADASTRAP_LIBM-i386 = 10.1 -ADASTRAP-i386 = adastrap-i386-$V-0.tar.xz +ADASTRAP-i386 = adastrap-i386-8.2.0-0.tar.xz ADASTRAP_LIBC-mips64 = 93.0 ADASTRAP_LIBM-mips64 = 10.1 -ADASTRAP-mips64 = adastrap-mips64-$V-0.tar.xz +ADASTRAP-mips64 = adastrap-mips64-8.2.0-0.tar.xz ADASTRAP_LIBC-powerpc = 93.0 ADASTRAP_LIBM-powerpc = 10.1 -ADASTRAP-powerpc = adastrap-powerpc-$V-0.tar.xz +ADASTRAP-powerpc = adastrap-powerpc-8.2.0-0.tar.xz ADASTRAP_LIBC-sparc64 = 93.0 ADASTRAP_LIBM-sparc64 = 10.1 ADASTRAP-sparc64 = adastrap-sparc64-6.5.0-0.tar.xz @@ -203,7 +202,7 @@ RUN_DEPENDS-libs = WANTLIB-main = ${WANTLIB} WANTLIB-ada = ${WANTLIB} pthread util -WANTLIB-libs = m pthread +WANTLIB-libs = m pthread z LIB_DEPENDS += devel/gmp,no_cxx,bootstrap \ devel/mpfr \ Index: distinfo =================================================================== RCS file: /home/cvs/ports/lang/gcc/8/distinfo,v retrieving revision 1.2 diff -u -p -u -p -r1.2 distinfo --- distinfo 5 Jan 2019 22:08:11 -0000 1.2 +++ distinfo 22 Feb 2019 16:31:32 -0000 @@ -5,7 +5,7 @@ SHA256 (gcc/adastrap-i386-8.2.0-0.tar.xz SHA256 (gcc/adastrap-mips64-8.2.0-0.tar.xz) = XS8T0WqoliUNSDOgJxRCkT6h+O0pujT5pLREohFCwEs= SHA256 (gcc/adastrap-powerpc-8.2.0-0.tar.xz) = VXlweW2zr4FCoHqi3uw4cg3crXpgwPRb+/RdEilTg0k= SHA256 (gcc/adastrap-sparc64-6.5.0-0.tar.xz) = cqpGS2beYV+CFf7X+P4voVHHT78v6SCgtksHXjP/B4E= -SHA256 (gcc/gcc-8.2.0.tar.xz) = GWw8BLomE/iTKDl35gEbI0XRzRr5q+rFjpFrGqs+AIA= +SHA256 (gcc/gcc-8.3.0.tar.xz) = ZLqt/mzA9JR6hMsS1/Dfr0W7WLfpJGFjlZbCHgLZfSw= SIZE (gcc/adastrap-amd64-8.2.0-0.tar.xz) = 56974492 SIZE (gcc/adastrap-arm-4.9.4-0.tar.xz) = 31142168 SIZE (gcc/adastrap-hppa-8.2.0-0.tar.xz) = 47944688 @@ -13,4 +13,4 @@ SIZE (gcc/adastrap-i386-8.2.0-0.tar.xz) SIZE (gcc/adastrap-mips64-8.2.0-0.tar.xz) = 47951224 SIZE (gcc/adastrap-powerpc-8.2.0-0.tar.xz) = 52240088 SIZE (gcc/adastrap-sparc64-6.5.0-0.tar.xz) = 38704976 -SIZE (gcc/gcc-8.2.0.tar.xz) = 63460876 +SIZE (gcc/gcc-8.3.0.tar.xz) = 63694700 Index: patches/patch-gcc_ada_adaint_c =================================================================== RCS file: /home/cvs/ports/lang/gcc/8/patches/patch-gcc_ada_adaint_c,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 patch-gcc_ada_adaint_c --- patches/patch-gcc_ada_adaint_c 4 Jan 2019 15:50:39 -0000 1.1.1.1 +++ patches/patch-gcc_ada_adaint_c 22 Feb 2019 16:58:11 -0000 @@ -13,7 +13,7 @@ Index: gcc/ada/adaint.c #if defined (__vxworks) /* Code to implement __gnat_set_file_time_name for these systems. */ -@@ -3494,3 +3495,9 @@ void __gnat_killprocesstree (int pid, int sig_num) +@@ -3502,3 +3503,9 @@ void __gnat_killprocesstree (int pid, int sig_num) #ifdef __cplusplus } #endif Index: patches/patch-gcc_c_c-decl_c =================================================================== RCS file: /home/cvs/ports/lang/gcc/8/patches/patch-gcc_c_c-decl_c,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 patch-gcc_c_c-decl_c --- patches/patch-gcc_c_c-decl_c 4 Jan 2019 15:50:39 -0000 1.1.1.1 +++ patches/patch-gcc_c_c-decl_c 22 Feb 2019 16:58:06 -0000 @@ -2,7 +2,7 @@ $OpenBSD: patch-gcc_c_c-decl_c,v 1.1.1.1 Index: gcc/c/c-decl.c --- gcc/c/c-decl.c.orig +++ gcc/c/c-decl.c -@@ -5544,6 +5544,8 @@ warn_variable_length_array (tree name, tree size) +@@ -5545,6 +5545,8 @@ warn_variable_length_array (tree name, tree size) pedwarn_c90 (input_location, OPT_Wvla, "ISO C90 forbids variable " "length array"); } Index: patches/patch-gcc_config_alpha_alpha_c =================================================================== RCS file: /home/cvs/ports/lang/gcc/8/patches/patch-gcc_config_alpha_alpha_c,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 patch-gcc_config_alpha_alpha_c --- patches/patch-gcc_config_alpha_alpha_c 4 Jan 2019 15:50:39 -0000 1.1.1.1 +++ patches/patch-gcc_config_alpha_alpha_c 22 Feb 2019 16:58:06 -0000 @@ -43,7 +43,7 @@ Index: gcc/config/alpha/alpha.c } } -@@ -7384,8 +7391,6 @@ alpha_initial_elimination_offset (unsigned int from, +@@ -7416,8 +7423,6 @@ alpha_initial_elimination_offset (unsigned int from, switch (from) { case FRAME_POINTER_REGNUM: @@ -52,7 +52,7 @@ Index: gcc/config/alpha/alpha.c case ARG_POINTER_REGNUM: ret += (ALPHA_ROUND (get_frame_size () + crtl->args.pretend_args_size) -@@ -7726,6 +7731,9 @@ alpha_expand_prologue (void) +@@ -7758,6 +7763,9 @@ alpha_expand_prologue (void) sa_size = alpha_sa_size (); frame_size = compute_frame_size (get_frame_size (), sa_size); @@ -62,7 +62,7 @@ Index: gcc/config/alpha/alpha.c if (flag_stack_usage_info) current_function_static_stack_size = frame_size; -@@ -7764,6 +7772,8 @@ alpha_expand_prologue (void) +@@ -7796,6 +7804,8 @@ alpha_expand_prologue (void) if (flag_stack_check || flag_stack_clash_protection) probed_size += get_stack_check_protect (); @@ -71,7 +71,7 @@ Index: gcc/config/alpha/alpha.c if (probed_size <= 32768) { if (probed_size > 4096) -@@ -7844,6 +7854,34 @@ alpha_expand_prologue (void) +@@ -7876,6 +7886,34 @@ alpha_expand_prologue (void) plus_constant (Pmode, stack_pointer_rtx, -frame_size))); } @@ -106,7 +106,7 @@ Index: gcc/config/alpha/alpha.c /* Cope with very large offsets to the register save area. */ sa_bias = 0; -@@ -8692,11 +8730,15 @@ summarize_insn (rtx x, struct shadow_summary *sum, int +@@ -8724,11 +8762,15 @@ summarize_insn (rtx x, struct shadow_summary *sum, int result of an instruction that might generate an UNPREDICTABLE result. @@ -124,7 +124,7 @@ Index: gcc/config/alpha/alpha.c static void alpha_handle_trap_shadows (void) -@@ -8768,7 +8810,7 @@ alpha_handle_trap_shadows (void) +@@ -8800,7 +8842,7 @@ alpha_handle_trap_shadows (void) if ((sum.defd.i & shadow.defd.i) || (sum.defd.fp & shadow.defd.fp)) { @@ -133,7 +133,7 @@ Index: gcc/config/alpha/alpha.c goto close_shadow; } -@@ -8791,6 +8833,13 @@ alpha_handle_trap_shadows (void) +@@ -8823,6 +8865,13 @@ alpha_handle_trap_shadows (void) goto close_shadow; } @@ -147,7 +147,7 @@ Index: gcc/config/alpha/alpha.c break; case BARRIER: -@@ -8801,6 +8850,7 @@ alpha_handle_trap_shadows (void) +@@ -8833,6 +8882,7 @@ alpha_handle_trap_shadows (void) case JUMP_INSN: case CALL_INSN: case CODE_LABEL: Index: patches/patch-gcc_config_gcc =================================================================== RCS file: /home/cvs/ports/lang/gcc/8/patches/patch-gcc_config_gcc,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 patch-gcc_config_gcc --- patches/patch-gcc_config_gcc 4 Jan 2019 15:50:39 -0000 1.1.1.1 +++ patches/patch-gcc_config_gcc 22 Feb 2019 16:58:06 -0000 @@ -40,7 +40,7 @@ Index: gcc/config.gcc tm_file="elfos.h alpha/alpha.h alpha/elf.h openbsd.h openbsd-stdint.h alpha/openbsd.h openbsd-libpthread.h" tmake_file="${tmake_file} alpha/t-alpha" extra_options="${extra_options} openbsd.opt alpha/elf.opt" -@@ -1128,6 +1143,14 @@ arm*-*-netbsdelf*) +@@ -1131,6 +1146,14 @@ arm*-*-netbsdelf*) tmake_file="${tmake_file} arm/t-arm" target_cpu_cname="arm6" ;; @@ -55,7 +55,7 @@ Index: gcc/config.gcc arm*-*-linux-*) # ARM GNU/Linux with ELF tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" extra_options="${extra_options} linux-android.opt" -@@ -1350,6 +1373,7 @@ hppa*-*-linux*) +@@ -1353,6 +1376,7 @@ hppa*-*-linux*) ;; hppa*-*-openbsd*) target_cpu_default="MASK_PA_11" @@ -63,7 +63,7 @@ Index: gcc/config.gcc tm_file="${tm_file} dbxelf.h elfos.h openbsd.h openbsd-stdint.h openbsd-libpthread.h \ pa/pa-openbsd.h pa/pa32-regs.h pa/pa32-openbsd.h" extra_options="${extra_options} openbsd.opt" -@@ -1529,6 +1553,7 @@ x86_64-*-netbsd*) +@@ -1532,6 +1556,7 @@ x86_64-*-netbsd*) extra_options="${extra_options} netbsd.opt netbsd-elf.opt" ;; i[34567]86-*-openbsd*) @@ -71,7 +71,7 @@ Index: gcc/config.gcc tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h" tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/openbsdelf.h" extra_options="${extra_options} openbsd.opt" -@@ -1536,12 +1561,25 @@ i[34567]86-*-openbsd*) +@@ -1539,12 +1564,25 @@ i[34567]86-*-openbsd*) gnu_ld=yes ;; x86_64-*-openbsd*) @@ -97,7 +97,7 @@ Index: gcc/config.gcc i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu) # Intel 80386's running GNU/* # with ELF format using glibc 2 -@@ -2382,6 +2420,12 @@ pdp11-*-*) +@@ -2385,6 +2423,12 @@ pdp11-*-*) # tmake_file="${tmake_file} rs6000/t-fprules" # extra_headers= # ;; @@ -110,7 +110,7 @@ Index: gcc/config.gcc powerpc-*-darwin*) extra_options="${extra_options} rs6000/darwin.opt" case ${target} in -@@ -2975,10 +3019,10 @@ sparc64-*-netbsd*) +@@ -2978,10 +3022,10 @@ sparc64-*-netbsd*) tmake_file="${tmake_file} sparc/t-sparc sparc/t-netbsd64" ;; sparc64-*-openbsd*) @@ -122,7 +122,7 @@ Index: gcc/config.gcc gas=yes gnu_ld=yes with_cpu=ultrasparc tmake_file="${tmake_file} sparc/t-sparc" -@@ -3207,6 +3251,12 @@ case ${target} in +@@ -3210,6 +3254,12 @@ case ${target} in else arch=i386 fi Index: patches/patch-gcc_config_i386_i386_c =================================================================== RCS file: /home/cvs/ports/lang/gcc/8/patches/patch-gcc_config_i386_i386_c,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 patch-gcc_config_i386_i386_c --- patches/patch-gcc_config_i386_i386_c 4 Jan 2019 15:50:40 -0000 1.1.1.1 +++ patches/patch-gcc_config_i386_i386_c 22 Feb 2019 16:58:06 -0000 @@ -4,7 +4,7 @@ $OpenBSD: patch-gcc_config_i386_i386_c,v Index: gcc/config/i386/i386.c --- gcc/config/i386/i386.c.orig +++ gcc/config/i386/i386.c -@@ -11672,6 +11672,7 @@ ix86_compute_frame_layout (void) +@@ -11716,6 +11716,7 @@ ix86_compute_frame_layout (void) } } @@ -12,7 +12,7 @@ Index: gcc/config/i386/i386.c frame->nregs = ix86_nsaved_regs (); frame->nsseregs = ix86_nsaved_sseregs (); -@@ -13731,6 +13732,9 @@ ix86_expand_prologue (void) +@@ -13783,6 +13784,9 @@ ix86_expand_prologue (void) RTX_FRAME_RELATED_P (insn) = 1; } } Index: patches/patch-gcc_config_i386_i386_h =================================================================== RCS file: /home/cvs/ports/lang/gcc/8/patches/patch-gcc_config_i386_i386_h,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 patch-gcc_config_i386_i386_h --- patches/patch-gcc_config_i386_i386_h 4 Jan 2019 15:50:39 -0000 1.1.1.1 +++ patches/patch-gcc_config_i386_i386_h 22 Feb 2019 16:58:06 -0000 @@ -3,7 +3,7 @@ $OpenBSD: patch-gcc_config_i386_i386_h,v Index: gcc/config/i386/i386.h --- gcc/config/i386/i386.h.orig +++ gcc/config/i386/i386.h -@@ -2468,6 +2468,8 @@ struct GTY(()) ix86_frame +@@ -2467,6 +2467,8 @@ struct GTY(()) ix86_frame HOST_WIDE_INT stack_realign_offset; HOST_WIDE_INT sse_reg_save_offset; Index: patches/patch-gcc_config_rs6000_rs6000_c =================================================================== RCS file: /home/cvs/ports/lang/gcc/8/patches/patch-gcc_config_rs6000_rs6000_c,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 patch-gcc_config_rs6000_rs6000_c --- patches/patch-gcc_config_rs6000_rs6000_c 4 Jan 2019 15:50:39 -0000 1.1.1.1 +++ patches/patch-gcc_config_rs6000_rs6000_c 22 Feb 2019 16:58:06 -0000 @@ -9,7 +9,7 @@ Borrowed from https://github.com/sba1/ad Index: gcc/config/rs6000/rs6000.c --- gcc/config/rs6000/rs6000.c.orig +++ gcc/config/rs6000/rs6000.c -@@ -6141,6 +6141,8 @@ rs6000_file_start (void) +@@ -6157,6 +6157,8 @@ rs6000_file_start (void) if (!(rs6000_default_cpu && rs6000_default_cpu[0]) && !global_options_set.x_rs6000_cpu_index) { @@ -18,7 +18,7 @@ Index: gcc/config/rs6000/rs6000.c fputs ("\t.machine ", asm_out_file); if ((rs6000_isa_flags & OPTION_MASK_MODULO) != 0) fputs ("power9\n", asm_out_file); -@@ -6158,6 +6160,7 @@ rs6000_file_start (void) +@@ -6174,6 +6176,7 @@ rs6000_file_start (void) fputs ("ppc64\n", asm_out_file); else fputs ("ppc\n", asm_out_file); Index: patches/patch-gcc_config_sparc_sparc_c =================================================================== RCS file: /home/cvs/ports/lang/gcc/8/patches/patch-gcc_config_sparc_sparc_c,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 patch-gcc_config_sparc_sparc_c --- patches/patch-gcc_config_sparc_sparc_c 4 Jan 2019 15:50:39 -0000 1.1.1.1 +++ patches/patch-gcc_config_sparc_sparc_c 22 Feb 2019 16:58:06 -0000 @@ -10,7 +10,7 @@ Index: gcc/config/sparc/sparc.c #include "explow.h" #include "expr.h" #include "debug.h" -@@ -6034,8 +6035,8 @@ sparc_expand_prologue (void) +@@ -6058,8 +6059,8 @@ sparc_expand_prologue (void) at the end of the function prologue, and moving instructions that access the stack via the frame pointer between the instructions that decrement the stack pointer could result in accessing the @@ -21,7 +21,7 @@ Index: gcc/config/sparc/sparc.c } else { -@@ -6061,6 +6062,9 @@ sparc_expand_prologue (void) +@@ -6085,6 +6086,9 @@ sparc_expand_prologue (void) sparc_frame_base_offset - sparc_apparent_frame_size, SORR_SAVE); Index: patches/patch-gcc_defaults_h =================================================================== RCS file: /home/cvs/ports/lang/gcc/8/patches/patch-gcc_defaults_h,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 patch-gcc_defaults_h --- patches/patch-gcc_defaults_h 4 Jan 2019 15:50:39 -0000 1.1.1.1 +++ patches/patch-gcc_defaults_h 22 Feb 2019 16:58:06 -0000 @@ -2,7 +2,7 @@ $OpenBSD: patch-gcc_defaults_h,v 1.1.1.1 Index: gcc/defaults.h --- gcc/defaults.h.orig +++ gcc/defaults.h -@@ -1445,6 +1445,10 @@ see the files COPYING3 and COPYING.RUNTIME respectivel +@@ -1449,6 +1449,10 @@ see the files COPYING3 and COPYING.RUNTIME respectivel #define TARGET_VTABLE_USES_DESCRIPTORS 0 #endif Index: patches/patch-gcc_opts_c =================================================================== RCS file: /home/cvs/ports/lang/gcc/8/patches/patch-gcc_opts_c,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 patch-gcc_opts_c --- patches/patch-gcc_opts_c 4 Jan 2019 15:50:39 -0000 1.1.1.1 +++ patches/patch-gcc_opts_c 22 Feb 2019 16:58:06 -0000 @@ -28,7 +28,7 @@ Index: gcc/opts.c { OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 }, { OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribution, NULL, 1 }, { OPT_LEVELS_3_PLUS, OPT_floop_interchange, NULL, 1 }, -@@ -807,6 +810,8 @@ finish_options (struct gcc_options *opts, struct gcc_o +@@ -816,6 +819,8 @@ finish_options (struct gcc_options *opts, struct gcc_o opts->x_flag_pic = 0; if (opts->x_flag_pic && !opts->x_flag_pie) opts->x_flag_shlib = 1; @@ -37,7 +37,7 @@ Index: gcc/opts.c opts->x_flag_opts_finished = true; } -@@ -2068,6 +2073,11 @@ common_handle_option (struct gcc_options *opts, +@@ -2077,6 +2082,11 @@ common_handle_option (struct gcc_options *opts, case OPT_Wframe_larger_than_: opts->x_frame_larger_than_size = value; opts->x_warn_frame_larger_than = value != -1; Index: patches/patch-gcc_tree-vect-stmts_c =================================================================== RCS file: patches/patch-gcc_tree-vect-stmts_c diff -N patches/patch-gcc_tree-vect-stmts_c --- patches/patch-gcc_tree-vect-stmts_c 4 Jan 2019 15:50:39 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-gcc_tree-vect-stmts_c,v 1.1.1.1 2019/01/04 15:50:39 pascal Exp $ - -Index: gcc/tree-vect-stmts.c ---- gcc/tree-vect-stmts.c.orig -+++ gcc/tree-vect-stmts.c -@@ -3745,7 +3745,7 @@ vectorizable_simd_clone_call (gimple *stmt, gimple_stm - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not considering SIMD clones; not yet supported" - " for variable-width vectors.\n"); -- return NULL; -+ return false; - } - - unsigned int badness = 0; Index: patches/patch-libstdc++-v3_configure =================================================================== RCS file: /home/cvs/ports/lang/gcc/8/patches/patch-libstdc++-v3_configure,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 patch-libstdc++-v3_configure --- patches/patch-libstdc++-v3_configure 4 Jan 2019 15:50:40 -0000 1.1.1.1 +++ patches/patch-libstdc++-v3_configure 22 Feb 2019 16:58:06 -0000 @@ -5,7 +5,7 @@ $OpenBSD: patch-libstdc++-v3_configure,v Index: libstdc++-v3/configure --- libstdc++-v3/configure.orig +++ libstdc++-v3/configure -@@ -11013,7 +11013,7 @@ openbsd*) +@@ -11015,7 +11015,7 @@ openbsd*) *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' @@ -14,7 +14,7 @@ Index: libstdc++-v3/configure shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in -@@ -14697,7 +14697,7 @@ openbsd*) +@@ -14699,7 +14699,7 @@ openbsd*) *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'