SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,257 @@
- remove bundled libraries
- remove gdb/sim support for gdb sprays files all around leading to conflicts
Index: sources/tools/Makefile.def
--- sources/tools/Makefile.def.orig
+++ sources/tools/Makefile.def
@@ -36,30 +36,13 @@ host_modules= { module= opcodes; bootstrap=true; };
host_modules= { module= binutils; bootstrap=true; };
host_modules= { module= bison; no_check_cross= true; };
host_modules= { module= cgen; };
-host_modules= { module= dejagnu; };
host_modules= { module= etc; };
-host_modules= { module= fastjar; no_check_cross= true; };
host_modules= { module= fixincludes;
missing= TAGS; };
host_modules= { module= flex; no_check_cross= true; };
host_modules= { module= gas; bootstrap=true; };
host_modules= { module= gcc; bootstrap=true;
extra_make_flags="$(EXTRA_GCC_FLAGS)"; };
-host_modules= { module= gmp; lib_path=.libs; bootstrap=true;
- extra_configure_flags='--disable-shared';
- no_install= true;
- // none-*-* disables asm optimizations, bootstrap-testing
- // the compiler more thoroughly.
- host="none-${host_vendor}-${host_os}";
- // gmp's configure will complain if given anything
- // different from host for target.
- target="none-${host_vendor}-${host_os}"; };
-host_modules= { module= mpfr; lib_path=.libs; bootstrap=true;
- extra_configure_flags='--disable-shared @extra_mpfr_configure_flags@';
- no_install= true; };
-host_modules= { module= mpc; lib_path=.libs; bootstrap=true;
- extra_configure_flags='--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@';
- no_install= true; };
host_modules= { module= isl; lib_path=.libs; bootstrap=true;
extra_configure_flags='--disable-shared @extra_isl_gmp_configure_flags@';
extra_make_flags='V=1';
@@ -74,10 +57,6 @@ host_modules= { module= libelf; lib_path=.libs; bootst
no_install= true; };
host_modules= { module= gold; bootstrap=true; };
host_modules= { module= gprof; };
-host_modules= { module= intl; bootstrap=true; };
-host_modules= { module= tcl;
- missing=mostlyclean; };
-host_modules= { module= itcl; };
host_modules= { module= ld; bootstrap=true; };
host_modules= { module= libbacktrace; bootstrap=true; };
host_modules= { module= libcpp; bootstrap=true; };
@@ -94,15 +73,9 @@ host_modules= { module= libiconv;
missing= install-html;
missing= install-info; };
host_modules= { module= m4; };
-host_modules= { module= readline; };
host_modules= { module= sid; };
-host_modules= { module= sim; };
host_modules= { module= texinfo; no_install= true; };
host_modules= { module= zlib; no_install=true; no_check=true; bootstrap=true; };
-host_modules= { module= gdb; };
-host_modules= { module= expect; };
-host_modules= { module= guile; };
-host_modules= { module= tk; };
host_modules= { module= libtermcap; no_check=true;
missing=mostlyclean;
missing=clean;
@@ -217,7 +190,6 @@ flags_to_pass = { flag= BISON ; };
flags_to_pass = { flag= CC_FOR_BUILD ; };
flags_to_pass = { flag= CFLAGS_FOR_BUILD ; };
flags_to_pass = { flag= CXX_FOR_BUILD ; };
-flags_to_pass = { flag= EXPECT ; };
flags_to_pass = { flag= FLEX ; };
flags_to_pass = { flag= INSTALL ; };
flags_to_pass = { flag= INSTALL_DATA ; };
@@ -293,8 +265,6 @@ dependencies = { module=all-build-m4; on=all-build-tex
dependencies = { module=all-build-fixincludes; on=all-build-libiberty; };
// Host modules specific to gcc.
-dependencies = { module=configure-gcc; on=configure-intl; };
-dependencies = { module=configure-gcc; on=all-gmp; };
dependencies = { module=configure-gcc; on=all-lto-plugin; };
dependencies = { module=configure-gcc; on=all-binutils; };
dependencies = { module=configure-gcc; on=all-gas; };
@@ -302,9 +272,6 @@ dependencies = { module=configure-gcc; on=all-ld; };
dependencies = { module=configure-gcc; on=all-gold; };
dependencies = { module=configure-gcc; on=all-libelf; };
dependencies = { module=all-gcc; on=all-libiberty; hard=true; };
-dependencies = { module=all-gcc; on=all-intl; };
-dependencies = { module=all-gcc; on=all-mpfr; };
-dependencies = { module=all-gcc; on=all-mpc; };
dependencies = { module=all-gcc; on=all-cloog; };
dependencies = { module=all-gcc; on=all-build-texinfo; };
dependencies = { module=all-gcc; on=all-build-bison; };
@@ -328,9 +295,7 @@ dependencies = { module=install-strip-gcc ; on=install
dependencies = { module=install-strip-gcc ; on=install-strip-lto-plugin; };
dependencies = { module=configure-libcpp; on=configure-libiberty; hard=true; };
-dependencies = { module=configure-libcpp; on=configure-intl; };
dependencies = { module=all-libcpp; on=all-libiberty; hard=true; };
-dependencies = { module=all-libcpp; on=all-intl; };
dependencies = { module=all-fixincludes; on=all-libiberty; };
@@ -341,52 +306,22 @@ dependencies = { module=all-lto-plugin; on=all-libiber
dependencies = { module=all-utils; on=all-libiberty; };
-dependencies = { module=configure-mpfr; on=all-gmp; };
-dependencies = { module=configure-mpc; on=all-mpfr; };
-dependencies = { module=configure-isl; on=all-gmp; };
dependencies = { module=configure-cloog; on=all-isl; };
-dependencies = { module=configure-cloog; on=all-gmp; };
-// Host modules specific to gdb.
-dependencies = { module=configure-gdb; on=all-intl; };
-dependencies = { module=configure-gdb; on=configure-sim; };
-dependencies = { module=configure-gdb; on=all-bfd; };
-// Depend on all-libiconv so that configure checks for iconv
-// functions will work.
-dependencies = { module=configure-gdb; on=all-libiconv; };
-dependencies = { module=all-gdb; on=all-libiberty; };
-dependencies = { module=all-gdb; on=all-libiconv; };
-dependencies = { module=all-gdb; on=all-opcodes; };
-dependencies = { module=all-gdb; on=all-readline; };
-dependencies = { module=all-gdb; on=all-build-bison; };
-dependencies = { module=all-gdb; on=all-sim; };
-dependencies = { module=all-gdb; on=all-libdecnumber; };
-dependencies = { module=all-gdb; on=all-libtermcap; };
-
-dependencies = { module=configure-libgui; on=configure-tcl; };
-dependencies = { module=configure-libgui; on=configure-tk; };
-dependencies = { module=all-libgui; on=all-tcl; };
-dependencies = { module=all-libgui; on=all-tk; };
-dependencies = { module=all-libgui; on=all-itcl; };
-
// Host modules specific to binutils.
dependencies = { module=configure-bfd; on=configure-libiberty; hard=true; };
-dependencies = { module=configure-bfd; on=configure-intl; };
dependencies = { module=all-bfd; on=all-libiberty; };
-dependencies = { module=all-bfd; on=all-intl; };
dependencies = { module=configure-opcodes; on=configure-libiberty; hard=true; };
dependencies = { module=all-opcodes; on=all-libiberty; };
// We must build gas before binutils, gprof, ld and gold to avoid race
// condition in the prev-gcc/as script during bootstrap of combined tree
// with GCC and binutils. See PR gas/14899 for details.
-dependencies = { module=configure-binutils; on=configure-intl; };
dependencies = { module=all-binutils; on=all-libiberty; };
dependencies = { module=all-binutils; on=all-opcodes; };
dependencies = { module=all-binutils; on=all-bfd; };
dependencies = { module=all-binutils; on=all-build-flex; };
dependencies = { module=all-binutils; on=all-build-bison; };
-dependencies = { module=all-binutils; on=all-intl; };
dependencies = { module=all-binutils; on=all-gas; };
// We put install-opcodes before install-binutils because the installed
@@ -399,93 +334,41 @@ dependencies = { module=install-strip-binutils; on=ins
dependencies = { module=install-opcodes; on=install-bfd; };
dependencies = { module=install-strip-opcodes; on=install-strip-bfd; };
-dependencies = { module=configure-gas; on=configure-intl; };
dependencies = { module=all-gas; on=all-libiberty; };
dependencies = { module=all-gas; on=all-opcodes; };
dependencies = { module=all-gas; on=all-bfd; };
-dependencies = { module=all-gas; on=all-intl; };
-dependencies = { module=configure-gprof; on=configure-intl; };
dependencies = { module=all-gprof; on=all-libiberty; };
dependencies = { module=all-gprof; on=all-bfd; };
dependencies = { module=all-gprof; on=all-opcodes; };
-dependencies = { module=all-gprof; on=all-intl; };
dependencies = { module=all-gprof; on=all-gas; };
-dependencies = { module=configure-ld; on=configure-intl; };
dependencies = { module=all-ld; on=all-libiberty; };
dependencies = { module=all-ld; on=all-bfd; };
dependencies = { module=all-ld; on=all-opcodes; };
dependencies = { module=all-ld; on=all-build-bison; };
dependencies = { module=all-ld; on=all-build-flex; };
-dependencies = { module=all-ld; on=all-intl; };
dependencies = { module=all-ld; on=all-gas; };
dependencies = { module=install-ld; on=install-gold; };
dependencies = { module=install-strip-ld; on=install-strip-gold; };
-dependencies = { module=configure-gold; on=configure-intl; };
dependencies = { module=all-gold; on=all-libiberty; };
-dependencies = { module=all-gold; on=all-intl; };
dependencies = { module=all-gold; on=all-bfd; };
dependencies = { module=all-gold; on=all-build-bison; };
dependencies = { module=all-gold; on=all-gas; };
dependencies = { module=check-gold; on=all-binutils; };
dependencies = { module=check-gold; on=all-gas; };
-dependencies = { module=configure-opcodes; on=configure-intl; };
dependencies = { module=all-opcodes; on=all-bfd; };
dependencies = { module=all-opcodes; on=all-libiberty; };
-dependencies = { module=all-opcodes; on=all-intl; };
-// Other host modules in the 'src' repository.
-dependencies = { module=all-dejagnu; on=all-tcl; };
-dependencies = { module=all-dejagnu; on=all-expect; };
-dependencies = { module=all-dejagnu; on=all-tk; };
-dependencies = { module=configure-expect; on=configure-tcl; };
-dependencies = { module=configure-expect; on=configure-tk; };
-dependencies = { module=all-expect; on=all-tcl; };
-dependencies = { module=all-expect; on=all-tk; };
-
-// We put install-tcl before install-itcl because itcl wants to run a
-// program on installation which uses the Tcl libraries.
-dependencies = { module=configure-itcl; on=configure-tcl; };
-dependencies = { module=configure-itcl; on=configure-tk; };
-dependencies = { module=all-itcl; on=all-tcl; };
-dependencies = { module=all-itcl; on=all-tk; };
-dependencies = { module=install-itcl; on=install-tcl; };
-dependencies = { module=install-strip-itcl; on=install-strip-tcl; };
-
-dependencies = { module=configure-tk; on=configure-tcl; };
-dependencies = { module=all-tk; on=all-tcl; };
-
dependencies = { module=all-sid; on=all-libiberty; };
dependencies = { module=all-sid; on=all-bfd; };
dependencies = { module=all-sid; on=all-opcodes; };
-dependencies = { module=all-sid; on=all-tcl; };
-dependencies = { module=all-sid; on=all-tk; };
-dependencies = { module=install-sid; on=install-tcl; };
-dependencies = { module=install-strip-sid; on=install-strip-tcl; };
-dependencies = { module=install-sid; on=install-tk; };
-dependencies = { module=install-strip-sid; on=install-strip-tk; };
-dependencies = { module=configure-sim; on=configure-intl; };
-dependencies = { module=all-sim; on=all-intl; };
-dependencies = { module=all-sim; on=all-libiberty; };
-dependencies = { module=all-sim; on=all-bfd; };
-dependencies = { module=all-sim; on=all-opcodes; };
-dependencies = { module=all-sim; on=all-readline; };
-dependencies = { module=all-sim; on=configure-gdb; };
-
// Other host modules.
-dependencies = { module=all-fastjar; on=all-zlib; };
-dependencies = { module=all-fastjar; on=all-build-texinfo; };
-dependencies = { module=all-fastjar; on=all-libiberty; };
-
// Warning, these are not well tested.
-dependencies = { module=all-bison; on=all-intl; };
dependencies = { module=all-bison; on=all-build-texinfo; };
dependencies = { module=all-flex; on=all-build-bison; };
-dependencies = { module=all-flex; on=all-intl; };
dependencies = { module=all-flex; on=all-m4; };
dependencies = { module=all-flex; on=all-build-texinfo; };
-dependencies = { module=all-m4; on=all-intl; };
dependencies = { module=all-m4; on=all-build-texinfo; };
// Target modules. These can also have dependencies on the language
@@ -502,8 +385,6 @@ lang_env_dependencies = { module=libgcc; no_gcc=true;
lang_env_dependencies = { module=libiberty; no_c=true; };
dependencies = { module=configure-target-boehm-gc; on=all-target-libstdc++-v3; };
-dependencies = { module=configure-target-fastjar; on=configure-target-zlib; };
-dependencies = { module=all-target-fastjar; on=all-target-zlib; };
dependencies = { module=configure-target-libgo; on=configure-target-libffi; };
dependencies = { module=configure-target-libgo; on=all-target-libstdc++-v3; };
dependencies = { module=all-target-libgo; on=all-target-libbacktrace; };

View file

@ -0,0 +1,12 @@
Index: sources/tools/contrib/texi2pod.pl
--- sources/tools/contrib/texi2pod.pl.orig
+++ sources/tools/contrib/texi2pod.pl
@@ -316,7 +316,7 @@ while(<$inf>) {
@columns = ();
for $column (split (/\s*\@tab\s*/, $1)) {
# @strong{...} is used a @headitem work-alike
- $column =~ s/^\@strong{(.*)}$/$1/;
+ $column =~ s/^\@strong\{(.*)\}$/$1/;
push @columns, $column;
}
$_ = "\n=item ".join (" : ", @columns)."\n";

View file

@ -0,0 +1,12 @@
Index: sources/tools/etc/texi2pod.pl
--- sources/tools/etc/texi2pod.pl.orig
+++ sources/tools/etc/texi2pod.pl
@@ -311,7 +311,7 @@ while(<$inf>) {
@columns = ();
for $column (split (/\s*\@tab\s*/, $1)) {
# @strong{...} is used a @headitem work-alike
- $column =~ s/^\@strong{(.*)}$/$1/;
+ $column =~ s/^\@strong\{(.*)\}$/$1/;
push @columns, $column;
}
$_ = "\n=item ".join (" : ", @columns)."\n";

View file

@ -0,0 +1,26 @@
Fix for -fno-common: stop defining linkrelax in multiple places
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=9117cd3e10673e8f80fc0c64f1a32215d9638fc2
Index: sources/tools/gas/config/tc-msp430.c
--- sources/tools/gas/config/tc-msp430.c.orig
+++ sources/tools/gas/config/tc-msp430.c
@@ -69,9 +69,6 @@
int msp430_enable_relax;
int msp430_enable_polys;
-/* Set linkrelax here to avoid fixups in most sections. */
-int linkrelax = 1;
-
/* GCC uses the some condition codes which we'll
implement as new polymorph instructions.
@@ -1028,6 +1025,9 @@ md_begin (void)
bfd_set_arch_mach (stdoutput, TARGET_ARCH,
target_is_430x () ? bfd_mach_msp430x : bfd_mach_msp11);
+
+ /* Set linkrelax here to avoid fixups in most sections. */
+ int linkrelax = 1;
}
/* Returns the register number equivalent to the string T.

View file

@ -0,0 +1,23 @@
--- sources/tools/gcc/Makefile.in.orig Mon Jul 20 16:19:34 2015
+++ sources/tools/gcc/Makefile.in Mon Jul 20 16:20:12 2015
@@ -3075,7 +3075,7 @@ maintainer-clean:
# Install the driver last so that the window when things are
# broken is small.
install: install-common $(INSTALL_HEADERS) \
- install-cpp install-man install-info install-@POSUB@ \
+ install-cpp install-man install-@POSUB@ \
install-driver install-lto-wrapper install-gcc-ar
ifeq ($(enable_plugin),yes)
@@ -3288,10 +3288,7 @@ install-html: $(HTMLS_BUILD) lang.install-html
install-man: lang.install-man \
$(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext) \
$(DESTDIR)$(man1dir)/$(CPP_INSTALL_NAME)$(man1ext) \
- $(DESTDIR)$(man1dir)/$(GCOV_INSTALL_NAME)$(man1ext) \
- $(DESTDIR)$(man7dir)/fsf-funding$(man7ext) \
- $(DESTDIR)$(man7dir)/gfdl$(man7ext) \
- $(DESTDIR)$(man7dir)/gpl$(man7ext)
+ $(DESTDIR)$(man1dir)/$(GCOV_INSTALL_NAME)$(man1ext)
$(DESTDIR)$(man7dir)/%$(man7ext): doc/%.7 installdirs
-rm -f $@

View file

@ -0,0 +1,27 @@
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");
}

View file

@ -0,0 +1,32 @@
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) ",

View file

@ -0,0 +1,12 @@
Index: sources/tools/gcc/common.opt
--- sources/tools/gcc/common.opt.orig
+++ sources/tools/gcc/common.opt
@@ -1468,7 +1468,7 @@ Common Report Var(flag_ivopts) Init(1) Optimization
Optimize induction variables on trees
fjump-tables
-Common Var(flag_jump_tables) Init(1) Optimization
+Common Var(flag_jump_tables) Init(0) Optimization
Use jump tables for sufficiently large switch statements
fkeep-inline-functions

View file

@ -0,0 +1,23 @@
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)

View file

@ -0,0 +1,23 @@
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),

View file

@ -0,0 +1,14 @@
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);

View file

@ -0,0 +1,48 @@
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;

View file

@ -0,0 +1,16 @@
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;

View file

@ -0,0 +1,14 @@
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);
}

View file

@ -0,0 +1,14 @@
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);

View file

@ -0,0 +1,41 @@
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,

View file

@ -0,0 +1,23 @@
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);

View file

@ -0,0 +1,14 @@
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;
}

View file

@ -0,0 +1,14 @@
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);

View file

@ -0,0 +1,14 @@
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))

View file

@ -0,0 +1,15 @@
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

View file

@ -0,0 +1,14 @@
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,

View file

@ -0,0 +1,23 @@
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++;

View file

@ -0,0 +1,108 @@
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;

View file

@ -0,0 +1,24 @@
--- sources/tools/libgloss/msp430/Makefile.in.orig Wed Dec 10 06:01:36 2014
+++ sources/tools/libgloss/msp430/Makefile.in Mon Jul 20 15:46:58 2015
@@ -35,6 +35,7 @@ MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
+DESTDIR = ${DESTDIR}
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
@@ -157,11 +158,11 @@ write.o : $(SDEPS)
install: $(CRT) $(SIM_BSP) $(LIBNOSYS) $(LIB_CRT) $(SCRIPTS)
for c in $(CRT) $(SIM_BSP) $(LIBNOSYS) $(LIB_CRT); do \
- $(INSTALL_DATA) $$c $(tooldir)/lib${MULTISUBDIR}/$$c ;\
+ $(INSTALL_DATA) $$c $(DESTDIR)/$(tooldir)/lib${MULTISUBDIR}/$$c ;\
done
for c in $(SCRIPTS); do \
b=`basename $$c`; \
- $(INSTALL_DATA) $$c $(tooldir)/lib${MULTISUBDIR}/$$b ;\
+ $(INSTALL_DATA) $$c $(DESTDIR)/$(tooldir)/lib${MULTISUBDIR}/$$b ;\
done
clean mostlyclean:

View file

@ -0,0 +1,16 @@
clang on powerpc64 defines vec_step already which collides with the
symbol in gcc, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239266#c23
renaming suggested at https://gcc.gnu.org/legacy-ml/gcc/2019-07/msg00131.html
Index: sources/tools/gcc/tree-vect-loop.c
--- sources/tools/gcc/tree-vect-loop.c.orig
+++ sources/tools/gcc/tree-vect-loop.c
@@ -56,6 +56,8 @@ along with GCC; see the file COPYING3. If not see
#include "tree-vectorizer.h"
#include "target.h"
+#define vec_step vec_step_
+
/* Loop Vectorization Pass.
This pass tries to vectorize loops.