diff options
author | Zach van Rijn <me@zv.io> | 2023-05-12 14:56:42 -0500 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2023-05-12 15:29:36 -0500 |
commit | d4cc0e8d5a0e29e9b66e7058c180a7aa9b2cdac7 (patch) | |
tree | ef6f0e994d734ce1b9b71811a33d8232692f9ba9 /system | |
parent | 55f95de5e74e22cfab0d73726fd323859924f6d7 (diff) | |
download | packages-d4cc0e8d5a0e29e9b66e7058c180a7aa9b2cdac7.tar.gz packages-d4cc0e8d5a0e29e9b66e7058c180a7aa9b2cdac7.tar.bz2 packages-d4cc0e8d5a0e29e9b66e7058c180a7aa9b2cdac7.tar.xz packages-d4cc0e8d5a0e29e9b66e7058c180a7aa9b2cdac7.zip |
remove erroneous files. fixes #828.
Diffstat (limited to 'system')
-rw-r--r-- | system/autoconf/autoconf-2.69-fix-perl-regex.patch | 11 | ||||
-rw-r--r-- | system/binutils/memory.patch | 449 | ||||
-rw-r--r-- | system/bzip2/CVE-2016-3189.patch | 12 | ||||
-rw-r--r-- | system/coreutils/no-doc.patch | 22 | ||||
-rw-r--r-- | system/coreutils/printf-musl.patch | 53 | ||||
-rw-r--r-- | system/coreutils/seq-write-error.patch | 45 | ||||
-rw-r--r-- | system/coreutils/sort-debug-locale.patch | 79 | ||||
-rw-r--r-- | system/gcc/401-libsanitizer-linux.patch | 100 | ||||
-rw-r--r-- | system/gcc/402-libsanitizer-utmp.patch | 75 | ||||
-rw-r--r-- | system/git/0001-gc-use-s-type-character-for-fscanf.patch | 33 | ||||
-rw-r--r-- | system/gmp/gmp-4.1.4-noexecstack.patch | 20 | ||||
-rw-r--r-- | system/vim/no-default-mouse.patch | 16 |
12 files changed, 0 insertions, 915 deletions
diff --git a/system/autoconf/autoconf-2.69-fix-perl-regex.patch b/system/autoconf/autoconf-2.69-fix-perl-regex.patch deleted file mode 100644 index 9cccf912b..000000000 --- a/system/autoconf/autoconf-2.69-fix-perl-regex.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- autoconf-2.69/bin/autoscan.in.old 2012-04-25 02:37:26.000000000 +0000 -+++ autoconf-2.69/bin/autoscan.in 2017-08-03 23:59:38.720214631 +0000 -@@ -358,7 +358,7 @@ - { - # Strip out comments and variable references. - s/#.*//; -- s/\${[^\}]*}//g; -+ s/\$\{[^\}]*\}//g; - s/@[^@]*@//g; - - # Tokens in the code. diff --git a/system/binutils/memory.patch b/system/binutils/memory.patch deleted file mode 100644 index f2cfea130..000000000 --- a/system/binutils/memory.patch +++ /dev/null @@ -1,449 +0,0 @@ -From 9999de060bbcc7cca9dce213deeeec6593887a8e Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" <hjl.tools@gmail.com> -Date: Tue, 27 Feb 2018 12:22:58 -0800 -Subject: [PATCH] Limit memory size to half of address space - -When link_info.keep_memory is TRUE, linker caches the relocation -information and symbol tables of input files in memory. On 32-bit -hosts, linker runs out of 32-bit virtual memory on input files with many -relocations. This patch limits the allocated memory size to half of -the address space for 32-bit hosts. - -bfd/ - - PR ld/18028 - * bfd-in.h (_bfd_link_keep_memory): New. - * bfd-in2.h: Regenerated. - * bfd.c (bfd): Add alloc_size. - * elf-bfd.h (_bfd_elf_link_info_read_relocs): New. - * elf32-i386.c (elf_i386_check_relocs): Use _bfd_link_keep_memory. - Update cache_size. - * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. - * elflink.c (_bfd_elf_link_read_relocs): Renamed to ... - (_bfd_elf_link_info_read_relocs): This. Update cache_size. - (_bfd_elf_link_read_relocs): New. - (_bfd_elf_link_check_relocs): Call _bfd_elf_link_info_read_relocs - instead of _bfd_elf_link_read_relocs. - (elf_link_add_object_symbols): Likewise. - (elf_link_input_bfd): Likewise. - (init_reloc_cookie_rels): Likewise. - (init_reloc_cookie): Update cache_size. Call - _bfd_elf_link_info_read_relocs instead of - _bfd_elf_link_read_relocs. - (link_info_ok): New. - (elf_gc_smash_unused_vtentry_relocs): Updated. Call - _bfd_elf_link_info_read_relocs instead of - _bfd_elf_link_read_relocs. - (bfd_elf_gc_sections): Use link_info_ok. Pass &link_info_ok - to elf_gc_smash_unused_vtentry_relocs. - * linker.c (_bfd_link_keep_memory): New. - * opncls.c (bfd_alloc): Update alloc_size. - -include/ - - PR ld/18028 - * bfdlink.h (bfd_link_info): Add cache_size and max_alloc_size. - -ld/ - - PR ld/18028 - * ldmain.c: Include "bfd_stdint.h". - (main): Set link_info.max_alloc_size to half of the address space. ---- - bfd/bfd-in.h | 2 ++ - bfd/bfd-in2.h | 5 +++ - bfd/bfd.c | 3 ++ - bfd/elf-bfd.h | 3 ++ - bfd/elf32-i386.c | 3 +- - bfd/elf64-x86-64.c | 3 +- - bfd/elflink.c | 89 ++++++++++++++++++++++++++++++++++++++++-------------- - bfd/linker.c | 33 ++++++++++++++++++++ - bfd/opncls.c | 2 ++ - include/bfdlink.h | 7 +++++ - ld/ldmain.c | 3 ++ - 11 files changed, 128 insertions(+), 25 deletions(-) - -diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h -index a06cd740c0..ca4bec8aab 100644 ---- a/bfd/bfd-in.h -+++ b/bfd/bfd-in.h -@@ -600,6 +600,8 @@ struct bfd_section_already_linked; - struct bfd_elf_version_tree; - #endif - -+extern bfd_boolean _bfd_link_keep_memory (struct bfd_link_info *); -+ - extern bfd_boolean bfd_section_already_linked_table_init (void); - extern void bfd_section_already_linked_table_free (void); - extern bfd_boolean _bfd_handle_already_linked -diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h -index 9742c1ac7f..0794bcdcdb 100644 ---- a/bfd/bfd-in2.h -+++ b/bfd/bfd-in2.h -@@ -607,6 +607,8 @@ struct bfd_section_already_linked; - struct bfd_elf_version_tree; - #endif - -+extern bfd_boolean _bfd_link_keep_memory (struct bfd_link_info *); -+ - extern bfd_boolean bfd_section_already_linked_table_init (void); - extern void bfd_section_already_linked_table_free (void); - extern bfd_boolean _bfd_handle_already_linked -@@ -6989,6 +6991,9 @@ struct bfd - be used only for archive elements. */ - int archive_pass; - -+ /* The total size of memory from bfd_alloc. */ -+ bfd_size_type alloc_size; -+ - /* Stuff only useful for object files: - The start address. */ - bfd_vma start_address; -diff --git a/bfd/bfd.c b/bfd/bfd.c -index 288b5b14fe..182b544662 100644 ---- a/bfd/bfd.c -+++ b/bfd/bfd.c -@@ -267,6 +267,9 @@ CODE_FRAGMENT - . be used only for archive elements. *} - . int archive_pass; - . -+. {* The total size of memory from bfd_alloc. *} -+. bfd_size_type alloc_size; -+. - . {* Stuff only useful for object files: - . The start address. *} - . bfd_vma start_address; -diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h -index afd6982a92..37a7b07e51 100644 ---- a/bfd/elf-bfd.h -+++ b/bfd/elf-bfd.h -@@ -2294,6 +2294,9 @@ extern char *_bfd_elfcore_strndup - - extern Elf_Internal_Rela *_bfd_elf_link_read_relocs - (bfd *, asection *, void *, Elf_Internal_Rela *, bfd_boolean); -+extern Elf_Internal_Rela *_bfd_elf_link_info_read_relocs -+ (bfd *, struct bfd_link_info *, asection *, void *, Elf_Internal_Rela *, -+ bfd_boolean); - - extern bfd_boolean _bfd_elf_link_output_relocs - (bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *, -diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c -index 61a14097b0..9a781dc089 100644 ---- a/bfd/elf32-i386.c -+++ b/bfd/elf32-i386.c -@@ -1909,13 +1909,14 @@ elf_i386_check_relocs (bfd *abfd, - - if (elf_section_data (sec)->this_hdr.contents != contents) - { -- if (!converted && !info->keep_memory) -+ if (!converted && !_bfd_link_keep_memory (info)) - free (contents); - else - { - /* Cache the section contents for elf_link_input_bfd if any - load is converted or --no-keep-memory isn't used. */ - elf_section_data (sec)->this_hdr.contents = contents; -+ info->cache_size += sec->size; - } - } - -diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c -index 7016964ace..4ba15ec9fa 100644 ---- a/bfd/elf64-x86-64.c -+++ b/bfd/elf64-x86-64.c -@@ -2281,13 +2281,14 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, - - if (elf_section_data (sec)->this_hdr.contents != contents) - { -- if (!converted && !info->keep_memory) -+ if (!converted && !_bfd_link_keep_memory (info)) - free (contents); - else - { - /* Cache the section contents for elf_link_input_bfd if any - load is converted or --no-keep-memory isn't used. */ - elf_section_data (sec)->this_hdr.contents = contents; -+ info->cache_size += sec->size; - } - } - -diff --git a/bfd/elflink.c b/bfd/elflink.c -index 092edaea26..831605b80a 100644 ---- a/bfd/elflink.c -+++ b/bfd/elflink.c -@@ -2475,14 +2475,16 @@ elf_link_read_relocs_from_section (bfd *abfd, - according to the KEEP_MEMORY argument. If O has two relocation - sections (both REL and RELA relocations), then the REL_HDR - relocations will appear first in INTERNAL_RELOCS, followed by the -- RELA_HDR relocations. */ -+ RELA_HDR relocations. If INFO isn't NULL and KEEP_MEMORY is TRUE, -+ update cache_size. */ - - Elf_Internal_Rela * --_bfd_elf_link_read_relocs (bfd *abfd, -- asection *o, -- void *external_relocs, -- Elf_Internal_Rela *internal_relocs, -- bfd_boolean keep_memory) -+_bfd_elf_link_info_read_relocs (bfd *abfd, -+ struct bfd_link_info *info, -+ asection *o, -+ void *external_relocs, -+ Elf_Internal_Rela *internal_relocs, -+ bfd_boolean keep_memory) - { - void *alloc1 = NULL; - Elf_Internal_Rela *alloc2 = NULL; -@@ -2502,7 +2504,11 @@ _bfd_elf_link_read_relocs (bfd *abfd, - - size = (bfd_size_type) o->reloc_count * sizeof (Elf_Internal_Rela); - if (keep_memory) -- internal_relocs = alloc2 = (Elf_Internal_Rela *) bfd_alloc (abfd, size); -+ { -+ internal_relocs = alloc2 = (Elf_Internal_Rela *) bfd_alloc (abfd, size); -+ if (info) -+ info->cache_size += size; -+ } - else - internal_relocs = alloc2 = (Elf_Internal_Rela *) bfd_malloc (size); - if (internal_relocs == NULL) -@@ -2568,6 +2574,22 @@ _bfd_elf_link_read_relocs (bfd *abfd, - return NULL; - } - -+/* This is similar to _bfd_elf_link_info_read_relocs, except for that -+ NULL is passed to _bfd_elf_link_info_read_relocs for pointer to -+ struct bfd_link_info. */ -+ -+Elf_Internal_Rela * -+_bfd_elf_link_read_relocs (bfd *abfd, -+ asection *o, -+ void *external_relocs, -+ Elf_Internal_Rela *internal_relocs, -+ bfd_boolean keep_memory) -+{ -+ return _bfd_elf_link_info_read_relocs (abfd, NULL, o, external_relocs, -+ internal_relocs, keep_memory); -+ -+} -+ - /* Compute the size of, and allocate space for, REL_HDR which is the - section header for a section containing relocations for O. */ - -@@ -3736,8 +3758,10 @@ _bfd_elf_link_check_relocs (bfd *abfd, struct bfd_link_info *info) - || bfd_is_abs_section (o->output_section)) - continue; - -- internal_relocs = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL, -- info->keep_memory); -+ internal_relocs = _bfd_elf_link_info_read_relocs (abfd, info, -+ o, NULL, -+ NULL, -+ _bfd_link_keep_memory (info)); - if (internal_relocs == NULL) - return FALSE; - -@@ -4990,9 +5014,10 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) - && (s->flags & SEC_DEBUGGING) != 0)) - continue; - -- internal_relocs = _bfd_elf_link_read_relocs (abfd, s, NULL, -- NULL, -- info->keep_memory); -+ internal_relocs = _bfd_elf_link_info_read_relocs (abfd, info, -+ s, NULL, -+ NULL, -+ _bfd_link_keep_memory (info)); - if (internal_relocs == NULL) - goto error_free_vers; - -@@ -10518,8 +10543,10 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) - - /* Get the swapped relocs. */ - internal_relocs -- = _bfd_elf_link_read_relocs (input_bfd, o, flinfo->external_relocs, -- flinfo->internal_relocs, FALSE); -+ = _bfd_elf_link_info_read_relocs (input_bfd, flinfo->info, o, -+ flinfo->external_relocs, -+ flinfo->internal_relocs, -+ FALSE); - if (internal_relocs == NULL - && o->reloc_count > 0) - return FALSE; -@@ -12684,8 +12711,12 @@ init_reloc_cookie (struct elf_reloc_cookie *cookie, - info->callbacks->einfo (_("%P%X: can not read symbols: %E\n")); - return FALSE; - } -- if (info->keep_memory) -- symtab_hdr->contents = (bfd_byte *) cookie->locsyms; -+ if (_bfd_link_keep_memory (info) ) -+ { -+ symtab_hdr->contents = (bfd_byte *) cookie->locsyms; -+ info->cache_size += (cookie->locsymcount -+ * sizeof (Elf_External_Sym_Shndx)); -+ } - } - return TRUE; - } -@@ -12718,8 +12749,9 @@ init_reloc_cookie_rels (struct elf_reloc_cookie *cookie, - } - else - { -- cookie->rels = _bfd_elf_link_read_relocs (abfd, sec, NULL, NULL, -- info->keep_memory); -+ cookie->rels = _bfd_elf_link_info_read_relocs (abfd, info, sec, -+ NULL, NULL, -+ _bfd_link_keep_memory (info)); - if (cookie->rels == NULL) - return FALSE; - cookie->rel = cookie->rels; -@@ -13233,14 +13265,21 @@ elf_gc_propagate_vtable_entries_used (struct elf_link_hash_entry *h, void *okp) - return TRUE; - } - -+struct link_info_ok -+{ -+ struct bfd_link_info *info; -+ bfd_boolean ok; -+}; -+ - static bfd_boolean --elf_gc_smash_unused_vtentry_relocs (struct elf_link_hash_entry *h, void *okp) -+elf_gc_smash_unused_vtentry_relocs (struct elf_link_hash_entry *h, void *ptr) - { - asection *sec; - bfd_vma hstart, hend; - Elf_Internal_Rela *relstart, *relend, *rel; - const struct elf_backend_data *bed; - unsigned int log_file_align; -+ struct link_info_ok *info = (struct link_info_ok *) ptr; - - /* Take care of both those symbols that do not describe vtables as - well as those that are not loaded. */ -@@ -13256,9 +13295,10 @@ elf_gc_smash_unused_vtentry_relocs (struct elf_link_hash_entry *h, void *okp) - hstart = h->root.u.def.value; - hend = hstart + h->size; - -- relstart = _bfd_elf_link_read_relocs (sec->owner, sec, NULL, NULL, TRUE); -+ relstart = _bfd_elf_link_info_read_relocs (sec->owner, info->info, -+ sec, NULL, NULL, TRUE); - if (!relstart) -- return *(bfd_boolean *) okp = FALSE; -+ return info->ok = FALSE; - bed = get_elf_backend_data (sec->owner); - log_file_align = bed->s->log_file_align; - -@@ -13379,6 +13419,7 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info) - elf_gc_mark_hook_fn gc_mark_hook; - const struct elf_backend_data *bed = get_elf_backend_data (abfd); - struct elf_link_hash_table *htab; -+ struct link_info_ok info_ok; - - if (!bed->can_gc_sections - || !is_elf_hash_table (info->hash)) -@@ -13420,8 +13461,10 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info) - return FALSE; - - /* Kill the vtable relocations that were not used. */ -- elf_link_hash_traverse (htab, elf_gc_smash_unused_vtentry_relocs, &ok); -- if (!ok) -+ info_ok.info = info; -+ info_ok.ok = TRUE; -+ elf_link_hash_traverse (htab, elf_gc_smash_unused_vtentry_relocs, &info_ok); -+ if (!info_ok.ok) - return FALSE; - - /* Mark dynamically referenced symbols. */ -diff --git a/bfd/linker.c b/bfd/linker.c -index c29a6e7e10..909d768552 100644 ---- a/bfd/linker.c -+++ b/bfd/linker.c -@@ -3471,3 +3471,36 @@ _bfd_nolink_bfd_define_start_stop (struct bfd_link_info *info ATTRIBUTE_UNUSED, - { - return (struct bfd_link_hash_entry *) _bfd_ptr_bfd_null_error (sec->owner); - } -+ -+bfd_boolean -+_bfd_link_keep_memory (struct bfd_link_info * info) -+{ -+ bfd *abfd; -+ bfd_size_type size; -+ -+ if (!info->keep_memory) -+ return FALSE; -+ -+ /* Keep allocated memory size below limit only for 32-bit hosts. */ -+ if (sizeof (void *) > 4) -+ return TRUE; -+ -+ abfd = info->input_bfds; -+ size = info->cache_size; -+ do -+ { -+ if (size >= info->max_alloc_size) -+ { -+ /* Over the limit. Reduce the memory usage. */ -+ info->keep_memory = FALSE; -+ return FALSE; -+ } -+ if (!abfd) -+ break; -+ size += abfd->alloc_size; -+ abfd = abfd->link.next; -+ } -+ while (1); -+ -+ return TRUE; -+} -diff --git a/bfd/opncls.c b/bfd/opncls.c -index 16b568c8ab..86262e1231 100644 ---- a/bfd/opncls.c -+++ b/bfd/opncls.c -@@ -949,6 +949,8 @@ bfd_alloc (bfd *abfd, bfd_size_type size) - ret = objalloc_alloc ((struct objalloc *) abfd->memory, ul_size); - if (ret == NULL) - bfd_set_error (bfd_error_no_memory); -+ else -+ abfd->alloc_size += size; - return ret; - } - -diff --git a/include/bfdlink.h b/include/bfdlink.h -index 5d637acbab..f06d5171c3 100644 ---- a/include/bfdlink.h -+++ b/include/bfdlink.h -@@ -635,6 +635,13 @@ struct bfd_link_info - - /* The version information. */ - struct bfd_elf_version_tree *version_info; -+ -+ /* Size of cache. Backend can use it to keep strace cache size. */ -+ bfd_size_type cache_size; -+ -+ /* The maximum size of allocated memory. Backend can use cache_size -+ and and max_alloc_size to decide if keep_memory should be honored. */ -+ bfd_size_type max_alloc_size; - }; - - /* This structures holds a set of callback functions. These are called -diff --git a/ld/ldmain.c b/ld/ldmain.c -index b6914db5da..14c3349c97 100644 ---- a/ld/ldmain.c -+++ b/ld/ldmain.c -@@ -21,6 +21,7 @@ - - #include "sysdep.h" - #include "bfd.h" -+#include "bfd_stdint.h" - #include "safe-ctype.h" - #include "libiberty.h" - #include "progress.h" -@@ -271,6 +272,8 @@ main (int argc, char **argv) - - link_info.allow_undefined_version = TRUE; - link_info.keep_memory = TRUE; -+ /* Limit the allocated memory size to half of the address space. */ -+ link_info.max_alloc_size = ((uintptr_t) (void *) -1) / 2; - link_info.combreloc = TRUE; - link_info.strip_discarded = TRUE; - link_info.emit_hash = DEFAULT_EMIT_SYSV_HASH; diff --git a/system/bzip2/CVE-2016-3189.patch b/system/bzip2/CVE-2016-3189.patch deleted file mode 100644 index 6622670c9..000000000 --- a/system/bzip2/CVE-2016-3189.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/bzip2recover.c b/bzip2recover.c -index f9de049..d159c92 100644 ---- a/bzip2recover.c -+++ b/bzip2recover.c -@@ -457,6 +457,7 @@ Int32 main ( Int32 argc, Char** argv ) - bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 ); - bsPutUInt32 ( bsWr, blockCRC ); - bsClose ( bsWr ); -+ outFile = NULL; - } - if (wrBlock >= rbCtr) break; - wrBlock++; diff --git a/system/coreutils/no-doc.patch b/system/coreutils/no-doc.patch deleted file mode 100644 index a1d74623b..000000000 --- a/system/coreutils/no-doc.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- coreutils-8.27/Makefile.in.old 2017-03-09 05:24:51.000000000 +0000 -+++ coreutils-8.27/Makefile.in 2017-06-22 03:07:59.568716258 +0000 -@@ -2363,7 +2363,7 @@ - } - man1dir = $(mandir)/man1 - NROFF = nroff --MANS = $(man1_MANS) -+MANS = - HEADERS = $(noinst_HEADERS) - RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive ---- coreutils-8.27/Makefile.in.old 2017-06-22 03:08:55.821951666 +0000 -+++ coreutils-8.27/Makefile.in 2017-06-22 03:19:51.770820411 +0000 -@@ -12192,7 +12192,7 @@ - - info-am: $(INFO_DEPS) - --install-data-am: install-info-am install-man -+install-data-am: install-info-am - - install-dvi: install-dvi-recursive - diff --git a/system/coreutils/printf-musl.patch b/system/coreutils/printf-musl.patch deleted file mode 100644 index 28a951635..000000000 --- a/system/coreutils/printf-musl.patch +++ /dev/null @@ -1,53 +0,0 @@ -From ad5c14dcadd4603363e68da960ed0101b61439bd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com> -Date: Sat, 12 Aug 2017 23:53:33 -0700 -Subject: [PATCH] tests: fix false failure with large printf formats - -* tests/misc/printf-surprise.sh: With musl libc the -large printf format does succeed, outputting data. -To avoid SIGPIPE being generated we ignore that signal -and then handle the subsequent EPIPE error. -Reported by A. Wilcox ---- - tests/misc/printf-surprise.sh | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/tests/misc/printf-surprise.sh b/tests/misc/printf-surprise.sh -index 2edd34c..46c0d8f 100755 ---- a/tests/misc/printf-surprise.sh -+++ b/tests/misc/printf-surprise.sh -@@ -50,6 +50,9 @@ vm=$(get_min_ulimit_v_ env $prog %20f 0) \ - - mkfifo_or_skip_ fifo - -+(trap '' PIPE && yes | :) 2>&1 | grep -qF 'Broken pipe' || -+ skip_ 'trapping SIGPIPE is not supported' -+ - # Disable MALLOC_PERTURB_, to avoid triggering this bug - # https://bugs.debian.org/481543#77 - export MALLOC_PERTURB_=0 -@@ -60,11 +63,11 @@ cleanup_() { kill $pid 2>/dev/null && wait $pid; } - head -c 10 fifo > out & pid=$! - - # Trigger large mem allocation failure --( ulimit -v $vm && env $prog %20000000f 0 2>err-msg > fifo ) -+( trap '' PIPE && ulimit -v $vm && env $prog %20000000f 0 2>err-msg > fifo ) - exit=$? - - # Map this longer, and rarer, diagnostic to the common one. --# printf: cannot perform formatted output: Cannot allocate memory" \ -+# printf: cannot perform formatted output: Cannot allocate memory" - sed 's/cannot perform .*/write error/' err-msg > k && mv k err-msg - err_msg=$(tr '\n' : < err-msg) - -@@ -81,6 +84,7 @@ n_out=$(wc -c < out) - - case $n_out:$diagnostic:$exit in - 10:n:0) ;; # ok, succeeds w/no diagnostic: FreeBSD 6.1 -+ 10:y:1) ;; # ok, fails with EPIPE diagnostic: musl libc - 0:y:1) ;; # ok, glibc-2.8 and newer, when printf(3) fails with ENOMEM - - # With MALLOC_PERTURB_=0, this no longer happens. --- -2.9.3 - diff --git a/system/coreutils/seq-write-error.patch b/system/coreutils/seq-write-error.patch deleted file mode 100644 index 4892a82ec..000000000 --- a/system/coreutils/seq-write-error.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 1e1dbbe0f95c7170009f3ba4d8380c1b98ff53c8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com> -Date: Sun, 13 Aug 2017 00:18:43 -0700 -Subject: [PATCH] seq: produce consistent error messages upon write error - -* src/seq.c (io_error): Use the same error message as would -be generated at exit time when closing the stdout stream. -The inconsistency was added with commit v8.25-26-gc92585b. -This was noticed due to an inconsistency in the expected -error message generated by seq on musl libc. -Reported by A. Wilcox. ---- - src/seq.c | 2 +- - tests/misc/seq-epipe.sh | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/seq.c b/src/seq.c -index bb191ba..5e5b381 100644 ---- a/src/seq.c -+++ b/src/seq.c -@@ -284,7 +284,7 @@ io_error (void) - { - /* FIXME: consider option to silently ignore errno=EPIPE */ - clearerr (stdout); -- die (EXIT_FAILURE, errno, _("standard output")); -+ die (EXIT_FAILURE, errno, _("write error")); - } - - /* Actually print the sequence of numbers in the specified range, with the -diff --git a/tests/misc/seq-epipe.sh b/tests/misc/seq-epipe.sh -index edbd563..69dd75d 100755 ---- a/tests/misc/seq-epipe.sh -+++ b/tests/misc/seq-epipe.sh -@@ -33,7 +33,7 @@ compare exp code || fail=1 - - # The error message must begin with "standard output:" - # (but don't hard-code the strerror text) --grep '^seq: standard output: ' err \ -+grep '^seq: write error: ' err \ - || { warn_ "seq emitted incorrect error on EPIPE"; \ - cat err;\ - fail=1; } --- -2.9.3 - diff --git a/system/coreutils/sort-debug-locale.patch b/system/coreutils/sort-debug-locale.patch deleted file mode 100644 index 27921abbd..000000000 --- a/system/coreutils/sort-debug-locale.patch +++ /dev/null @@ -1,79 +0,0 @@ -From b938d8966c3d1afec9730d403fd6a6eb4d856b85 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com> -Date: Sun, 13 Aug 2017 00:45:32 -0700 -Subject: [PATCH] sort: handle musl locale differences in --debug reporting - -* src/sort.c (main): Don't assume hard_LC_COLLATE implies -a successful setting of the locale as musl defaults to -UTF8 when failing to set the specified locale. -* tests/misc/sort-debug-warn.sh: Adjust for the now -separated locale debug info and map the musl specific -message back to the common case. -Reported by A. Wilcox. ---- - src/sort.c | 17 +++++++++-------- - tests/misc/sort-debug-warn.sh | 9 +++++++-- - 2 files changed, 16 insertions(+), 10 deletions(-) - -diff --git a/src/sort.c b/src/sort.c -index 015e40e..ba6ceac 100644 ---- a/src/sort.c -+++ b/src/sort.c -@@ -4675,18 +4675,19 @@ main (int argc, char **argv) - - /* Always output the locale in debug mode, since this - is such a common source of confusion. */ -+ -+ /* OpenBSD can only set some categories with LC_ALL above, -+ so set LC_COLLATE explicitly to flag errors. */ -+ if (locale_ok) -+ locale_ok = !! setlocale (LC_COLLATE, ""); -+ if (! locale_ok) -+ error (0, 0, "%s", _("failed to set locale")); - if (hard_LC_COLLATE) - error (0, 0, _("using %s sorting rules"), - quote (setlocale (LC_COLLATE, NULL))); - else -- { -- /* OpenBSD can only set some categories with LC_ALL above, -- so set LC_COLLATE explicitly to flag errors. */ -- if (locale_ok) -- locale_ok = !! setlocale (LC_COLLATE, ""); -- error (0, 0, "%s%s", locale_ok ? "" : _("failed to set locale; "), -- _("using simple byte comparison")); -- } -+ error (0, 0, "%s", _("using simple byte comparison")); -+ - key_warnings (&gkey, gkey_only); - } - -diff --git a/tests/misc/sort-debug-warn.sh b/tests/misc/sort-debug-warn.sh -index 3602c84..8119693 100755 ---- a/tests/misc/sort-debug-warn.sh -+++ b/tests/misc/sort-debug-warn.sh -@@ -71,7 +71,8 @@ sort: using simple byte comparison - 17 - sort: using simple byte comparison - 18 --sort: failed to set locale; using simple byte comparison -+sort: failed to set locale -+sort: using simple byte comparison - EOF - - echo 1 >> out -@@ -109,7 +110,11 @@ sort -rM --debug /dev/null 2>>out #no warning - echo 17 >> out - sort -rM -k1,1 --debug /dev/null 2>>out #no warning - echo 18 >> out --LC_ALL=missing sort --debug /dev/null 2>>out -+LC_ALL=missing sort --debug /dev/null 2>>out.t -+# musl libc accepts "missing" and implicitly uses UTF8, -+# so adjust the expected message accordingly. -+sed 's/using .*missing.* sorting rules/using simple byte comparison/' \ -+ out.t >>out - - compare exp out || fail=1 - --- -2.9.3 - diff --git a/system/gcc/401-libsanitizer-linux.patch b/system/gcc/401-libsanitizer-linux.patch deleted file mode 100644 index 8a662a268..000000000 --- a/system/gcc/401-libsanitizer-linux.patch +++ /dev/null @@ -1,100 +0,0 @@ ---- gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cc.old 2017-10-19 11:23:59.000000000 +0000 -+++ gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cc 2019-06-27 05:39:48.258332316 +0000 -@@ -752,7 +752,9 @@ - } - - #if SANITIZER_LINUX -+#ifndef SA_RESTORER - #define SA_RESTORER 0x04000000 -+#endif - // Doesn't set sa_restorer if the caller did not set it, so use with caution - //(see below). - int internal_sigaction_norestorer(int signum, const void *act, void *oldact) { -@@ -1687,65 +1689,59 @@ - } - - static void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) { --#if defined(__arm__) - ucontext_t *ucontext = (ucontext_t*)context; -+#if defined(__arm__) - *pc = ucontext->uc_mcontext.arm_pc; - *bp = ucontext->uc_mcontext.arm_fp; - *sp = ucontext->uc_mcontext.arm_sp; - #elif defined(__aarch64__) -- ucontext_t *ucontext = (ucontext_t*)context; - *pc = ucontext->uc_mcontext.pc; - *bp = ucontext->uc_mcontext.regs[29]; - *sp = ucontext->uc_mcontext.sp; - #elif defined(__hppa__) -- ucontext_t *ucontext = (ucontext_t*)context; - *pc = ucontext->uc_mcontext.sc_iaoq[0]; - /* GCC uses %r3 whenever a frame pointer is needed. */ - *bp = ucontext->uc_mcontext.sc_gr[3]; - *sp = ucontext->uc_mcontext.sc_gr[30]; - #elif defined(__x86_64__) - # if SANITIZER_FREEBSD -- ucontext_t *ucontext = (ucontext_t*)context; - *pc = ucontext->uc_mcontext.mc_rip; - *bp = ucontext->uc_mcontext.mc_rbp; - *sp = ucontext->uc_mcontext.mc_rsp; - #elif SANITIZER_NETBSD -- ucontext_t *ucontext = (ucontext_t *)context; - *pc = ucontext->uc_mcontext.__gregs[_REG_RIP]; - *bp = ucontext->uc_mcontext.__gregs[_REG_RBP]; - *sp = ucontext->uc_mcontext.__gregs[_REG_RSP]; - # else -- ucontext_t *ucontext = (ucontext_t*)context; - *pc = ucontext->uc_mcontext.gregs[REG_RIP]; - *bp = ucontext->uc_mcontext.gregs[REG_RBP]; - *sp = ucontext->uc_mcontext.gregs[REG_RSP]; - # endif - #elif defined(__i386__) - # if SANITIZER_FREEBSD -- ucontext_t *ucontext = (ucontext_t*)context; - *pc = ucontext->uc_mcontext.mc_eip; - *bp = ucontext->uc_mcontext.mc_ebp; - *sp = ucontext->uc_mcontext.mc_esp; - #elif SANITIZER_NETBSD -- ucontext_t *ucontext = (ucontext_t *)context; - *pc = ucontext->uc_mcontext.__gregs[_REG_EIP]; - *bp = ucontext->uc_mcontext.__gregs[_REG_EBP]; - *sp = ucontext->uc_mcontext.__gregs[_REG_ESP]; - # else -- ucontext_t *ucontext = (ucontext_t*)context; - *pc = ucontext->uc_mcontext.gregs[REG_EIP]; - *bp = ucontext->uc_mcontext.gregs[REG_EBP]; - *sp = ucontext->uc_mcontext.gregs[REG_ESP]; - # endif --#elif defined(__powerpc__) || defined(__powerpc64__) -- ucontext_t *ucontext = (ucontext_t*)context; -- *pc = ucontext->uc_mcontext.regs->nip; -- *sp = ucontext->uc_mcontext.regs->gpr[PT_R1]; -+#elif defined(__powerpc64__) -+ *pc = ucontext->uc_mcontext.gp_regs[32]; -+ *sp = ucontext->uc_mcontext.gp_regs[1]; -+ *bp = ucontext->uc_mcontext.gp_regs[31]; -+#elif defined(__powerpc__) -+ *pc = ucontext->uc_mcontext.gregs[32]; -+ *sp = ucontext->uc_mcontext.gregs[1]; - // The powerpc{,64}-linux ABIs do not specify r31 as the frame - // pointer, but GCC always uses r31 when we need a frame pointer. -- *bp = ucontext->uc_mcontext.regs->gpr[PT_R31]; -+ *bp = ucontext->uc_mcontext.gregs[31]; - #elif defined(__sparc__) -- ucontext_t *ucontext = (ucontext_t*)context; - uptr *stk_ptr; - # if defined (__arch64__) - *pc = ucontext->uc_mcontext.mc_gregs[MC_PC]; -@@ -1759,12 +1755,10 @@ - *bp = stk_ptr[15]; - # endif - #elif defined(__mips__) -- ucontext_t *ucontext = (ucontext_t*)context; - *pc = ucontext->uc_mcontext.pc; - *bp = ucontext->uc_mcontext.gregs[30]; - *sp = ucontext->uc_mcontext.gregs[29]; - #elif defined(__s390__) -- ucontext_t *ucontext = (ucontext_t*)context; - # if defined(__s390x__) - *pc = ucontext->uc_mcontext.psw.addr; - # else diff --git a/system/gcc/402-libsanitizer-utmp.patch b/system/gcc/402-libsanitizer-utmp.patch deleted file mode 100644 index 7929cd8b9..000000000 --- a/system/gcc/402-libsanitizer-utmp.patch +++ /dev/null @@ -1,75 +0,0 @@ ---- gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc.old 2018-05-31 09:58:32.000000000 +0000 -+++ gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2019-06-27 08:52:53.520080465 +0000 -@@ -43,9 +43,6 @@ - #include <termios.h> - #include <time.h> - #include <wchar.h> --#if !SANITIZER_MAC && !SANITIZER_FREEBSD --#include <utmp.h> --#endif - - #if !SANITIZER_IOS - #include <net/route.h> -@@ -291,9 +288,6 @@ - int shmctl_shm_stat = (int)SHM_STAT; - #endif - --#if !SANITIZER_MAC && !SANITIZER_FREEBSD -- unsigned struct_utmp_sz = sizeof(struct utmp); --#endif - #if !SANITIZER_ANDROID - unsigned struct_utmpx_sz = sizeof(struct utmpx); - #endif ---- gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h.old 2017-10-19 11:23:59.000000000 +0000 -+++ gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h 2019-06-27 08:53:41.114993442 +0000 -@@ -873,9 +873,6 @@ - extern int shmctl_shm_stat; - #endif - --#if !SANITIZER_MAC && !SANITIZER_FREEBSD -- extern unsigned struct_utmp_sz; --#endif - #if !SANITIZER_ANDROID - extern unsigned struct_utmpx_sz; - #endif ---- gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc.old 2017-10-19 11:23:59.000000000 +0000 -+++ gcc-8.3.0/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc 2019-06-27 08:54:20.530780618 +0000 -@@ -6106,38 +6106,7 @@ - - // FIXME: add other *stat interceptor - --#if SANITIZER_INTERCEPT_UTMP --INTERCEPTOR(void *, getutent, int dummy) { -- void *ctx; -- COMMON_INTERCEPTOR_ENTER(ctx, getutent, dummy); -- void *res = REAL(getutent)(dummy); -- if (res) -- COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, __sanitizer::struct_utmp_sz); -- return res; --} --INTERCEPTOR(void *, getutid, void *ut) { -- void *ctx; -- COMMON_INTERCEPTOR_ENTER(ctx, getutid, ut); -- void *res = REAL(getutid)(ut); -- if (res) -- COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, __sanitizer::struct_utmp_sz); -- return res; --} --INTERCEPTOR(void *, getutline, void *ut) { -- void *ctx; -- COMMON_INTERCEPTOR_ENTER(ctx, getutline, ut); -- void *res = REAL(getutline)(ut); -- if (res) -- COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, __sanitizer::struct_utmp_sz); -- return res; --} --#define INIT_UTMP \ -- COMMON_INTERCEPT_FUNCTION(getutent); \ -- COMMON_INTERCEPT_FUNCTION(getutid); \ -- COMMON_INTERCEPT_FUNCTION(getutline); --#else - #define INIT_UTMP --#endif - - #if SANITIZER_INTERCEPT_UTMPX - INTERCEPTOR(void *, getutxent, int dummy) { diff --git a/system/git/0001-gc-use-s-type-character-for-fscanf.patch b/system/git/0001-gc-use-s-type-character-for-fscanf.patch deleted file mode 100644 index e3fe78cf6..000000000 --- a/system/git/0001-gc-use-s-type-character-for-fscanf.patch +++ /dev/null @@ -1,33 +0,0 @@ -From afceb0f7755a87d0dd2194e95f26c9dc8f4bc688 Mon Sep 17 00:00:00 2001 -From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> -Date: Fri, 15 Sep 2017 23:55:57 -0500 -Subject: [PATCH] gc: use 's' type character for fscanf - -The ISO C standard states that using a field width together with the 'c' -type character will read the exact amount specified; if that amount of -bytes is not available, a match error occurs. - -This patch allows the t6500 test to pass on the musl libc, and `git gc` -to behave correctly on systems utilising musl. - -Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com> ---- - builtin/gc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/builtin/gc.c b/builtin/gc.c -index 3c78fcb..bb2d6c1 100644 ---- a/builtin/gc.c -+++ b/builtin/gc.c -@@ -258,7 +258,7 @@ static const char *lock_repo_for_gc(int force, pid_t* ret_pid) - int should_exit; - - if (!scan_fmt) -- scan_fmt = xstrfmt("%s %%%dc", "%"SCNuMAX, HOST_NAME_MAX); -+ scan_fmt = xstrfmt("%s %%%ds", "%"SCNuMAX, HOST_NAME_MAX); - fp = fopen(pidfile_path, "r"); - memset(locking_host, 0, sizeof(locking_host)); - should_exit = --- -2.10.0 - diff --git a/system/gmp/gmp-4.1.4-noexecstack.patch b/system/gmp/gmp-4.1.4-noexecstack.patch deleted file mode 100644 index 093bec1a5..000000000 --- a/system/gmp/gmp-4.1.4-noexecstack.patch +++ /dev/null @@ -1,20 +0,0 @@ -fixed executable stack - -http://bugs.gentoo.org/115038 - ---- gmp-4.1.4/configure -+++ gmp-4.1.4/configure -@@ -21689,6 +21689,13 @@ - fi - echo "')" >> $gmp_configm4 - echo "define(\`__CONFIG_M4_INCLUDED__')" >> $gmp_configm4 -+# Gentoo hack -+case $host_os in -+ *linux*) -+ echo '.section .note.GNU-stack,"",%progbits' >> $gmp_configm4 -+ echo '.previous' >> $gmp_configm4 -+ ;; -+esac - - # Create Makefiles - # FIXME: Upcoming version of autoconf/automake may not like broken lines. diff --git a/system/vim/no-default-mouse.patch b/system/vim/no-default-mouse.patch deleted file mode 100644 index c34b9cae7..000000000 --- a/system/vim/no-default-mouse.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -Nurd vim-8.1.0712/runtime/defaults.vim vim-8.1.0712.new/runtime/defaults.vim ---- vim-8.1.0712/runtime/defaults.vim 2019-01-09 16:02:43.000000000 -0600 -+++ vim-8.1.0712.new/runtime/defaults.vim 2019-01-27 01:18:04.196123398 -0600 -@@ -73,12 +73,6 @@ - " Revert with ":iunmap <C-U>". - inoremap <C-U> <C-G>u<C-U> - --" In many terminal emulators the mouse works just fine. By enabling it you --" can position the cursor, Visually select and scroll with the mouse. --if has('mouse') -- set mouse=a --endif -- - " Switch syntax highlighting on when the terminal has colors or when using the - " GUI (which always has colors). - if &t_Co > 2 || has("gui_running") |