Merge pull request #134917 from NixOS/binutils-2.37

binutils: 2.35.1 -> 2.38

authored by

Bernardo Meurer and committed by
GitHub
e2d150f6 e9cfdc6b

+357 -870
+13 -1
pkgs/applications/window-managers/afterstep/default.nix
··· 45 45 46 46 # A strange type of bug: dbus is not immediately found by pkg-config 47 47 preConfigure = '' 48 - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config dbus-1 --cflags)" 48 + # binutils 2.37 fix 49 + # https://github.com/afterstep/afterstep/issues/2 50 + fixupList=( 51 + "autoconf/Makefile.defines.in" 52 + "libAfterImage/aftershow/Makefile.in" 53 + "libAfterImage/apps/Makefile.in" 54 + "libAfterBase/Makefile.in" 55 + "libAfterImage/Makefile.in" 56 + ) 57 + for toFix in "''${fixupList[@]}"; do 58 + substituteInPlace "$toFix" --replace "clq" "cq" 59 + done 60 + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config dbus-1 --cflags)" 49 61 ''; 50 62 51 63 # Parallel build fails due to missing dependencies between private libaries:
+13
pkgs/desktops/cdesktopenv/default.nix
··· 56 56 "LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive" 57 57 ]; 58 58 59 + preConfigure = '' 60 + # binutils 2.37 fix 61 + fixupList=( 62 + "config/cf/Imake.tmpl" 63 + "config/util/crayar.sh" 64 + "config/util/crayar.sh" 65 + "programs/dtwm/Makefile.tmpl" 66 + ) 67 + for toFix in "''${fixupList[@]}"; do 68 + substituteInPlace "$toFix" --replace "clq" "cq" 69 + done 70 + ''; 71 + 59 72 preBuild = '' 60 73 while IFS= read -r -d ''$'\0' i; do 61 74 substituteInPlace "$i" --replace /usr/dt $out/opt/dt
+137
pkgs/development/tools/misc/binutils/0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch
··· 1 + From beca4a2c25ee86e4020f8b8bddc4d8e0ed3430b3 Mon Sep 17 00:00:00 2001 2 + From: Andrew Childs <andrew.childs@bibo.com.ph> 3 + Date: Tue, 22 Feb 2022 11:28:04 +0900 4 + Subject: [PATCH] Revert "libtool.m4: fix nm BSD flag detection" 5 + 6 + This reverts commit bef9ef8ca0f941d743c77cc55b5fe7985990b2a7. 7 + --- 8 + ChangeLog | 9 ------ 9 + libtool.m4 | 88 ++++++++++++++++++++++++++---------------------------- 10 + 2 files changed, 43 insertions(+), 54 deletions(-) 11 + 12 + diff --git a/ChangeLog b/ChangeLog 13 + index 18e8b6835da..c12f07403c3 100644 14 + --- a/ChangeLog 15 + +++ b/ChangeLog 16 + @@ -375,15 +375,6 @@ 17 + 18 + * src-release.sh (GDB_SUPPPORT_DIRS): Add libbacktrace. 19 + 20 + -2021-09-27 Nick Alcock <nick.alcock@oracle.com> 21 + - 22 + - PR libctf/27967 23 + - * libtool.m4 (LT_PATH_NM): Try BSDization flags with a user-provided 24 + - NM, if there is one. Run nm on itself, not on /dev/null, to avoid 25 + - errors from nms that refuse to work on non-regular files. Remove 26 + - other workarounds for this problem. Strip out blank lines from the 27 + - nm output. 28 + - 29 + 2021-09-27 Nick Alcock <nick.alcock@oracle.com> 30 + 31 + PR libctf/27967 32 + diff --git a/libtool.m4 b/libtool.m4 33 + index a216bb14e99..7a711249304 100644 34 + --- a/libtool.m4 35 + +++ b/libtool.m4 36 + @@ -3200,55 +3200,53 @@ _LT_DECL([], [file_magic_cmd], [1], 37 + 38 + # LT_PATH_NM 39 + # ---------- 40 + -# find the pathname to a BSD- or MS-compatible name lister, and any flags 41 + -# needed to make it compatible 42 + +# find the pathname to a BSD- or MS-compatible name lister 43 + AC_DEFUN([LT_PATH_NM], 44 + [AC_REQUIRE([AC_PROG_CC])dnl 45 + AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 46 + [if test -n "$NM"; then 47 + - # Let the user override the nm to test. 48 + - lt_nm_to_check="$NM" 49 + - else 50 + - lt_nm_to_check="${ac_tool_prefix}nm" 51 + - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 52 + - lt_nm_to_check="$lt_nm_to_check nm" 53 + - fi 54 + - fi 55 + - for lt_tmp_nm in $lt_nm_to_check; do 56 + - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 57 + - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 58 + - IFS="$lt_save_ifs" 59 + - test -z "$ac_dir" && ac_dir=. 60 + - case "$lt_tmp_nm" in 61 + - */*|*\\*) tmp_nm="$lt_tmp_nm";; 62 + - *) tmp_nm="$ac_dir/$lt_tmp_nm";; 63 + - esac 64 + - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 65 + - # Check to see if the nm accepts a BSD-compat flag. 66 + - # Adding the `sed 1q' prevents false positives on HP-UX, which says: 67 + - # nm: unknown option "B" ignored 68 + - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in 69 + - *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" 70 + - break 71 + - ;; 72 + - *) 73 + - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in 74 + - *$tmp_nm*) 75 + - lt_cv_path_NM="$tmp_nm -p" 76 + - break 77 + - ;; 78 + - *) 79 + - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 80 + - continue # so that we can try to find one that supports BSD flags 81 + - ;; 82 + - esac 83 + - ;; 84 + - esac 85 + - fi 86 + - done 87 + - IFS="$lt_save_ifs" 88 + - done 89 + - : ${lt_cv_path_NM=no}]) 90 + + # Let the user override the test. 91 + + lt_cv_path_NM="$NM" 92 + +else 93 + + lt_nm_to_check="${ac_tool_prefix}nm" 94 + + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 95 + + lt_nm_to_check="$lt_nm_to_check nm" 96 + + fi 97 + + for lt_tmp_nm in $lt_nm_to_check; do 98 + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 99 + + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 100 + + IFS="$lt_save_ifs" 101 + + test -z "$ac_dir" && ac_dir=. 102 + + tmp_nm="$ac_dir/$lt_tmp_nm" 103 + + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 104 + + # Check to see if the nm accepts a BSD-compat flag. 105 + + # Adding the `sed 1q' prevents false positives on HP-UX, which says: 106 + + # nm: unknown option "B" ignored 107 + + # Tru64's nm complains that /dev/null is an invalid object file 108 + + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 109 + + */dev/null* | *'Invalid file or object type'*) 110 + + lt_cv_path_NM="$tmp_nm -B" 111 + + break 112 + + ;; 113 + + *) 114 + + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 115 + + */dev/null*) 116 + + lt_cv_path_NM="$tmp_nm -p" 117 + + break 118 + + ;; 119 + + *) 120 + + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 121 + + continue # so that we can try to find one that supports BSD flags 122 + + ;; 123 + + esac 124 + + ;; 125 + + esac 126 + + fi 127 + + done 128 + + IFS="$lt_save_ifs" 129 + + done 130 + + : ${lt_cv_path_NM=no} 131 + +fi]) 132 + if test "$lt_cv_path_NM" != "no"; then 133 + NM="$lt_cv_path_NM" 134 + else 135 + -- 136 + 2.34.1 137 +
+47
pkgs/development/tools/misc/binutils/0001-libtool.m4-update-macos-version-detection-block.patch
··· 1 + From 33a8dc728eb5da3e1d3439c96810d1f6b2660b89 Mon Sep 17 00:00:00 2001 2 + From: Andrew Childs <andrew.childs@bibo.com.ph> 3 + Date: Tue, 22 Feb 2022 12:24:46 +0900 4 + Subject: [PATCH] libtool.m4: update macos version detection block 5 + 6 + Includes upstream change 7 + 9e8c882517082fe5755f2524d23efb02f1522490 8 + --- 9 + libtool.m4 | 21 ++++++++------------- 10 + 1 file changed, 8 insertions(+), 13 deletions(-) 11 + 12 + diff --git a/libtool.m4 b/libtool.m4 13 + index 7a711249304..f452efb4300 100644 14 + --- a/libtool.m4 15 + +++ b/libtool.m4 16 + @@ -996,20 +996,15 @@ _LT_EOF 17 + ]) 18 + case $host_os in 19 + rhapsody* | darwin1.[[012]]) 20 + - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 21 + + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 22 + darwin1.*) 23 + - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 24 + - darwin*) # darwin 5.x on 25 + - # if running on 10.5 or later, the deployment target defaults 26 + - # to the OS version, if on x86, and 10.4, the deployment 27 + - # target defaults to 10.4. Don't you love it? 28 + - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 29 + - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 30 + - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 31 + - 10.[[012]][[,.]]*) 32 + - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 33 + - 10.*) 34 + - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 35 + + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 36 + + darwin*) 37 + + case $MACOSX_DEPLOYMENT_TARGET,$host in 38 + + 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 39 + + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 40 + + *) 41 + + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 42 + esac 43 + ;; 44 + esac 45 + -- 46 + 2.34.1 47 +
-77
pkgs/development/tools/misc/binutils/CVE-2020-35448.patch
··· 1 - From 8642dafaef21aa6747cec01df1977e9c52eb4679 Mon Sep 17 00:00:00 2001 2 - From: Alan Modra <amodra@gmail.com> 3 - Date: Fri, 4 Sep 2020 19:19:18 +0930 4 - Subject: [PATCH] PR26574, heap buffer overflow in 5 - _bfd_elf_slurp_secondary_reloc_section 6 - 7 - A horribly fuzzed object with section headers inside the ELF header. 8 - Disallow that, and crazy reloc sizes. 9 - 10 - PR 26574 11 - * elfcode.h (elf_object_p): Sanity check section header offset. 12 - * elf.c (_bfd_elf_slurp_secondary_reloc_section): Sanity check 13 - sh_entsize. 14 - --- 15 - bfd/elf.c | 4 +++- 16 - bfd/elfcode.h | 8 ++++---- 17 - 3 files changed, 14 insertions(+), 5 deletions(-) 18 - 19 - diff --git a/bfd/elf.c b/bfd/elf.c 20 - index ac2095f787d..5a02f8dc309 100644 21 - --- a/bfd/elf.c 22 - +++ b/bfd/elf.c 23 - @@ -12576,7 +12576,9 @@ _bfd_elf_slurp_secondary_reloc_section (bfd * abfd, 24 - Elf_Internal_Shdr * hdr = & elf_section_data (relsec)->this_hdr; 25 - 26 - if (hdr->sh_type == SHT_SECONDARY_RELOC 27 - - && hdr->sh_info == (unsigned) elf_section_data (sec)->this_idx) 28 - + && hdr->sh_info == (unsigned) elf_section_data (sec)->this_idx 29 - + && (hdr->sh_entsize == ebd->s->sizeof_rel 30 - + || hdr->sh_entsize == ebd->s->sizeof_rela)) 31 - { 32 - bfd_byte * native_relocs; 33 - bfd_byte * native_reloc; 34 - diff --git a/bfd/elfcode.h b/bfd/elfcode.h 35 - index 2ed2f135c34..606ff64fd4d 100644 36 - --- a/bfd/elfcode.h 37 - +++ b/bfd/elfcode.h 38 - @@ -571,7 +571,7 @@ elf_object_p (bfd *abfd) 39 - 40 - /* If this is a relocatable file and there is no section header 41 - table, then we're hosed. */ 42 - - if (i_ehdrp->e_shoff == 0 && i_ehdrp->e_type == ET_REL) 43 - + if (i_ehdrp->e_shoff < sizeof (x_ehdr) && i_ehdrp->e_type == ET_REL) 44 - goto got_wrong_format_error; 45 - 46 - /* As a simple sanity check, verify that what BFD thinks is the 47 - @@ -581,7 +581,7 @@ elf_object_p (bfd *abfd) 48 - goto got_wrong_format_error; 49 - 50 - /* Further sanity check. */ 51 - - if (i_ehdrp->e_shoff == 0 && i_ehdrp->e_shnum != 0) 52 - + if (i_ehdrp->e_shoff < sizeof (x_ehdr) && i_ehdrp->e_shnum != 0) 53 - goto got_wrong_format_error; 54 - 55 - ebd = get_elf_backend_data (abfd); 56 - @@ -618,7 +618,7 @@ elf_object_p (bfd *abfd) 57 - && ebd->elf_osabi != ELFOSABI_NONE) 58 - goto got_wrong_format_error; 59 - 60 - - if (i_ehdrp->e_shoff != 0) 61 - + if (i_ehdrp->e_shoff >= sizeof (x_ehdr)) 62 - { 63 - file_ptr where = (file_ptr) i_ehdrp->e_shoff; 64 - 65 - @@ -819,7 +819,7 @@ elf_object_p (bfd *abfd) 66 - } 67 - } 68 - 69 - - if (i_ehdrp->e_shstrndx != 0 && i_ehdrp->e_shoff != 0) 70 - + if (i_ehdrp->e_shstrndx != 0 && i_ehdrp->e_shoff >= sizeof (x_ehdr)) 71 - { 72 - unsigned int num_sec; 73 - 74 - -- 75 - 2.27.0 76 - 77 -
-73
pkgs/development/tools/misc/binutils/CVE-2021-3487.patch
··· 1 - From: Nick Clifton <nickc@redhat.com> 2 - Date: Thu, 26 Nov 2020 17:08:33 +0000 (+0000) 3 - Subject: Prevent a memory allocation failure when parsing corrupt DWARF debug sections. 4 - X-Git-Tag: binutils-2_36~485 5 - X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=647cebce12a6b0a26960220caff96ff38978cf24;hp=239ca5e497dda2c151009d664d500086a5c2173a 6 - 7 - Prevent a memory allocation failure when parsing corrupt DWARF debug sections. 8 - 9 - PR 26946 10 - * dwarf2.c (read_section): Check for debug sections with excessive 11 - sizes. 12 - --- 13 - 14 - diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c 15 - index 977bf43a6a1..8bbfc81d3e7 100644 16 - --- a/bfd/dwarf2.c 17 - +++ b/bfd/dwarf2.c 18 - @@ -531,22 +531,24 @@ read_section (bfd * abfd, 19 - bfd_byte ** section_buffer, 20 - bfd_size_type * section_size) 21 - { 22 - - asection *msec; 23 - const char *section_name = sec->uncompressed_name; 24 - bfd_byte *contents = *section_buffer; 25 - - bfd_size_type amt; 26 - 27 - /* The section may have already been read. */ 28 - if (contents == NULL) 29 - { 30 - + bfd_size_type amt; 31 - + asection *msec; 32 - + ufile_ptr filesize; 33 - + 34 - msec = bfd_get_section_by_name (abfd, section_name); 35 - - if (! msec) 36 - + if (msec == NULL) 37 - { 38 - section_name = sec->compressed_name; 39 - if (section_name != NULL) 40 - msec = bfd_get_section_by_name (abfd, section_name); 41 - } 42 - - if (! msec) 43 - + if (msec == NULL) 44 - { 45 - _bfd_error_handler (_("DWARF error: can't find %s section."), 46 - sec->uncompressed_name); 47 - @@ -554,12 +556,23 @@ read_section (bfd * abfd, 48 - return FALSE; 49 - } 50 - 51 - - *section_size = msec->rawsize ? msec->rawsize : msec->size; 52 - + amt = bfd_get_section_limit_octets (abfd, msec); 53 - + filesize = bfd_get_file_size (abfd); 54 - + if (amt >= filesize) 55 - + { 56 - + /* PR 26946 */ 57 - + _bfd_error_handler (_("DWARF error: section %s is larger than its filesize! (0x%lx vs 0x%lx)"), 58 - + section_name, (long) amt, (long) filesize); 59 - + bfd_set_error (bfd_error_bad_value); 60 - + return FALSE; 61 - + } 62 - + *section_size = amt; 63 - /* Paranoia - alloc one extra so that we can make sure a string 64 - section is NUL terminated. */ 65 - - amt = *section_size + 1; 66 - + amt += 1; 67 - if (amt == 0) 68 - { 69 - + /* Paranoia - this should never happen. */ 70 - bfd_set_error (bfd_error_no_memory); 71 - return FALSE; 72 - } 73 -
-239
pkgs/development/tools/misc/binutils/CVE-2021-45078.patch
··· 1 - based on upstream https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=161e87d12167b1e36193385485c1f6ce92f74f02;hp=d5c94731766bf4f276146fd29c1df8eebc2aaf69 2 - 3 - adapted by ris to apply to 2.35.2 (simply capitalizing booleans) 4 - 5 - diff --git a/binutils/stabs.c b/binutils/stabs.c 6 - index 274bfb0e7fa..83ee3ea5fa4 100644 7 - --- a/binutils/stabs.c 8 - +++ b/binutils/stabs.c 9 - @@ -202,7 +202,7 @@ static debug_type stab_find_type (void *, struct stab_handle *, const int *); 10 - static bool stab_record_type 11 - (void *, struct stab_handle *, const int *, debug_type); 12 - static debug_type stab_xcoff_builtin_type 13 - - (void *, struct stab_handle *, int); 14 - + (void *, struct stab_handle *, unsigned int); 15 - static debug_type stab_find_tagged_type 16 - (void *, struct stab_handle *, const char *, int, enum debug_type_kind); 17 - static debug_type *stab_demangle_argtypes 18 - @@ -3496,166 +3496,167 @@ stab_record_type (void *dhandle ATTRIBUTE_UNUSED, struct stab_handle *info, 19 - 20 - static debug_type 21 - stab_xcoff_builtin_type (void *dhandle, struct stab_handle *info, 22 - - int typenum) 23 - + unsigned int typenum) 24 - { 25 - debug_type rettype; 26 - const char *name; 27 - 28 - - if (typenum >= 0 || typenum < -XCOFF_TYPE_COUNT) 29 - + typenum = -typenum - 1; 30 - + if (typenum >= XCOFF_TYPE_COUNT) 31 - { 32 - - fprintf (stderr, _("Unrecognized XCOFF type %d\n"), typenum); 33 - + fprintf (stderr, _("Unrecognized XCOFF type %d\n"), -typenum - 1); 34 - return DEBUG_TYPE_NULL; 35 - } 36 - - if (info->xcoff_types[-typenum] != NULL) 37 - - return info->xcoff_types[-typenum]; 38 - + if (info->xcoff_types[typenum] != NULL) 39 - + return info->xcoff_types[typenum]; 40 - 41 - - switch (-typenum) 42 - + switch (typenum) 43 - { 44 - - case 1: 45 - + case 0: 46 - /* The size of this and all the other types are fixed, defined 47 - by the debugging format. */ 48 - name = "int"; 49 - rettype = debug_make_int_type (dhandle, 4, FALSE); 50 - break; 51 - - case 2: 52 - + case 1: 53 - name = "char"; 54 - rettype = debug_make_int_type (dhandle, 1, FALSE); 55 - break; 56 - - case 3: 57 - + case 2: 58 - name = "short"; 59 - rettype = debug_make_int_type (dhandle, 2, FALSE); 60 - break; 61 - - case 4: 62 - + case 3: 63 - name = "long"; 64 - rettype = debug_make_int_type (dhandle, 4, FALSE); 65 - break; 66 - - case 5: 67 - + case 4: 68 - name = "unsigned char"; 69 - rettype = debug_make_int_type (dhandle, 1, TRUE); 70 - break; 71 - - case 6: 72 - + case 5: 73 - name = "signed char"; 74 - rettype = debug_make_int_type (dhandle, 1, FALSE); 75 - break; 76 - - case 7: 77 - + case 6: 78 - name = "unsigned short"; 79 - rettype = debug_make_int_type (dhandle, 2, TRUE); 80 - break; 81 - - case 8: 82 - + case 7: 83 - name = "unsigned int"; 84 - rettype = debug_make_int_type (dhandle, 4, TRUE); 85 - break; 86 - - case 9: 87 - + case 8: 88 - name = "unsigned"; 89 - rettype = debug_make_int_type (dhandle, 4, TRUE); 90 - break; 91 - - case 10: 92 - + case 9: 93 - name = "unsigned long"; 94 - rettype = debug_make_int_type (dhandle, 4, TRUE); 95 - break; 96 - - case 11: 97 - + case 10: 98 - name = "void"; 99 - rettype = debug_make_void_type (dhandle); 100 - break; 101 - - case 12: 102 - + case 11: 103 - /* IEEE single precision (32 bit). */ 104 - name = "float"; 105 - rettype = debug_make_float_type (dhandle, 4); 106 - break; 107 - - case 13: 108 - + case 12: 109 - /* IEEE double precision (64 bit). */ 110 - name = "double"; 111 - rettype = debug_make_float_type (dhandle, 8); 112 - break; 113 - - case 14: 114 - + case 13: 115 - /* This is an IEEE double on the RS/6000, and different machines 116 - with different sizes for "long double" should use different 117 - negative type numbers. See stabs.texinfo. */ 118 - name = "long double"; 119 - rettype = debug_make_float_type (dhandle, 8); 120 - break; 121 - - case 15: 122 - + case 14: 123 - name = "integer"; 124 - rettype = debug_make_int_type (dhandle, 4, FALSE); 125 - break; 126 - - case 16: 127 - + case 15: 128 - name = "boolean"; 129 - rettype = debug_make_bool_type (dhandle, 4); 130 - break; 131 - - case 17: 132 - + case 16: 133 - name = "short real"; 134 - rettype = debug_make_float_type (dhandle, 4); 135 - break; 136 - - case 18: 137 - + case 17: 138 - name = "real"; 139 - rettype = debug_make_float_type (dhandle, 8); 140 - break; 141 - - case 19: 142 - + case 18: 143 - /* FIXME */ 144 - name = "stringptr"; 145 - rettype = NULL; 146 - break; 147 - - case 20: 148 - + case 19: 149 - /* FIXME */ 150 - name = "character"; 151 - rettype = debug_make_int_type (dhandle, 1, TRUE); 152 - break; 153 - - case 21: 154 - + case 20: 155 - name = "logical*1"; 156 - rettype = debug_make_bool_type (dhandle, 1); 157 - break; 158 - - case 22: 159 - + case 21: 160 - name = "logical*2"; 161 - rettype = debug_make_bool_type (dhandle, 2); 162 - break; 163 - - case 23: 164 - + case 22: 165 - name = "logical*4"; 166 - rettype = debug_make_bool_type (dhandle, 4); 167 - break; 168 - - case 24: 169 - + case 23: 170 - name = "logical"; 171 - rettype = debug_make_bool_type (dhandle, 4); 172 - break; 173 - - case 25: 174 - + case 24: 175 - /* Complex type consisting of two IEEE single precision values. */ 176 - name = "complex"; 177 - rettype = debug_make_complex_type (dhandle, 8); 178 - break; 179 - - case 26: 180 - + case 25: 181 - /* Complex type consisting of two IEEE double precision values. */ 182 - name = "double complex"; 183 - rettype = debug_make_complex_type (dhandle, 16); 184 - break; 185 - - case 27: 186 - + case 26: 187 - name = "integer*1"; 188 - rettype = debug_make_int_type (dhandle, 1, FALSE); 189 - break; 190 - - case 28: 191 - + case 27: 192 - name = "integer*2"; 193 - rettype = debug_make_int_type (dhandle, 2, FALSE); 194 - break; 195 - - case 29: 196 - + case 28: 197 - name = "integer*4"; 198 - rettype = debug_make_int_type (dhandle, 4, FALSE); 199 - break; 200 - - case 30: 201 - + case 29: 202 - /* FIXME */ 203 - name = "wchar"; 204 - rettype = debug_make_int_type (dhandle, 2, FALSE); 205 - break; 206 - - case 31: 207 - + case 30: 208 - name = "long long"; 209 - rettype = debug_make_int_type (dhandle, 8, FALSE); 210 - break; 211 - - case 32: 212 - + case 31: 213 - name = "unsigned long long"; 214 - rettype = debug_make_int_type (dhandle, 8, TRUE); 215 - break; 216 - - case 33: 217 - + case 32: 218 - name = "logical*8"; 219 - rettype = debug_make_bool_type (dhandle, 8); 220 - break; 221 - - case 34: 222 - + case 33: 223 - name = "integer*8"; 224 - rettype = debug_make_int_type (dhandle, 8, FALSE); 225 - break; 226 - @@ -3664,9 +3665,7 @@ stab_xcoff_builtin_type (void *dhandle, struct stab_handle *info, 227 - } 228 - 229 - rettype = debug_name_type (dhandle, name, rettype); 230 - - 231 - - info->xcoff_types[-typenum] = rettype; 232 - - 233 - + info->xcoff_types[typenum] = rettype; 234 - return rettype; 235 - } 236 - 237 - -- 238 - 2.27.0 239 -
-26
pkgs/development/tools/misc/binutils/bfd-elf-Dont-read-non-existing-secondary-relocs.patch
··· 1 - X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff_plain;f=bfd%2Felf.c;h=af62aadc3d446cd5b1f0201b207c90c22e7809b1;hp=36733e080dd9d9be28b576b246aaf5bd8c8569c7;hb=84fd26d8209e99fc3a432dd0b09b6c053de1ce65;hpb=abe2a28aaa7a2bfd0f3061c72a98eb898976b721 2 - 3 - diff --git a/bfd/elf.c b/bfd/elf.c 4 - index 36733e080dd..af62aadc3d4 100644 5 - --- a/bfd/elf.c 6 - +++ b/bfd/elf.c 7 - @@ -2454,6 +2454,8 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex) 8 - "for section %pA found - ignoring"), 9 - abfd, name, target_sect); 10 - } 11 - + else 12 - + esdt->has_secondary_relocs = TRUE; 13 - goto success; 14 - } 15 - 16 - @@ -12587,6 +12589,9 @@ _bfd_elf_slurp_secondary_reloc_section (bfd * abfd, 17 - #endif 18 - r_sym = elf32_r_sym; 19 - 20 - + if (!elf_section_data (sec)->has_secondary_relocs) 21 - + return TRUE; 22 - + 23 - /* Discover if there are any secondary reloc sections 24 - associated with SEC. */ 25 - for (relsec = abfd->sections; relsec != NULL; relsec = relsec->next) 26 -
+29 -38
pkgs/development/tools/misc/binutils/build-components-separately.patch
··· 1 1 diff --git a/bfd/configure.ac b/bfd/configure.ac 2 - index c5bfbd5d..45ad4c26 100644 2 + index fec067b2135..377e1f5443f 100644 3 3 --- a/bfd/configure.ac 4 4 +++ b/bfd/configure.ac 5 - @@ -278,31 +278,19 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, 5 + @@ -292,30 +292,16 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, 6 6 7 7 LT_LIB_M 8 8 ··· 21 21 - if test -n "$x"; then 22 22 - SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" 23 23 - fi 24 + -fi 24 25 - 26 + SHARED_LIBADD="$SHARED_LIBADD $LIBINTL" 27 + 28 + -if test "$enable_shared" = "yes"; then 25 29 case "${host}" in 26 30 # More hacks to build DLLs on Windows. 27 31 *-*-cygwin*) 28 32 SHARED_LDFLAGS="-no-undefined" 29 - - SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" 30 - + SHARED_LIBADD="-liberty -lintl -lcygwin -lkernel32" 31 - ;; 32 - 33 - # Use built-in libintl on macOS, since it is not provided by libc. 34 - *-*-darwin*) 35 - - SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl" 36 - + SHARED_LIBADD="-liberty -lintl" 33 + - SHARED_LIBADD="-L`pwd`/../libiberty -liberty $SHARED_LIBADD -lcygwin -lkernel32" 34 + + SHARED_LIBADD="-liberty $SHARED_LIBADD -lcygwin -lkernel32" 37 35 ;; 38 36 esac 39 37 40 38 diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am 41 - index 4f06074a..6836c589 100644 39 + index 0e04b4c05c4..848a02662e7 100644 42 40 --- a/opcodes/Makefile.am 43 41 +++ b/opcodes/Makefile.am 44 42 @@ -51,7 +51,7 @@ libopcodes_la_LDFLAGS += -rpath $(rpath_bfdlibdir) ··· 50 48 51 49 BUILD_LIBS = @BUILD_LIBS@ 52 50 BUILD_LIB_DEPS = @BUILD_LIB_DEPS@ 53 - @@ -301,7 +301,7 @@ OFILES = @BFD_MACHINES@ 51 + @@ -303,7 +303,7 @@ OFILES = @BFD_MACHINES@ 54 52 # development.sh is used to determine -Werror default. 55 53 CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh 56 54 ··· 59 57 60 58 disassemble.lo: disassemble.c 61 59 if am__fastdepCC 62 - @@ -322,12 +322,21 @@ libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c 63 - # old version of libbfd, or to pick up libbfd for the wrong architecture 64 - # if host != build. So for building with shared libraries we use a 65 - # hardcoded path to libbfd.so instead of relying on the entries in libbfd.la. 60 + @@ -327,9 +327,18 @@ libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c 66 61 -libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@ 67 62 +libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@ libtool-soversion 68 63 libopcodes_la_LIBADD = $(OFILES) @SHARED_LIBADD@ ··· 84 79 # the build directory so that we don't have to convert all the 85 80 # programs that use libopcodes.a simultaneously. This is a hack which 86 81 diff --git a/opcodes/configure.ac b/opcodes/configure.ac 87 - index 00be9c88..6e589ae4 100644 82 + index e564f067334..5da62a3d58b 100644 88 83 --- a/opcodes/configure.ac 89 84 +++ b/opcodes/configure.ac 90 - @@ -86,6 +86,7 @@ AC_PROG_INSTALL 85 + @@ -98,6 +98,8 @@ BFD_64_BIT 86 + AC_SUBST(HDEFINES) 87 + AC_PROG_INSTALL 91 88 92 - AC_CHECK_HEADERS(string.h strings.h stdlib.h limits.h) 93 - ACX_HEADER_STRING 94 89 +GCC_HEADER_STDINT(bfd_stdint.h) 95 - 90 + + 96 91 AC_CHECK_DECLS([basename, stpcpy]) 97 92 98 - @@ -137,61 +138,27 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, 93 + # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do 94 + @@ -148,44 +150,21 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, 99 95 100 96 LT_LIB_M 101 97 ··· 122 118 -SHARED_LIBADD= 123 119 +SHARED_LIBADD=-liberty 124 120 SHARED_DEPENDENCIES= 125 - if test "$enable_shared" = "yes"; then 121 + -if test "$enable_shared" = "yes"; then 126 122 -# When building a shared libopcodes, link against the pic version of libiberty 127 123 -# so that apps that use libopcodes won't need libiberty just to satisfy any 128 124 -# libopcodes references. ··· 131 127 # Note that linking against libbfd as we do here, which is itself linked 132 128 # against libiberty, may not satisfy all the libopcodes libiberty references 133 129 # since libbfd may not pull in the entirety of libiberty. 130 + # Also, jam libintl into the right place in all of this: after libiberty, 131 + # which uses it, but before -lcygwin, which it uses. 134 132 -changequote(,)dnl 135 133 - x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` 136 134 -changequote([,])dnl 137 135 - if test -n "$x"; then 138 136 - SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" 139 137 - fi 140 - - 138 + -fi 139 + 140 + SHARED_LIBADD="$SHARED_LIBADD $LIBINTL" 141 + 142 + @@ -193,11 +172,10 @@ if test "$enable_shared" = "yes"; then 141 143 case "${host}" in 142 144 *-*-cygwin*) 143 145 SHARED_LDFLAGS="-no-undefined" 144 - - SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin" 145 - + SHARED_LIBADD="-lbfd -liberty -lintl -lcygwin" 146 + - SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty $SHARED_LIBADD" 147 + + SHARED_LIBADD="-lbfd -liberty $SHARED_LIBADD" 146 148 ;; 147 - - *-*-darwin*) 148 - - SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib ${SHARED_LIBADD}" 149 - - SHARED_DEPENDENCIES="../bfd/libbfd.la" 150 - - ;; 151 149 *) 152 - - case "$host_vendor" in 153 - - hp) 154 - - SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl ${SHARED_LIBADD}" 155 - - ;; 156 - - *) 157 - - SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so ${SHARED_LIBADD}" 158 - - ;; 159 - - esac 150 + - SHARED_LIBADD="../bfd/libbfd.la ${SHARED_LIBADD}" 160 151 - SHARED_DEPENDENCIES="../bfd/libbfd.la" 161 152 + SHARED_LIBADD="-lbfd ${SHARED_LIBADD}" 162 153 ;;
+106 -96
pkgs/development/tools/misc/binutils/default.nix
··· 2 2 execFormatIsELF = platform: platform.parsed.kernel.execFormat.name == "elf"; 3 3 in 4 4 5 - { stdenv, lib, buildPackages 6 - , fetchFromGitHub, fetchurl, zlib, autoreconfHook, gettext 7 - # Enabling all targets increases output size to a multiple. 8 - , withAllTargets ? false, libbfd, libopcodes 9 - , enableShared ? !stdenv.hostPlatform.isStatic 10 - , noSysDirs 11 - , gold ? execFormatIsELF stdenv.targetPlatform 12 - , bison ? null 5 + { stdenv 6 + , autoreconfHook 7 + , autoconf269, automake, libtool 8 + , bison 9 + , buildPackages 10 + , fetchFromGitHub 11 + , fetchurl 13 12 , flex 13 + , gettext 14 + , lib 15 + , noSysDirs 16 + , perl 14 17 , texinfo 15 - , perl 18 + , zlib 19 + 20 + , enableGold ? execFormatIsELF stdenv.targetPlatform 21 + , enableShared ? !stdenv.hostPlatform.isStatic 22 + # WARN: Enabling all targets increases output size to a multiple. 23 + , withAllTargets ? false, libbfd, libopcodes 16 24 }: 17 25 18 - # configure silently disables ld.gold if it's unsupported, 19 - # so we need to make sure that intent matches result ourselves. 20 - assert gold -> execFormatIsELF stdenv.targetPlatform; 26 + # WARN: configure silently disables ld.gold if it's unsupported, so we need to 27 + # make sure that intent matches result ourselves. 28 + assert enableGold -> execFormatIsELF stdenv.targetPlatform; 21 29 22 - # Note: this package is used for bootstrapping fetchurl, and thus 23 - # cannot use fetchpatch! All mutable patches (generated by GitHub or 24 - # cgit) that are needed here should be included directly in Nixpkgs as 25 - # files. 26 30 27 31 let 28 - reuseLibs = enableShared && withAllTargets; 32 + inherit (stdenv) buildPlatform hostPlatform targetPlatform; 33 + 34 + version = "2.38"; 29 35 30 - version = "2.35.2"; 31 - basename = "binutils"; 32 - # The targetPrefix prepended to binary names to allow multiple binuntils on the 33 - # PATH to both be usable. 34 - targetPrefix = lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) 35 - "${stdenv.targetPlatform.config}-"; 36 - vc4-binutils-src = fetchFromGitHub { 37 - owner = "itszor"; 38 - repo = "binutils-vc4"; 39 - rev = "708acc851880dbeda1dd18aca4fd0a95b2573b36"; 40 - sha256 = "1kdrz6fki55lm15rwwamn74fnqpy0zlafsida2zymk76n3656c63"; 36 + srcs = { 37 + normal = fetchurl { 38 + url = "mirror://gnu/binutils/binutils-${version}.tar.bz2"; 39 + sha256 = "sha256-Bw7HHPB3pqWOC5WfBaCaNQFTeMLYpR6Q866r/jBZDvg="; 40 + }; 41 + vc4-none = fetchFromGitHub { 42 + owner = "itszor"; 43 + repo = "binutils-vc4"; 44 + rev = "708acc851880dbeda1dd18aca4fd0a95b2573b36"; 45 + sha256 = "1kdrz6fki55lm15rwwamn74fnqpy0zlafsida2zymk76n3656c63"; 46 + }; 41 47 }; 42 - # HACK to ensure that we preserve source from bootstrap binutils to not rebuild LLVM 43 - normal-src = stdenv.__bootPackages.binutils-unwrapped.src or (fetchurl { 44 - url = "mirror://gnu/binutils/${basename}-${version}.tar.bz2"; 45 - sha256 = "sha256-z6dkTb7PRZHhNutAfBwdoWV4vSsD8MLorNzroZS7nWE="; 46 - }); 48 + 49 + #INFO: The targetPrefix prepended to binary names to allow multiple binuntils 50 + # on the PATH to both be usable. 51 + targetPrefix = lib.optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-"; 47 52 in 48 53 49 54 stdenv.mkDerivation { 50 - pname = targetPrefix + basename; 55 + pname = targetPrefix + "binutils"; 51 56 inherit version; 52 57 53 - src = if stdenv.targetPlatform.isVc4 then vc4-binutils-src else normal-src; 58 + # HACK: Ensure that we preserve source from bootstrap binutils to not rebuild LLVM 59 + src = stdenv.__bootPackages.binutils-unwrapped.src 60 + or srcs.${targetPlatform.system} 61 + or srcs.normal; 54 62 63 + # WARN: this package is used for bootstrapping fetchurl, and thus cannot use 64 + # fetchpatch! All mutable patches (generated by GitHub or cgit) that are 65 + # needed here should be included directly in Nixpkgs as files. 55 66 patches = [ 56 67 # Make binutils output deterministic by default. 57 68 ./deterministic.patch 58 69 59 - # Help bfd choose between elf32-littlearm, elf32-littlearm-symbian, and 60 - # elf32-littlearm-vxworks in favor of the first. 61 - # https://github.com/NixOS/nixpkgs/pull/30484#issuecomment-345472766 62 - ./disambiguate-arm-targets.patch 70 + 71 + # Breaks nm BSD flag detection 72 + ./0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch 73 + 74 + # Required for newer macos versions 75 + ./0001-libtool.m4-update-macos-version-detection-block.patch 63 76 64 77 # For some reason bfd ld doesn't search DT_RPATH when cross-compiling. It's 65 78 # not clear why this behavior was decided upon but it has the unfortunate ··· 68 81 # override this behavior, forcing ld to search DT_RPATH even when 69 82 # cross-compiling. 70 83 ./always-search-rpath.patch 71 - 72 - # Fix quadratic slowdown in `strip` performance. 73 - # See #129467 and https://sourceware.org/bugzilla/show_bug.cgi?id=28058 74 - # Remove when we're on binutils > 2.36.1. 75 - # The patch is downloaded from 76 - # https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff_plain;f=bfd/elf.c;h=af62aadc3d446cd5b1f0201b207c90c22e7809b1;hp=36733e080dd9d9be28b576b246aaf5bd8c8569c7;hb=84fd26d8209e99fc3a432dd0b09b6c053de1ce65;hpb=abe2a28aaa7a2bfd0f3061c72a98eb898976b721 77 - # which is the 2.36 backport (using `TRUE` instead of `true` of binutils master commit: 78 - # https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=956ea65cd707707c0f725930214cbc781367a831 79 - ./bfd-elf-Dont-read-non-existing-secondary-relocs.patch 80 - 81 - # Fix building plv8’s v8. 82 - # https://github.com/NixOS/nixpkgs/issues/134190 83 - # Obtained from: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=586e30940e640f67bd55bd72e1d1355a4faf8079 84 - ./gold-Update-GNU_PROPERTY_X86_XXX-macros.patch 85 - 86 - ./CVE-2020-35448.patch 87 - ./CVE-2021-3487.patch 88 - ./CVE-2021-45078.patch 89 - ] ++ lib.optional stdenv.targetPlatform.isiOS ./support-ios.patch 90 - ++ # This patch was suggested by Nick Clifton to fix 91 - # https://sourceware.org/bugzilla/show_bug.cgi?id=16177 92 - # It can be removed when that 7-year-old bug is closed. 93 - # This binutils bug causes GHC to emit broken binaries on armv7, and 94 - # indeed GHC will refuse to compile with a binutils suffering from it. See 95 - # this comment for more information: 96 - # https://gitlab.haskell.org/ghc/ghc/issues/4210#note_78333 97 - lib.optional (stdenv.targetPlatform.isAarch32 && stdenv.hostPlatform.system != stdenv.targetPlatform.system) ./R_ARM_COPY.patch 98 - ++ lib.optional stdenv.targetPlatform.isWindows ./windres-locate-gcc.patch; 84 + ] 85 + ++ lib.optional targetPlatform.isiOS ./support-ios.patch 86 + # This patch was suggested by Nick Clifton to fix 87 + # https://sourceware.org/bugzilla/show_bug.cgi?id=16177 88 + # It can be removed when that 7-year-old bug is closed. 89 + # This binutils bug causes GHC to emit broken binaries on armv7, and indeed 90 + # GHC will refuse to compile with a binutils suffering from it. See this 91 + # comment for more information: 92 + # https://gitlab.haskell.org/ghc/ghc/issues/4210#note_78333 93 + ++ lib.optional (targetPlatform.isAarch32 && hostPlatform.system != targetPlatform.system) ./R_ARM_COPY.patch 94 + ++ lib.optional targetPlatform.isWindows ./windres-locate-gcc.patch; 99 95 100 96 outputs = [ "out" "info" "man" ]; 101 97 ··· 104 100 bison 105 101 perl 106 102 texinfo 107 - ] ++ (lib.optionals stdenv.targetPlatform.isiOS [ 108 - autoreconfHook 109 - ]) ++ lib.optionals stdenv.targetPlatform.isVc4 [ flex ]; 103 + ] 104 + ++ lib.optionals targetPlatform.isiOS [ autoreconfHook ] 105 + ++ lib.optionals targetPlatform.isDarwin [ autoconf269 automake gettext libtool ] 106 + ++ lib.optionals targetPlatform.isVc4 [ flex ] 107 + ; 108 + 110 109 buildInputs = [ zlib gettext ]; 111 110 112 111 inherit noSysDirs; 113 112 114 - preConfigure = '' 113 + preConfigure = (lib.optionalString targetPlatform.isDarwin '' 114 + for i in */configure.ac; do 115 + pushd "$(dirname "$i")" 116 + echo "Running autoreconf in $PWD" 117 + # autoreconf doesn't work, don't know why 118 + # autoreconf ''${autoreconfFlags:---install --force --verbose} 119 + autoconf 120 + popd 121 + done 122 + '') + '' 115 123 # Clear the default library search path. 116 124 if test "$noSysDirs" = "1"; then 117 125 echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt ··· 126 134 127 135 # As binutils takes part in the stdenv building, we don't want references 128 136 # to the bootstrap-tools libgcc (as uses to happen on arm/mips) 129 - NIX_CFLAGS_COMPILE = if stdenv.hostPlatform.isDarwin 137 + NIX_CFLAGS_COMPILE = 138 + if hostPlatform.isDarwin 130 139 then "-Wno-string-plus-int -Wno-deprecated-declarations" 131 140 else "-static-libgcc"; 132 141 ··· 134 143 135 144 configurePlatforms = [ "build" "host" "target" ]; 136 145 137 - configureFlags = 138 - (if enableShared then [ "--enable-shared" "--disable-static" ] 139 - else [ "--disable-shared" "--enable-static" ]) 140 - ++ lib.optional withAllTargets "--enable-targets=all" 141 - ++ [ 146 + configureFlags = [ 142 147 "--enable-64-bit-bfd" 143 148 "--with-system-zlib" 144 149 ··· 151 156 # RUNPATH can be overriden using LD_LIBRARY_PATH at runtime. 152 157 "--enable-new-dtags" 153 158 154 - # force target prefix. Some versions of binutils will make it empty 155 - # if `--host` and `--target` are too close, even if Nixpkgs thinks 156 - # the platforms are different (e.g. because not all the info makes 157 - # the `config`). Other versions of binutils will always prefix if 158 - # `--target` is passed, even if `--host` and `--target` are the same. 159 - # The easiest thing for us to do is not leave it to chance, and force 160 - # the program prefix to be what we want it to be. 159 + # force target prefix. Some versions of binutils will make it empty if 160 + # `--host` and `--target` are too close, even if Nixpkgs thinks the 161 + # platforms are different (e.g. because not all the info makes the 162 + # `config`). Other versions of binutils will always prefix if `--target` is 163 + # passed, even if `--host` and `--target` are the same. The easiest thing 164 + # for us to do is not leave it to chance, and force the program prefix to be 165 + # what we want it to be. 161 166 "--program-prefix=${targetPrefix}" 162 - ] ++ lib.optionals gold [ 163 - "--enable-gold" 164 - "--enable-plugins" 165 - ]; 167 + ] 168 + ++ lib.optionals withAllTargets [ "--enable-targets=all" ] 169 + ++ lib.optionals enableGold [ "--enable-gold" "--enable-plugins" ] 170 + ++ (if enableShared 171 + then [ "--enable-shared" "--disable-static" ] 172 + else [ "--disable-shared" "--enable-static" ]) 173 + ; 166 174 167 - doCheck = false; # fails 175 + # Fails 176 + doCheck = false; 168 177 169 - postFixup = lib.optionalString reuseLibs '' 178 + postFixup = lib.optionalString (enableShared && withAllTargets) '' 170 179 rm "$out"/lib/lib{bfd,opcodes}-${version}.so 171 180 ln -s '${lib.getLib libbfd}/lib/libbfd-${version}.so' "$out/lib/" 172 181 ln -s '${lib.getLib libopcodes}/lib/libopcodes-${version}.so' "$out/lib/" 173 182 ''; 174 183 175 - # else fails with "./sanity.sh: line 36: $out/bin/size: not found" 176 - doInstallCheck = stdenv.buildPlatform == stdenv.hostPlatform && stdenv.hostPlatform == stdenv.targetPlatform; 184 + # INFO: Otherwise it fails with: 185 + # `./sanity.sh: line 36: $out/bin/size: not found` 186 + doInstallCheck = (buildPlatform == hostPlatform) && (hostPlatform == targetPlatform); 177 187 178 188 enableParallelBuilding = true; 179 189 180 190 passthru = { 181 191 inherit targetPrefix; 182 - hasGold = gold; 192 + hasGold = enableGold; 183 193 isGNU = true; 184 194 }; 185 195 ··· 193 203 ''; 194 204 homepage = "https://www.gnu.org/software/binutils/"; 195 205 license = licenses.gpl3Plus; 196 - maintainers = with maintainers; [ ericson2314 ]; 206 + maintainers = with maintainers; [ ericson2314 lovesegfault ]; 197 207 platforms = platforms.unix; 198 208 199 - /* Give binutils a lower priority than gcc-wrapper to prevent a 200 - collision due to the ld/as wrappers/symlinks in the latter. */ 209 + # INFO: Give binutils a lower priority than gcc-wrapper to prevent a 210 + # collision due to the ld/as wrappers/symlinks in the latter. 201 211 priority = 10; 202 212 }; 203 213 }
-23
pkgs/development/tools/misc/binutils/disambiguate-arm-targets.patch
··· 1 - diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c 2 - index 9f956d3..f5b61f1 100644 3 - --- a/bfd/elf32-arm.c 4 - +++ b/bfd/elf32-arm.c 5 - @@ -19585,7 +19585,10 @@ elf32_arm_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker) 6 - #undef ELF_MAXPAGESIZE 7 - #define ELF_MAXPAGESIZE 0x1000 8 - 9 - +/* Prioritize elf32-*arm (priority 1) over elf32-*arm-vxworks (priority 2) */ 10 - +#define elf_match_priority 2 11 - #include "elf32-target.h" 12 - +#undef elf_match_priority 13 - 14 - 15 - /* Merge backend specific data from an object file to the output 16 - @@ -19974,4 +19977,7 @@ elf32_arm_symbian_plt_sym_val (bfd_vma i, const asection *plt, 17 - #undef ELF_MAXPAGESIZE 18 - #define ELF_MAXPAGESIZE 0x8000 19 - 20 - +/* Prioritize elf32-*arm (priority 1) over elf32-*arm-symbian (priority 2) */ 21 - +#define elf_match_priority 2 22 - #include "elf32-target.h" 23 - +#undef elf_match_priority
-292
pkgs/development/tools/misc/binutils/gold-Update-GNU_PROPERTY_X86_XXX-macros.patch
··· 1 - From 586e30940e640f67bd55bd72e1d1355a4faf8079 Mon Sep 17 00:00:00 2001 2 - From: "H.J. Lu" <hjl.tools@gmail.com> 3 - Date: Tue, 13 Oct 2020 05:20:49 -0700 4 - Subject: [PATCH] gold: Update GNU_PROPERTY_X86_XXX macros 5 - 6 - This patch updates GNU_PROPERTY_X86_XXX macros for gold: 7 - 8 - 1. GNU_PROPERTY_X86_UINT32_AND_XXX: A 4-byte unsigned integer property. 9 - A bit is set if it is set in all relocatable inputs: 10 - 11 - #define GNU_PROPERTY_X86_UINT32_AND_LO 0xc0000002 12 - #define GNU_PROPERTY_X86_UINT32_AND_HI 0xc0007fff 13 - 14 - 2. GNU_PROPERTY_X86_UINT32_OR_XXX: A 4-byte unsigned integer property. 15 - A bit is set if it is set in any relocatable inputs: 16 - 17 - #define GNU_PROPERTY_X86_UINT32_OR_LO 0xc0008000 18 - #define GNU_PROPERTY_X86_UINT32_OR_HI 0xc000ffff 19 - 20 - 3. GNU_PROPERTY_X86_UINT32_OR_AND_XXX: A 4-byte unsigned integer property. 21 - A bit is set if it is set in any relocatable inputs and the property is 22 - present in all relocatable inputs: 23 - 24 - #define GNU_PROPERTY_X86_UINT32_OR_AND_LO 0xc0010000 25 - #define GNU_PROPERTY_X86_UINT32_OR_AND_HI 0xc0017fff 26 - 27 - 4. GNU_PROPERTY_X86_FEATURE_2_NEEDED, GNU_PROPERTY_X86_FEATURE_2_USED 28 - and GNU_PROPERTY_X86_FEATURE_2_XXX bits. 29 - 30 - GNU_PROPERTY_X86_FEATURE_1_AND is unchanged. GNU_PROPERTY_X86_ISA_1_USED 31 - and GNU_PROPERTY_X86_ISA_1_NEEDED are updated to better support targeted 32 - processors since GNU_PROPERTY_X86_ISA_1_?86 aren't isn't very useful. 33 - A new set of GNU_PROPERTY_X86_ISA_1_XXX bits are defined. The previous 34 - GNU_PROPERTY_X86_ISA_1_XXX macros are deprecated and renamed to 35 - GNU_PROPERTY_X86_COMPAT_ISA_1_XXX and GNU_PROPERTY_X86_COMPAT_2_ISA_1_XXX. 36 - 37 - elfcpp/ 38 - 39 - * elfcpp.h (GNU_PROPERTY_X86_ISA_1_USED): Renamed to ... 40 - (GNU_PROPERTY_X86_COMPAT_ISA_1_USED): This. 41 - (GNU_PROPERTY_X86_ISA_1_NEEDED): Renamed to ... 42 - (GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED): This. 43 - (GNU_PROPERTY_X86_UINT32_AND_LO): New. 44 - (GNU_PROPERTY_X86_UINT32_AND_HI): Likewise. 45 - (GNU_PROPERTY_X86_UINT32_OR_LO): Likewise. 46 - (GNU_PROPERTY_X86_UINT32_OR_HI): Likewise. 47 - (GNU_PROPERTY_X86_UINT32_OR_AND_LO): Likewise. 48 - (GNU_PROPERTY_X86_UINT32_OR_AND_HI): Likewise. 49 - (GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED): New. 50 - (GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED): Likewise. 51 - (GNU_PROPERTY_X86_FEATURE_1_AND): Updated to 52 - (GNU_PROPERTY_X86_UINT32_AND_LO + 0). 53 - (GNU_PROPERTY_X86_ISA_1_NEEDED): New. Defined to 54 - GNU_PROPERTY_X86_UINT32_OR_LO + 2. 55 - (GNU_PROPERTY_X86_FEATURE_2_NEEDED): New. Defined to 56 - (GNU_PROPERTY_X86_UINT32_OR_LO + 1). 57 - (GNU_PROPERTY_X86_ISA_1_USED): New. Defined to 58 - GNU_PROPERTY_X86_UINT32_OR_AND_LO + 2. 59 - (GNU_PROPERTY_X86_FEATURE_2_USED): New. Defined to 60 - (GNU_PROPERTY_X86_UINT32_OR_AND_LO + 1). 61 - 62 - gold/ 63 - 64 - * x86_64.cc (Target_x86_64::Target_x86_64): Initialize 65 - feature_2_used_, feature_2_needed_ and object_feature_2_used_. 66 - (Target_x86_64::feature_2_used_): New data member. 67 - (Target_x86_64::feature_2_needed_): Likewise. 68 - (Target_x86_64::object_isa_1_used_): Likewise. 69 - (Target_x86_64::record_gnu_property): Support 70 - GNU_PROPERTY_X86_COMPAT_ISA_1_USED, 71 - GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED, 72 - GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED, 73 - GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED, 74 - GNU_PROPERTY_X86_FEATURE_2_USED and 75 - GNU_PROPERTY_X86_FEATURE_2_NEEDED. 76 - (Target_x86_64::merge_gnu_properties): Merge FEATURE_2_USED bits. 77 - Initialize object_feature_2_used_. 78 - (Target_x86_64::do_finalize_gnu_properties): Support 79 - GNU_PROPERTY_X86_FEATURE_2_USED and 80 - GNU_PROPERTY_X86_FEATURE_2_NEEDED. 81 - * testsuite/gnu_property_a.S (GNU_PROPERTY_X86_ISA_1_USED): Set 82 - to 0xc0010002. 83 - (GNU_PROPERTY_X86_ISA_1_NEEDED): Set to 0xc0008002. 84 - * testsuite/gnu_property_b.S (GNU_PROPERTY_X86_ISA_1_USED): Set 85 - to 0xc0010002. 86 - (GNU_PROPERTY_X86_ISA_1_NEEDED): Set to 0xc0008002. 87 - * testsuite/gnu_property_c.S (GNU_PROPERTY_X86_ISA_1_USED): Set 88 - to 0xc0010002. 89 - (GNU_PROPERTY_X86_ISA_1_NEEDED): Set to 0xc0008002. 90 - * testsuite/gnu_property_test.sh: Updated. 91 - --- 92 - elfcpp/ChangeLog | [omitted] 93 - elfcpp/elfcpp.h | 18 ++++++++++++--- 94 - gold/ChangeLog | [omitted] 95 - gold/testsuite/gnu_property_a.S | 4 ++-- 96 - gold/testsuite/gnu_property_b.S | 4 ++-- 97 - gold/testsuite/gnu_property_c.S | 4 ++-- 98 - gold/testsuite/gnu_property_test.sh | 4 ++-- 99 - gold/x86_64.cc | 34 +++++++++++++++++++++++++++-- 100 - 8 files changed, 110 insertions(+), 13 deletions(-) 101 - 102 - diff --git a/elfcpp/elfcpp.h b/elfcpp/elfcpp.h 103 - index 65d803c00e2..4b6ff94a654 100644 104 - --- a/elfcpp/elfcpp.h 105 - +++ b/elfcpp/elfcpp.h 106 - @@ -1013,9 +1013,21 @@ enum 107 - GNU_PROPERTY_STACK_SIZE = 1, 108 - GNU_PROPERTY_NO_COPY_ON_PROTECTED = 2, 109 - GNU_PROPERTY_LOPROC = 0xc0000000, 110 - - GNU_PROPERTY_X86_ISA_1_USED = 0xc0000000, 111 - - GNU_PROPERTY_X86_ISA_1_NEEDED = 0xc0000001, 112 - - GNU_PROPERTY_X86_FEATURE_1_AND = 0xc0000002, 113 - + GNU_PROPERTY_X86_COMPAT_ISA_1_USED = 0xc0000000, 114 - + GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED = 0xc0000001, 115 - + GNU_PROPERTY_X86_UINT32_AND_LO = 0xc0000002, 116 - + GNU_PROPERTY_X86_UINT32_AND_HI = 0xc0007fff, 117 - + GNU_PROPERTY_X86_UINT32_OR_LO = 0xc0008000, 118 - + GNU_PROPERTY_X86_UINT32_OR_HI = 0xc000ffff, 119 - + GNU_PROPERTY_X86_UINT32_OR_AND_LO = 0xc0010000, 120 - + GNU_PROPERTY_X86_UINT32_OR_AND_HI = 0xc0017fff, 121 - + GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED = GNU_PROPERTY_X86_UINT32_OR_LO + 0, 122 - + GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED = GNU_PROPERTY_X86_UINT32_OR_AND_LO + 0, 123 - + GNU_PROPERTY_X86_FEATURE_1_AND = GNU_PROPERTY_X86_UINT32_AND_LO + 0, 124 - + GNU_PROPERTY_X86_ISA_1_NEEDED = GNU_PROPERTY_X86_UINT32_OR_LO + 2, 125 - + GNU_PROPERTY_X86_FEATURE_2_NEEDED = GNU_PROPERTY_X86_UINT32_OR_LO + 1, 126 - + GNU_PROPERTY_X86_ISA_1_USED = GNU_PROPERTY_X86_UINT32_OR_AND_LO + 2, 127 - + GNU_PROPERTY_X86_FEATURE_2_USED = GNU_PROPERTY_X86_UINT32_OR_AND_LO + 1, 128 - GNU_PROPERTY_HIPROC = 0xdfffffff, 129 - GNU_PROPERTY_LOUSER = 0xe0000000, 130 - GNU_PROPERTY_HIUSER = 0xffffffff 131 - diff --git a/gold/testsuite/gnu_property_a.S b/gold/testsuite/gnu_property_a.S 132 - index 463bc8e52fe..5fbbbc9c4bb 100644 133 - --- a/gold/testsuite/gnu_property_a.S 134 - +++ b/gold/testsuite/gnu_property_a.S 135 - @@ -1,8 +1,8 @@ 136 - #define NT_GNU_PROPERTY_TYPE_0 5 137 - 138 - #define GNU_PROPERTY_STACK_SIZE 1 139 - -#define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000 140 - -#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001 141 - +#define GNU_PROPERTY_X86_ISA_1_USED 0xc0010002 142 - +#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0008002 143 - #define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002 144 - 145 - #if __SIZEOF_PTRDIFF_T__ == 8 146 - diff --git a/gold/testsuite/gnu_property_b.S b/gold/testsuite/gnu_property_b.S 147 - index 0c0c038ead1..7028f73d7ab 100644 148 - --- a/gold/testsuite/gnu_property_b.S 149 - +++ b/gold/testsuite/gnu_property_b.S 150 - @@ -2,8 +2,8 @@ 151 - 152 - #define GNU_PROPERTY_STACK_SIZE 1 153 - #define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2 154 - -#define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000 155 - -#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001 156 - +#define GNU_PROPERTY_X86_ISA_1_USED 0xc0010002 157 - +#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0008002 158 - #define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002 159 - 160 - #if __SIZEOF_PTRDIFF_T__ == 8 161 - diff --git a/gold/testsuite/gnu_property_c.S b/gold/testsuite/gnu_property_c.S 162 - index ace159a9a9d..c8cbd8bce28 100644 163 - --- a/gold/testsuite/gnu_property_c.S 164 - +++ b/gold/testsuite/gnu_property_c.S 165 - @@ -2,8 +2,8 @@ 166 - 167 - #define GNU_PROPERTY_STACK_SIZE 1 168 - #define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2 169 - -#define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000 170 - -#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001 171 - +#define GNU_PROPERTY_X86_ISA_1_USED 0xc0010002 172 - +#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0008002 173 - #define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002 174 - 175 - #if __SIZEOF_PTRDIFF_T__ == 8 176 - diff --git a/gold/testsuite/gnu_property_test.sh b/gold/testsuite/gnu_property_test.sh 177 - index 1806d3474cc..a4096005b78 100755 178 - --- a/gold/testsuite/gnu_property_test.sh 179 - +++ b/gold/testsuite/gnu_property_test.sh 180 - @@ -77,8 +77,8 @@ check_count gnu_property_test.stdout "^ NOTE" 2 181 - 182 - check gnu_property_test.stdout "stack size: 0x111100" 183 - check gnu_property_test.stdout "no copy on protected" 184 - -check gnu_property_test.stdout "x86 ISA used: i486, SSE2, SSE4_2, AVX512CD" 185 - -check gnu_property_test.stdout "x86 ISA needed: i486, SSE2, SSE4_2, AVX512CD" 186 - +check gnu_property_test.stdout "x86 ISA used: x86-64-v2, <unknown: 10>, <unknown: 100>, <unknown: 1000>" 187 - +check gnu_property_test.stdout "x86 ISA needed: x86-64-v2, <unknown: 10>, <unknown: 100>, <unknown: 1000>" 188 - check gnu_property_test.stdout "x86 feature: IBT" 189 - 190 - exit 0 191 - diff --git a/gold/x86_64.cc b/gold/x86_64.cc 192 - index 9cb2cf0a322..378bac16f78 100644 193 - --- a/gold/x86_64.cc 194 - +++ b/gold/x86_64.cc 195 - @@ -706,8 +706,9 @@ class Target_x86_64 : public Sized_target<size, false> 196 - rela_irelative_(NULL), copy_relocs_(elfcpp::R_X86_64_COPY), 197 - got_mod_index_offset_(-1U), tlsdesc_reloc_info_(), 198 - tls_base_symbol_defined_(false), isa_1_used_(0), isa_1_needed_(0), 199 - - feature_1_(0), object_isa_1_used_(0), object_feature_1_(0), 200 - - seen_first_object_(false) 201 - + feature_1_(0), feature_2_used_(0), feature_2_needed_(0), 202 - + object_isa_1_used_(0), object_feature_1_(0), 203 - + object_feature_2_used_(0), seen_first_object_(false) 204 - { } 205 - 206 - // Hook for a new output section. 207 - @@ -1382,6 +1383,8 @@ class Target_x86_64 : public Sized_target<size, false> 208 - uint32_t isa_1_used_; 209 - uint32_t isa_1_needed_; 210 - uint32_t feature_1_; 211 - + uint32_t feature_2_used_; 212 - + uint32_t feature_2_needed_; 213 - // Target-specific properties from the current object. 214 - // These bits get ORed into ISA_1_USED_ after all properties for the object 215 - // have been processed. But if either is all zeroes (as when the property 216 - @@ -1391,6 +1394,7 @@ class Target_x86_64 : public Sized_target<size, false> 217 - // These bits get ANDed into FEATURE_1_ after all properties for the object 218 - // have been processed. 219 - uint32_t object_feature_1_; 220 - + uint32_t object_feature_2_used_; 221 - // Whether we have seen our first object, for use in initializing FEATURE_1_. 222 - bool seen_first_object_; 223 - }; 224 - @@ -1594,9 +1598,15 @@ Target_x86_64<size>::record_gnu_property( 225 - 226 - switch (pr_type) 227 - { 228 - + case elfcpp::GNU_PROPERTY_X86_COMPAT_ISA_1_USED: 229 - + case elfcpp::GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED: 230 - + case elfcpp::GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED: 231 - + case elfcpp::GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED: 232 - case elfcpp::GNU_PROPERTY_X86_ISA_1_USED: 233 - case elfcpp::GNU_PROPERTY_X86_ISA_1_NEEDED: 234 - case elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND: 235 - + case elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED: 236 - + case elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED: 237 - if (pr_datasz != 4) 238 - { 239 - gold_warning(_("%s: corrupt .note.gnu.property section " 240 - @@ -1625,6 +1635,12 @@ Target_x86_64<size>::record_gnu_property( 241 - // If we see multiple feature props in one object, OR them together. 242 - this->object_feature_1_ |= val; 243 - break; 244 - + case elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED: 245 - + this->object_feature_2_used_ |= val; 246 - + break; 247 - + case elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED: 248 - + this->feature_2_needed_ |= val; 249 - + break; 250 - } 251 - } 252 - 253 - @@ -1642,15 +1658,23 @@ Target_x86_64<size>::merge_gnu_properties(const Object*) 254 - else if (this->isa_1_used_ != 0) 255 - this->isa_1_used_ |= this->object_isa_1_used_; 256 - this->feature_1_ &= this->object_feature_1_; 257 - + // If any object is missing the FEATURE_2_USED property, we must 258 - + // omit it from the output file. 259 - + if (this->object_feature_2_used_ == 0) 260 - + this->feature_2_used_ = 0; 261 - + else if (this->feature_2_used_ != 0) 262 - + this->feature_2_used_ |= this->object_feature_2_used_; 263 - } 264 - else 265 - { 266 - this->isa_1_used_ = this->object_isa_1_used_; 267 - this->feature_1_ = this->object_feature_1_; 268 - + this->feature_2_used_ = this->object_feature_2_used_; 269 - this->seen_first_object_ = true; 270 - } 271 - this->object_isa_1_used_ = 0; 272 - this->object_feature_1_ = 0; 273 - + this->object_feature_2_used_ = 0; 274 - } 275 - 276 - static inline void 277 - @@ -1676,6 +1700,12 @@ Target_x86_64<size>::do_finalize_gnu_properties(Layout* layout) const 278 - if (this->feature_1_ != 0) 279 - add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND, 280 - this->feature_1_); 281 - + if (this->feature_2_used_ != 0) 282 - + add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED, 283 - + this->feature_2_used_); 284 - + if (this->feature_2_needed_ != 0) 285 - + add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED, 286 - + this->feature_2_needed_); 287 - } 288 - 289 - // Write the first three reserved words of the .got.plt section. 290 - -- 291 - 2.27.0 292 -
+1 -1
pkgs/stdenv/linux/default.nix
··· 204 204 # Rebuild binutils to use from stage2 onwards. 205 205 overrides = self: super: { 206 206 binutils-unwrapped = super.binutils-unwrapped.override { 207 - gold = false; 207 + enableGold = false; 208 208 }; 209 209 inherit (prevStage) 210 210 ccWrapperStdenv
+3 -2
pkgs/stdenv/linux/make-bootstrap-tools.nix
··· 37 37 bootBinutils = binutils.bintools.override { 38 38 withAllTargets = false; 39 39 # Don't need two linkers, disable whatever's not primary/default. 40 - gold = false; 40 + enableGold = false; 41 41 # bootstrap is easier w/static 42 42 enableShared = false; 43 43 }; ··· 172 172 for i in as ld ar ranlib nm strip readelf objdump; do 173 173 cp ${bootBinutils.out}/bin/$i $out/bin 174 174 done 175 - cp '${lib.getLib binutils.bintools}'/lib/* "$out/lib/" 175 + cp -r '${lib.getLib binutils.bintools}'/lib/* "$out/lib/" 176 176 177 177 chmod -R u+w $out 178 178 ··· 186 186 187 187 nuke-refs $out/bin/* 188 188 nuke-refs $out/lib/* 189 + nuke-refs $out/lib/*/* 189 190 nuke-refs $out/libexec/gcc/*/*/* 190 191 nuke-refs $out/lib/gcc/*/*/* 191 192 nuke-refs $out/lib/gcc/*/*/include-fixed/*{,/*}
+6
pkgs/tools/X11/nx-libs/default.nix
··· 38 38 ln -s libNX_X11.so.6.3.0 39 39 ''; 40 40 41 + preConfigure = '' 42 + # binutils 2.37 fix 43 + # https://github.com/ArcticaProject/nx-libs/issues/1003 44 + substituteInPlace nx-X11/config/cf/Imake.tmpl --replace "clq" "cq" 45 + ''; 46 + 41 47 PREFIX=""; # Don't install to $out/usr/local 42 48 installPhase = '' 43 49 make DESTDIR="$out" install
+2 -2
pkgs/top-level/all-packages.nix
··· 14642 14642 bingrep = callPackage ../development/tools/analysis/bingrep { }; 14643 14643 14644 14644 binutils-unwrapped = callPackage ../development/tools/misc/binutils { 14645 - autoreconfHook = if targetPlatform.isiOS then autoreconfHook269 else autoreconfHook; 14645 + autoreconfHook = autoreconfHook269; 14646 14646 # FHS sys dirs presumably only have stuff for the build platform 14647 14647 noSysDirs = (stdenv.targetPlatform != stdenv.hostPlatform) || noSysDirs; 14648 14648 }; ··· 14651 14651 }; 14652 14652 binutils_nogold = lowPrio (wrapBintoolsWith { 14653 14653 bintools = binutils-unwrapped.override { 14654 - gold = false; 14654 + enableGold = false; 14655 14655 }; 14656 14656 }); 14657 14657 binutilsNoLibc = wrapBintoolsWith {