diff options
author | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2021-01-03 09:59:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-03 09:59:31 +0100 |
commit | f7267e9797ac07efd6e9e2f4b21bb0068779b5b6 (patch) | |
tree | 66c059d776458e64bfeb8bb2613c55763f62554d /pkgs/development | |
parent | 0960eff85cb2ad17d2864499b28495b7f6f353da (diff) | |
parent | 279110cd86e9c969f8f2942675f7c73cfe4059d3 (diff) |
Merge pull request #107783 from NixOS/staging-next
Staging next (with gcc 10, binutils 2.34 and autoconf 2.70)
Diffstat (limited to 'pkgs/development')
53 files changed, 445 insertions, 1707 deletions
diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix index 7e0d691412b30..12d3f5d8987ea 100644 --- a/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -73,7 +73,7 @@ let "--enable-libssp" "--disable-nls" # To keep ABI compatibility with upstream mingw-w64 - "--enable-fully-dynamic-string" + "--enable-fully-dynamic-string" ] ++ lib.optionals (crossMingw && targetPlatform.isx86_32) [ # See Note [Windows Exception Handling] "--enable-sjlj-exceptions" @@ -187,13 +187,16 @@ let "--disable-symvers" "libat_cv_have_ifunc=no" "--disable-gnu-indirect-function" - ] + ] ++ lib.optionals langJit [ "--enable-host-shared" - ] + ] ++ lib.optionals (langD) [ "--with-target-system-zlib=yes" ] + # Make -fcommon default on gcc10 + # TODO: fix all packages (probably 100+) and remove that + ++ lib.optional (version >= "10.1.0") "--with-specs=%{!fno-common:%{!fcommon:-fcommon}}" ; in configureFlags diff --git a/pkgs/development/compilers/llvm/8/llvm.nix b/pkgs/development/compilers/llvm/8/llvm.nix index 0f6179c2d310f..fb928b67ad54e 100644 --- a/pkgs/development/compilers/llvm/8/llvm.nix +++ b/pkgs/development/compilers/llvm/8/llvm.nix @@ -1,5 +1,6 @@ { stdenv , fetch +, fetchpatch , cmake , python3 , libffi @@ -55,6 +56,14 @@ in stdenv.mkDerivation ({ propagatedBuildInputs = [ ncurses zlib ]; + patches = [ + # Fix missing includes for GCC 10 + (fetchpatch { + url = "https://bugs.gentoo.org/attachment.cgi?id=612792"; + sha256 = "0rwx6jpqq4xnf4mvfm8v2d4r34y1yi05am0mx5k2d5bha9j64lqg"; + }) + ]; + postPatch = optionalString stdenv.isDarwin '' substituteInPlace cmake/modules/AddLLVM.cmake \ --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \ diff --git a/pkgs/development/interpreters/python/cpython/3.7/find_library.patch b/pkgs/development/interpreters/python/cpython/3.7/find_library.patch new file mode 100644 index 0000000000000..97fb66662d030 --- /dev/null +++ b/pkgs/development/interpreters/python/cpython/3.7/find_library.patch @@ -0,0 +1,105 @@ +From 9b5a023a5dc3127da15253f7acad71019395ebe1 Mon Sep 17 00:00:00 2001 +From: Pablo Galindo <Pablogsal@gmail.com> +Date: Thu, 8 Oct 2020 19:50:37 +0100 +Subject: [PATCH] [3.7] bpo-41976: Fix the fallback to gcc of + ctypes.util.find_library when using gcc>9 (GH-22598). (GH-22601) + +(cherry picked from commit 27ac19cca2c639caaf6fedf3632fe6beb265f24f) + +Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> +--- + Lib/ctypes/test/test_find.py | 12 ++++++- + Lib/ctypes/util.py | 32 +++++++++++++++---- + .../2020-10-08-18-22-28.bpo-41976.Svm0wb.rst | 3 ++ + 3 files changed, 39 insertions(+), 8 deletions(-) + create mode 100644 Misc/NEWS.d/next/Library/2020-10-08-18-22-28.bpo-41976.Svm0wb.rst + +diff --git a/Lib/ctypes/test/test_find.py b/Lib/ctypes/test/test_find.py +index b99fdcba7b28f..92ac1840ad7d4 100644 +--- a/Lib/ctypes/test/test_find.py ++++ b/Lib/ctypes/test/test_find.py +@@ -1,4 +1,5 @@ + import unittest ++import unittest.mock + import os.path + import sys + import test.support +@@ -72,7 +73,7 @@ def test_shell_injection(self): + + @unittest.skipUnless(sys.platform.startswith('linux'), + 'Test only valid for Linux') +-class LibPathFindTest(unittest.TestCase): ++class FindLibraryLinux(unittest.TestCase): + def test_find_on_libpath(self): + import subprocess + import tempfile +@@ -111,6 +112,15 @@ def test_find_on_libpath(self): + # LD_LIBRARY_PATH) + self.assertEqual(find_library(libname), 'lib%s.so' % libname) + ++ def test_find_library_with_gcc(self): ++ with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None): ++ self.assertNotEqual(find_library('c'), None) ++ ++ def test_find_library_with_ld(self): ++ with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None), \ ++ unittest.mock.patch("ctypes.util._findLib_gcc", lambda *args: None): ++ self.assertNotEqual(find_library('c'), None) ++ + + if __name__ == "__main__": + unittest.main() +diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py +index 97973bce001d9..0c2510e1619c8 100644 +--- a/Lib/ctypes/util.py ++++ b/Lib/ctypes/util.py +@@ -93,6 +93,12 @@ def find_library(name): + # Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump + import re, tempfile + ++ def _is_elf(filename): ++ "Return True if the given file is an ELF file" ++ elf_header = b'\x7fELF' ++ with open(filename, 'br') as thefile: ++ return thefile.read(4) == elf_header ++ + def _findLib_gcc(name): + # Run GCC's linker with the -t (aka --trace) option and examine the + # library name it prints out. The GCC command will fail because we +@@ -299,17 +312,22 @@ def _findLib_ld(name): + stderr=subprocess.PIPE, + universal_newlines=True) + out, _ = p.communicate() +- res = re.search(expr, os.fsdecode(out)) +- if res: +- result = res.group(0) +- except Exception as e: ++ res = re.findall(expr, os.fsdecode(out)) ++ for file in res: ++ # Check if the given file is an elf file: gcc can report ++ # some files that are linker scripts and not actual ++ # shared objects. See bpo-41976 for more details ++ if not _is_elf(file): ++ continue ++ return os.fsdecode(file) ++ except Exception: + pass # result will be None + return result + + def find_library(name): + # See issue #9998 + return _findSoname_ldconfig(name) or \ +- _get_soname(_findLib_gcc(name) or _findLib_ld(name)) ++ _get_soname(_findLib_gcc(name)) or _get_soname(_findLib_ld(name)) + + ################################################################ + # test code +diff --git a/Misc/NEWS.d/next/Library/2020-10-08-18-22-28.bpo-41976.Svm0wb.rst b/Misc/NEWS.d/next/Library/2020-10-08-18-22-28.bpo-41976.Svm0wb.rst +new file mode 100644 +index 0000000000000..c8b3fc771845e +--- /dev/null ++++ b/Misc/NEWS.d/next/Library/2020-10-08-18-22-28.bpo-41976.Svm0wb.rst +@@ -0,0 +1,3 @@ ++Fixed a bug that was causing :func:`ctypes.util.find_library` to return ++``None`` when triying to locate a library in an environment when gcc>=9 is ++available and ``ldconfig`` is not. Patch by Pablo Galindo diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index cd06c2b636707..c67ede82003a5 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -165,6 +165,9 @@ in with passthru; stdenv.mkDerivation { ] ++ [ # LDSHARED now uses $CC instead of gcc. Fixes cross-compilation of extension modules. ./3.8/0001-On-all-posix-systems-not-just-Darwin-set-LDSHARED-if.patch + ] ++ optionals (isPy37 || isPy38) [ + # Backport a fix for ctypes.util.find_library. + ./3.7/find_library.patch ]; postPatch = '' diff --git a/pkgs/development/libraries/gaia/default.nix b/pkgs/development/libraries/gaia/default.nix index b154f80c1dd26..46ed3626d2af1 100644 --- a/pkgs/development/libraries/gaia/default.nix +++ b/pkgs/development/libraries/gaia/default.nix @@ -5,6 +5,7 @@ , swig , eigen , pkgconfig +, python2 , wafHook , makeWrapper , qt4 @@ -38,9 +39,10 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ - wafHook pkgconfig + python2 # For wafHook swig + wafHook ] # The gaiafusion binary inside $out/bin needs a shebangs patch, and # wrapping with the appropriate $PYTHONPATH diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index f95818b399c97..ad92bf13c4ce9 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -109,6 +109,8 @@ stdenv.mkDerivation rec { setupHook = ./setup-hook.sh; + separateDebugInfo = stdenv.isLinux; + passthru = { updateScript = gnome3.updateScript { packageName = pname; diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 3382af17c35d1..57f05d410fbf7 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -45,11 +45,11 @@ in stdenv.mkDerivation rec { pname = "glib"; - version = "2.66.3"; + version = "2.66.4"; src = fetchurl { url = "mirror://gnome/sources/glib/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "1cdmyyycw2mf5s0f5sfd59q91223s4smcqi8n2fwrccwm5ji7wvr"; + sha256 = "l9+GcOMvn9T3OSsJgOZh3WJQEgFdWDUNoeWOND9K+YQ="; }; patches = optionals stdenv.isDarwin [ diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index dd76745e1fe40..74f8329788a59 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -214,7 +214,7 @@ stdenv.mkDerivation ({ configureScript="`pwd`/../$sourceRoot/configure" ${lib.optionalString (stdenv.cc.libc != null) - ''makeFlags="$makeFlags BUILD_LDFLAGS=-Wl,-rpath,${stdenv.cc.libc}/lib"'' + ''makeFlags="$makeFlags BUILD_LDFLAGS=-Wl,-rpath,${stdenv.cc.libc}/lib OBJDUMP=${stdenv.cc.bintools.bintools}/bin/objdump"'' } diff --git a/pkgs/development/libraries/gstreamer/core/default.nix b/pkgs/development/libraries/gstreamer/core/default.nix index c2a639dff2431..0d33d28196cae 100644 --- a/pkgs/development/libraries/gstreamer/core/default.nix +++ b/pkgs/development/libraries/gstreamer/core/default.nix @@ -94,7 +94,7 @@ stdenv.mkDerivation rec { postInstall = '' for prog in "$dev/bin/"*; do # We can't use --suffix here due to quoting so we craft the export command by hand - wrapProgram "$prog" --run 'export GST_PLUGIN_SYSTEM_PATH=$GST_PLUGIN_SYSTEM_PATH''${GST_PLUGIN_SYSTEM_PATH:+:}$(unset _tmp; for profile in $NIX_PROFILES; do _tmp="$profile/lib/gstreamer-1.0''${_tmp:+:}$_tmp"; done; printf '%s' "$_tmp")' + wrapProgram "$prog" --run 'export GST_PLUGIN_SYSTEM_PATH_1_0=$GST_PLUGIN_SYSTEM_PATH_1_0''${GST_PLUGIN_SYSTEM_PATH_1_0:+:}$(unset _tmp; for profile in $NIX_PROFILES; do _tmp="$profile/lib/gstreamer-1.0''${_tmp:+:}$_tmp"; done; printf '%s' "$_tmp")' done ''; diff --git a/pkgs/development/libraries/gtk/3.x.nix b/pkgs/development/libraries/gtk/3.x.nix index 654ad3116a443..59685ca07ccb3 100644 --- a/pkgs/development/libraries/gtk/3.x.nix +++ b/pkgs/development/libraries/gtk/3.x.nix @@ -43,6 +43,7 @@ , cups ? null , AppKit , Cocoa +, broadwaySupport ? true }: assert cupsSupport -> cups != null; @@ -87,6 +88,7 @@ stdenv.mkDerivation rec { "-Dgtk_doc=${boolToString withGtkDoc}" "-Dtests=false" "-Dtracker3=${boolToString trackerSupport}" + "-Dbroadway_backend=${boolToString broadwaySupport}" ]; # These are the defines that'd you'd get with --enable-debug=minimum (default). diff --git a/pkgs/development/libraries/kde-frameworks/fetch.sh b/pkgs/development/libraries/kde-frameworks/fetch.sh index ea38934b000ef..5c6ea732b6909 100644 --- a/pkgs/development/libraries/kde-frameworks/fetch.sh +++ b/pkgs/development/libraries/kde-frameworks/fetch.sh @@ -1 +1 @@ -WGET_ARGS=(https://download.kde.org/stable/frameworks/5.76/) +WGET_ARGS=( https://download.kde.org/stable/frameworks/5.76/ -A '*.tar.xz' ) diff --git a/pkgs/development/libraries/lcms/default.nix b/pkgs/development/libraries/lcms/default.nix index 01ec659a95b65..8fe2484facaf4 100644 --- a/pkgs/development/libraries/lcms/default.nix +++ b/pkgs/development/libraries/lcms/default.nix @@ -1,10 +1,11 @@ {stdenv, fetchurl}: -stdenv.mkDerivation { - name = "lcms-1.19"; +stdenv.mkDerivation rec { + pname = "lcms"; + version = "1.19"; src = fetchurl { - url = "http://www.littlecms.com/lcms-1.19.tar.gz"; + url = "mirror://sourceforge/lcms/${pname}-${version}.tar.gz"; sha256 = "1abkf8iphwyfs3z305z3qczm3z1i9idc1lz4gvfg92jnkz5k5bl0"; }; diff --git a/pkgs/development/libraries/libbfd/default.nix b/pkgs/development/libraries/libbfd/default.nix index e622cc6be6871..75db780b7bb69 100644 --- a/pkgs/development/libraries/libbfd/default.nix +++ b/pkgs/development/libraries/libbfd/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation { outputs = [ "out" "dev" ]; patches = binutils-unwrapped.patches ++ [ - (binutils-unwrapped.patchesDir + "/build-components-separately.patch") + ../../tools/misc/binutils/build-components-separately.patch (fetchpatch { url = "https://raw.githubusercontent.com/mxe/mxe/e1d4c144ee1994f70f86cf7fd8168fe69bd629c6/src/bfd-1-disable-subdir-doc.patch"; sha256 = "0pzb3i74d1r7lhjan376h59a7kirw15j7swwm8pz3zy9lkdqkj6q"; diff --git a/pkgs/development/libraries/libdatrie/default.nix b/pkgs/development/libraries/libdatrie/default.nix index 0d3faf69e3b76..168773662f6a5 100644 --- a/pkgs/development/libraries/libdatrie/default.nix +++ b/pkgs/development/libraries/libdatrie/default.nix @@ -1,23 +1,40 @@ -{ stdenv, fetchurl, makeWrapper, installShellFiles, pkg-config, libiconv }: +{ stdenv, fetchFromGitHub, makeWrapper +, autoreconfHook, autoconf-archive +, installShellFiles, libiconv }: stdenv.mkDerivation rec { + pname = "libdatrie"; - version = "0.2.12"; + version = "2019-12-20"; - src = fetchurl { - url = "https://github.com/tlwg/libdatrie/releases/download/v${version}/libdatrie-${version}.tar.xz"; - sha256 = "0jdi01pcxv0b24zbjy7zahawsqqqw4mv94f2yy01zh4n796wqba5"; + src = fetchFromGitHub { + owner = "tlwg"; + repo = "libdatrie"; + rev = "d1db08ac1c76f54ba23d63665437473788c999f3"; + sha256 = "03dc363259iyiidrgadzc7i03mmfdj8h78j82vk6z53w6fxq5zxc"; }; - nativeBuildInputs = [ installShellFiles pkg-config ]; + nativeBuildInputs = [ + autoreconfHook + autoconf-archive + installShellFiles + ]; buildInputs = stdenv.lib.optional stdenv.isDarwin libiconv; + preAutoreconf = let + reports = "https://github.com/tlwg/libdatrie/issues"; + in + '' + sed -i -e "/AC_INIT/,+3d" configure.ac + sed -i "5iAC_INIT(${pname},${version},[${reports}])" configure.ac + ''; + postInstall = '' installManPage man/trietool.1 ''; - meta = with stdenv.lib;{ + meta = with stdenv.lib; { homepage = "https://linux.thai.net/~thep/datrie/datrie.html"; description = "This is an implementation of double-array structure for representing trie"; license = licenses.lgpl21Plus; diff --git a/pkgs/development/libraries/libgcrypt/default.nix b/pkgs/development/libraries/libgcrypt/default.nix index 2290d2fa07dc0..cd529cb06ee60 100644 --- a/pkgs/development/libraries/libgcrypt/default.nix +++ b/pkgs/development/libraries/libgcrypt/default.nix @@ -34,6 +34,11 @@ stdenv.mkDerivation rec { # aarch64 configurePlatforms = [ "host" "build" ]; + postConfigure = '' + sed -i configure \ + -e 's/NOEXECSTACK_FLAGS=$/NOEXECSTACK_FLAGS="-Wa,--noexecstack"/' + ''; + # Make sure libraries are correct for .pc and .la files # Also make sure includes are fixed for callers who don't use libgpgcrypt-config postFixup = '' diff --git a/pkgs/development/libraries/liblangtag/default.nix b/pkgs/development/libraries/liblangtag/default.nix index 1c5c39ac89892..b724789188cdd 100644 --- a/pkgs/development/libraries/liblangtag/default.nix +++ b/pkgs/development/libraries/liblangtag/default.nix @@ -1,22 +1,22 @@ -{stdenv, fetchurl, fetchFromBitbucket, autoreconfHook, gtk-doc, gettext +{ stdenv, fetchurl, fetchFromBitbucket, autoreconfHook, gtk-doc, gettext , pkgconfig, glib, libxml2, gobject-introspection, gnome-common, unzip }: stdenv.mkDerivation rec { pname = "liblangtag"; - version = "0.6.1"; + version = "0.6.3"; src = fetchFromBitbucket { owner = "tagoh"; repo = pname; rev = version; - sha256 = "19dk2qsg7f3ig9xz8d73jvikmf5kvrwi008wrz2psxinbdml442g"; + sha256 = "10rycs8xrxzf9frzalv3qx8cs1jcildhrr4imzxdmr9f4l585z96"; }; core_zip = fetchurl { # please update if an update is available - url = "http://www.unicode.org/Public/cldr/33.1/core.zip"; - sha256 = "0f195aald02ng3ch2q1wf59b5lwp2bi1cd8ia7572pbyy2w8w8cp"; + url = "http://www.unicode.org/Public/cldr/37/core.zip"; + sha256 = "0myswkvvaxvrz9zwq4zh65sygfd9n72cd5rk4pwacqba4nxgb4xs"; }; language_subtag_registry = fetchurl { diff --git a/pkgs/development/libraries/libomxil-bellagio/default.nix b/pkgs/development/libraries/libomxil-bellagio/default.nix index 5f583d53abfe3..854c2732c12c2 100644 --- a/pkgs/development/libraries/libomxil-bellagio/default.nix +++ b/pkgs/development/libraries/libomxil-bellagio/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { # Fix for #40213, probably permanent, because upstream doesn't seem to be # developed anymore. Alternatively, gcc7Stdenv could be used. - NIX_CFLAGS_COMPILE = "-Wno-error=array-bounds"; + NIX_CFLAGS_COMPILE = "-Wno-error=array-bounds -Wno-error=stringop-overflow=8"; meta = with stdenv.lib; { homepage = "https://sourceforge.net/projects/omxil/"; diff --git a/pkgs/development/libraries/libopcodes/default.nix b/pkgs/development/libraries/libopcodes/default.nix index f596ddfafc447..8db034683dc7e 100644 --- a/pkgs/development/libraries/libopcodes/default.nix +++ b/pkgs/development/libraries/libopcodes/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation { outputs = [ "out" "dev" ]; patches = binutils-unwrapped.patches ++ [ - (binutils-unwrapped.patchesDir + "/build-components-separately.patch") + ../../tools/misc/binutils/build-components-separately.patch ]; # We just want to build libopcodes diff --git a/pkgs/development/libraries/libopus/default.nix b/pkgs/development/libraries/libopus/default.nix index 9f4d6275ad669..e8d3682b8b31f 100644 --- a/pkgs/development/libraries/libopus/default.nix +++ b/pkgs/development/libraries/libopus/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation { configureFlags = stdenv.lib.optional fixedPoint "--enable-fixed-point" ++ stdenv.lib.optional withCustomModes "--enable-custom-modes"; - doCheck = true; + doCheck = !stdenv.isi686; # test_unit_LPC_inv_pred_gain fails meta = with stdenv.lib; { description = "Open, royalty-free, highly versatile audio codec"; diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 578763478f5fa..c96d1edfadfe8 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -31,7 +31,7 @@ with stdenv.lib; let # Release calendar: https://www.mesa3d.org/release-calendar.html # Release frequency: https://www.mesa3d.org/releasing.html#schedule - version = "20.2.4"; + version = "20.3.1"; branch = versions.major version; in @@ -46,7 +46,7 @@ stdenv.mkDerivation { "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz" "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" ]; - sha256 = "14m09bk7akj0k02lg8fhvvzbdsashlbdsgl2cw7wbqfj2mhdqwh5"; + sha256 = "03vqm9kqrcpijg6bxldj0bg360z8d7c767n3b16jdc1apd4inxdg"; }; prePatch = "patchShebangs ."; @@ -58,34 +58,21 @@ stdenv.mkDerivation { ./missing-includes.patch # dev_t needs sys/stat.h, time_t needs time.h, etc.-- fixes build w/musl ./opencl-install-dir.patch ./disk_cache-include-dri-driver-path-in-cache-key.patch - ] - ++ lib.optionals stdenv.hostPlatform.isMusl [ - # Fix `-Werror=int-conversion` pthread warnings on musl. - # TODO: Remove when https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6121 is merged and available - (fetchpatch { - name = "nine_debug-Make-tid-more-type-correct"; - url = "https://gitlab.freedesktop.org/mesa/mesa/commit/aebbf819df6d1e.patch"; - sha256 = "17248hyzg43d73c86p077m4lv1pkncaycr3l27hwv9k4ija9zl8q"; - }) - ] - # do not prefix user provided dri-drivers-path - ++ lib.optional (lib.versionOlder version "19.0.0") (fetchpatch { - url = "https://gitlab.freedesktop.org/mesa/mesa/commit/f6556ec7d126b31da37c08d7cb657250505e01a0.patch"; - sha256 = "0z6phi8hbrbb32kkp1js7ggzviq7faz1ria36wi4jbc4in2392d9"; + # Fix `-Werror=int-conversion` pthread warnings on musl. + # TODO: Remove when https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6121 is merged and available + (fetchpatch { + name = "nine_debug-Make-tid-more-type-correct"; + url = "https://gitlab.freedesktop.org/mesa/mesa/commit/aebbf819df6d1e.patch"; + sha256 = "17248hyzg43d73c86p077m4lv1pkncaycr3l27hwv9k4ija9zl8q"; }) - ++ lib.optionals (lib.versionOlder version "19.1.0") [ - # do not prefix user provided d3d-drivers-path - (fetchpatch { - url = "https://gitlab.freedesktop.org/mesa/mesa/commit/dcc48664197c7e44684ccfb970a4ae083974d145.patch"; - sha256 = "1nhs0xpx3hiy8zfb5gx1zd7j7xha6h0hr7yingm93130a5902lkb"; - }) - - # don't build libGLES*.so with GLVND - (fetchpatch { - url = "https://gitlab.freedesktop.org/mesa/mesa/commit/b01524fff05eef66e8cd24f1c5aacefed4209f03.patch"; - sha256 = "1pszr6acx2xw469zq89n156p3bf3xf84qpbjw5fr1sj642lbyh7c"; - }) - ]; + ] ++ stdenv.lib.optionals stdenv.isDarwin [ + # Fix for pre macOS SDK 10.13 + # TODO(r-burns) can be applied unconditionally, at the cost of a mass linux rebuild + (fetchpatch { + url = "https://gitlab.freedesktop.org/mesa/mesa/-/commit/f4403f70fe5bf2ec41af5546122f0d78caffa984.patch"; + sha256 = "03j2aj255m7ms848nkb41vj3s3yb72zb5rz3w3fzp5l9wzzargw5"; + }) + ]; postPatch = '' substituteInPlace meson.build --replace \ diff --git a/pkgs/development/libraries/mp4v2/default.nix b/pkgs/development/libraries/mp4v2/default.nix index 9601ae1eea30d..3a036fcf6fbf1 100644 --- a/pkgs/development/libraries/mp4v2/default.nix +++ b/pkgs/development/libraries/mp4v2/default.nix @@ -21,6 +21,8 @@ stdenv.mkDerivation rec { }) ]; + NIX_CFLAGS_COMPILE = [ "-Wno-error=narrowing" ]; + # `faac' expects `mp4.h'. postInstall = "ln -s mp4v2/mp4v2.h $out/include/mp4.h"; diff --git a/pkgs/development/libraries/ntdb/default.nix b/pkgs/development/libraries/ntdb/default.nix index de0db887d4bfa..d0a9a2e5b49a4 100644 --- a/pkgs/development/libraries/ntdb/default.nix +++ b/pkgs/development/libraries/ntdb/default.nix @@ -1,5 +1,6 @@ { stdenv , fetchurl +, python2 , python3 , pkg-config , readline @@ -26,6 +27,7 @@ stdenv.mkDerivation rec { docbook-xsl-nons docbook_xml_dtd_42 wafHook + python2 # For wafHook ]; buildInputs = [ diff --git a/pkgs/development/libraries/polkit/default.nix b/pkgs/development/libraries/polkit/default.nix index 6aea70530143e..2ec49a2d3c088 100644 --- a/pkgs/development/libraries/polkit/default.nix +++ b/pkgs/development/libraries/polkit/default.nix @@ -2,7 +2,8 @@ , intltool, spidermonkey_78, gobject-introspection, libxslt, docbook_xsl, dbus , docbook_xml_dtd_412, gtk-doc, coreutils , useSystemd ? (stdenv.isLinux && !stdenv.hostPlatform.isMusl), systemd, elogind -, withIntrospection ? true +# needed until gobject-introspection does cross-compile (https://github.com/NixOS/nixpkgs/pull/88222) +, withIntrospection ? (stdenv.buildPlatform == stdenv.hostPlatform) # A few tests currently fail on musl (polkitunixusertest, polkitunixgrouptest, polkitidentitytest segfault). # Not yet investigated; it may be due to the "Make netgroup support optional" # patch not updating the tests correctly yet, or doing something wrong, diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix index 074868251d0ab..e7b9a26f19fdf 100644 --- a/pkgs/development/libraries/poppler/default.nix +++ b/pkgs/development/libraries/poppler/default.nix @@ -12,11 +12,11 @@ let in stdenv.mkDerivation rec { name = "poppler-${suffix}-${version}"; - version = "20.08.0"; # beware: updates often break cups-filters build, check texlive and scribusUnstable too! + version = "20.12.1"; # beware: updates often break cups-filters build, check texlive and scribusUnstable too! src = fetchurl { url = "${meta.homepage}/poppler-${version}.tar.xz"; - sha256 = "19gchq6fpa00ic5rn1zmjzxx85cif4hbdrsjcfd2aqxz9gqgwrdf"; + sha256 = "0dbv1y9i5ahg6namz6gw2d0njnmrigr4a80dbxvnqad4q232banh"; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/qt-5/5.12/fetch.sh b/pkgs/development/libraries/qt-5/5.12/fetch.sh index 9b024378b3b6f..e93c9acd3f050 100644 --- a/pkgs/development/libraries/qt-5/5.12/fetch.sh +++ b/pkgs/development/libraries/qt-5/5.12/fetch.sh @@ -1 +1,2 @@ -WGET_ARGS=( http://download.qt.io/official_releases/qt/5.12/5.12.9/submodules/ ) +WGET_ARGS=( http://download.qt.io/official_releases/qt/5.12/5.12.9/submodules/ \ + -A '*.tar.xz' ) diff --git a/pkgs/development/libraries/qt-5/5.14/fetch.sh b/pkgs/development/libraries/qt-5/5.14/fetch.sh index 2d266b5297767..e4e02bd82ed3f 100644 --- a/pkgs/development/libraries/qt-5/5.14/fetch.sh +++ b/pkgs/development/libraries/qt-5/5.14/fetch.sh @@ -1 +1,2 @@ -WGET_ARGS=( http://download.qt.io/official_releases/qt/5.14/5.14.2/submodules/ ) +WGET_ARGS=( http://download.qt.io/official_releases/qt/5.14/5.14.2/submodules/ \ + -A '*.tar.xz' ) diff --git a/pkgs/development/libraries/qt-5/5.15/fetch.sh b/pkgs/development/libraries/qt-5/5.15/fetch.sh index 70e6dbe82a3b2..81ceb3ef77eab 100644 --- a/pkgs/development/libraries/qt-5/5.15/fetch.sh +++ b/pkgs/development/libraries/qt-5/5.15/fetch.sh @@ -1 +1,2 @@ -WGET_ARGS=( http://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/ ) +WGET_ARGS=( http://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/ \ + -A '*.tar.xz' ) diff --git a/pkgs/development/libraries/range-v3/default.nix b/pkgs/development/libraries/range-v3/default.nix index a583239b52e00..3799ccbb59c61 100644 --- a/pkgs/development/libraries/range-v3/default.nix +++ b/pkgs/development/libraries/range-v3/default.nix @@ -11,6 +11,10 @@ stdenv.mkDerivation rec { sha256 = "18230bg4rq9pmm5f8f65j444jpq56rld4fhmpham8q3vr1c1bdjh"; }; + patches = [ + ./gcc10.patch + ]; + nativeBuildInputs = [ cmake ]; # Building the tests currently fails on AArch64 due to internal compiler diff --git a/pkgs/development/libraries/range-v3/gcc10.patch b/pkgs/development/libraries/range-v3/gcc10.patch new file mode 100644 index 0000000000000..caebf0a631629 --- /dev/null +++ b/pkgs/development/libraries/range-v3/gcc10.patch @@ -0,0 +1,133 @@ +From a91f0e1be27a31c446452a753001d4518ef83a6b Mon Sep 17 00:00:00 2001 +From: Eric Niebler <eniebler@boost.org> +Date: Mon, 17 Aug 2020 17:48:09 -0700 +Subject: [PATCH] work around premature instantiation problem on gcc; fixes + #1545 + +--- + include/range/v3/view/chunk.hpp | 6 +++--- + include/range/v3/view/split.hpp | 26 +++++++++++++------------- + 2 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/include/range/v3/view/chunk.hpp b/include/range/v3/view/chunk.hpp +index 0c03cf1eb..b8df13303 100644 +--- a/include/range/v3/view/chunk.hpp ++++ b/include/range/v3/view/chunk.hpp +@@ -313,8 +313,8 @@ namespace ranges + + public: + inner_view() = default; +- constexpr explicit inner_view(chunk_view_ & view) noexcept +- : rng_{&view} ++ constexpr explicit inner_view(chunk_view_ * view) noexcept ++ : rng_{view} + {} + CPP_auto_member + constexpr auto CPP_fun(size)()( +@@ -338,7 +338,7 @@ namespace ranges + constexpr inner_view read() const + { + RANGES_EXPECT(!done()); +- return inner_view{*rng_}; ++ return inner_view{rng_}; + } + constexpr bool done() const + { +diff --git a/include/range/v3/view/split.hpp b/include/range/v3/view/split.hpp +index facf1b37f..496220e4a 100644 +--- a/include/range/v3/view/split.hpp ++++ b/include/range/v3/view/split.hpp +@@ -389,19 +389,19 @@ namespace ranges + split_outer_iterator() = default; + + CPP_member +- constexpr explicit CPP_ctor(split_outer_iterator)(Parent & parent)( ++ constexpr explicit CPP_ctor(split_outer_iterator)(Parent * parent)( + /// \pre + requires (!forward_range<Base>)) +- : parent_(&parent) ++ : parent_(parent) + {} + + CPP_member +- constexpr CPP_ctor(split_outer_iterator)(Parent & parent, ++ constexpr CPP_ctor(split_outer_iterator)(Parent * parent, + iterator_t<Base> current)( + /// \pre + requires forward_range<Base>) + : Current{std::move(current)} +- , parent_(&parent) ++ , parent_(parent) + {} + + template(bool Other)( +@@ -519,7 +519,7 @@ namespace ranges + ranges::equal_to> && + (forward_range<V> || detail::tiny_range<Pattern>) + #endif +- struct RANGES_EMPTY_BASES split_view ++ struct RANGES_EMPTY_BASES split_view + : view_interface<split_view<V, Pattern>, is_finite<V>::value ? finite : unknown> + , private detail::split_view_base<iterator_t<V>> + { +@@ -537,17 +537,17 @@ namespace ranges + #if RANGES_CXX_IF_CONSTEXPR < RANGES_CXX_IF_CONSTEXPR_17 + outer_iterator<simple_view<V>()> begin_(std::true_type) + { +- return outer_iterator<simple_view<V>()>{*this, ranges::begin(base_)}; ++ return outer_iterator<simple_view<V>()>{this, ranges::begin(base_)}; + } + outer_iterator<false> begin_(std::false_type) + { + this->curr_ = ranges::begin(base_); +- return outer_iterator<false>{*this}; ++ return outer_iterator<false>{this}; + } + + outer_iterator<simple_view<V>()> end_(std::true_type) const + { +- return outer_iterator<true>{*this, ranges::end(base_)}; ++ return outer_iterator<true>{this, ranges::end(base_)}; + } + default_sentinel_t end_(std::false_type) const + { +@@ -580,11 +580,11 @@ namespace ranges + { + #if RANGES_CXX_IF_CONSTEXPR >= RANGES_CXX_IF_CONSTEXPR_17 + if constexpr(forward_range<V>) +- return outer_iterator<simple_view<V>()>{*this, ranges::begin(base_)}; ++ return outer_iterator<simple_view<V>()>{this, ranges::begin(base_)}; + else + { + this->curr_ = ranges::begin(base_); +- return outer_iterator<false>{*this}; ++ return outer_iterator<false>{this}; + } + #else + return begin_(meta::bool_<forward_range<V>>{}); +@@ -596,7 +596,7 @@ namespace ranges + /// \pre + requires forward_range<V> && forward_range<const V>) + { +- return {*this, ranges::begin(base_)}; ++ return {this, ranges::begin(base_)}; + } + CPP_member + constexpr auto end() // +@@ -604,14 +604,14 @@ namespace ranges + /// \pre + requires forward_range<V> && common_range<V>) + { +- return outer_iterator<simple_view<V>()>{*this, ranges::end(base_)}; ++ return outer_iterator<simple_view<V>()>{this, ranges::end(base_)}; + } + constexpr auto end() const + { + #if RANGES_CXX_IF_CONSTEXPR >= RANGES_CXX_IF_CONSTEXPR_17 + if constexpr(forward_range<V> && forward_range<const V> && + common_range<const V>) +- return outer_iterator<true>{*this, ranges::end(base_)}; ++ return outer_iterator<true>{this, ranges::end(base_)}; + else + return default_sentinel; + #else diff --git a/pkgs/development/python-modules/coveralls/default.nix b/pkgs/development/python-modules/coveralls/default.nix index 68cf993a5a811..55032864c3f5b 100644 --- a/pkgs/development/python-modules/coveralls/default.nix +++ b/pkgs/development/python-modules/coveralls/default.nix @@ -36,6 +36,10 @@ buildPythonPackage rec { pytestrunner ]; + postPatch = '' + sed -i "s/'coverage>=\([^,]\+\),.*',$/'coverage>=\1',/" setup.py + ''; + # FIXME: tests requires .git directory to be present doCheck = false; diff --git a/pkgs/development/python-modules/jinja2/default.nix b/pkgs/development/python-modules/jinja2/default.nix index 45178377026df..33d6003cae745 100644 --- a/pkgs/development/python-modules/jinja2/default.nix +++ b/pkgs/development/python-modules/jinja2/default.nix @@ -4,7 +4,7 @@ , fetchPypi , pytest , markupsafe -, setuptools +, setuptools }: buildPythonPackage rec { diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 385cb990c468d..d38f42e4b3382 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, pkgconfig, fetchpatch +{ stdenv, lib, fetchurl, pkgconfig , bzip2, curl, expat, libarchive, xz, zlib, libuv, rhash , buildPackages # darwin attributes @@ -20,12 +20,12 @@ stdenv.mkDerivation rec { + lib.optionalString useNcurses "-cursesUI" + lib.optionalString withQt5 "-qt5UI" + lib.optionalString useQt4 "-qt4UI"; - version = "3.19.1"; + version = "3.19.2"; src = fetchurl { url = "${meta.homepage}files/v${lib.versions.majorMinor version}/cmake-${version}.tar.gz"; # compare with https://cmake.org/files/v${lib.versions.majorMinor version}/cmake-${version}-SHA-256.txt - sha256 = "1fisi9rlijw9wd0yjzk1c6j7ljnb2yiq5iqnrz6m1xkflyinw9hx"; + sha256 = "1w67w0ak6vf37501dlz9yhnzlvvpw1w10n2nm3hi7yxp4cxzvq73"; }; patches = [ @@ -38,12 +38,6 @@ stdenv.mkDerivation rec { # Derived from https://github.com/libuv/libuv/commit/1a5d4f08238dd532c3718e210078de1186a5920d ./libuv-application-services.patch - # Fix namelink failures, can be removed in 3.19.2+ - (fetchpatch { - url = "https://gitlab.kitware.com/cmake/cmake/-/commit/38bcb5c0a3accd2dd29fb7632c6b3bf31b990d82.patch"; - sha256 = "17yr66wrayhmavsz46b37zfwp2jcwab1zig2xqps39ysndf74qjc"; - }) - ] ++ lib.optional stdenv.isCygwin ./3.2.2-cygwin.patch; outputs = [ "out" ]; diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix index cd506b970f60c..890c457da059a 100644 --- a/pkgs/development/tools/build-managers/meson/default.nix +++ b/pkgs/development/tools/build-managers/meson/default.nix @@ -4,6 +4,7 @@ , writeTextDir , substituteAll , fetchpatch +, installShellFiles }: python3.pkgs.buildPythonApplication rec { @@ -77,6 +78,13 @@ python3.pkgs.buildPythonApplication rec { rm $out/nix-support/propagated-build-inputs ''; + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + installShellCompletion --zsh data/shell-completions/zsh/_meson + installShellCompletion --bash data/shell-completions/bash/meson + ''; + meta = with lib; { homepage = "https://mesonbuild.com"; description = "SCons-like build system that use python as a front-end language and Ninja as a building backend"; diff --git a/pkgs/development/tools/build-managers/wafHook/default.nix b/pkgs/development/tools/build-managers/wafHook/default.nix index 4184bd5fe8cdc..2131caede3c8c 100644 --- a/pkgs/development/tools/build-managers/wafHook/default.nix +++ b/pkgs/development/tools/build-managers/wafHook/default.nix @@ -1,7 +1,6 @@ -{ lib, stdenv, pkgs, python, makeSetupHook, waf }: +{ lib, stdenv, pkgs, makeSetupHook, waf }: makeSetupHook { - deps = [ python ]; substitutions = { inherit waf; crossFlags = lib.optionalString (stdenv.hostPlatform.system != stdenv.targetPlatform.system) diff --git a/pkgs/development/tools/documentation/gtk-doc/default.nix b/pkgs/development/tools/documentation/gtk-doc/default.nix index 4645c63e71da0..10b48d5119189 100644 --- a/pkgs/development/tools/documentation/gtk-doc/default.nix +++ b/pkgs/development/tools/documentation/gtk-doc/default.nix @@ -14,7 +14,7 @@ python3.pkgs.buildPythonApplication rec { pname = "gtk-doc"; - version = "1.33.0"; + version = "1.33.1"; format = "other"; @@ -23,7 +23,7 @@ python3.pkgs.buildPythonApplication rec { owner = "GNOME"; repo = pname; rev = version; - sha256 = "ahOTEWwVVwHt8TDWBnPKHIAUq0GXllEvMRmaKul1Tq0="; + sha256 = "L9CjhZ60F42xbo50x7cdKfJrav/9mf38pff8S4xkEVo="; }; patches = [ diff --git a/pkgs/development/tools/misc/autoconf/2.69.nix b/pkgs/development/tools/misc/autoconf/2.69.nix new file mode 100644 index 0000000000000..500d80d4bb8f4 --- /dev/null +++ b/pkgs/development/tools/misc/autoconf/2.69.nix @@ -0,0 +1,52 @@ +{ stdenv, fetchurl, m4, perl }: + +stdenv.mkDerivation rec { + name = "autoconf-2.69"; + + src = fetchurl { + url = "mirror://gnu/autoconf/${name}.tar.xz"; + sha256 = "113nlmidxy9kjr45kg9x3ngar4951mvag1js2a3j8nxcz34wxsv4"; + }; + + nativeBuildInputs = [ m4 perl ]; + buildInputs = [ m4 ]; + + # Work around a known issue in Cygwin. See + # http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/6822 for + # details. + # There are many test failures on `i386-pc-solaris2.11'. + #doCheck = ((!stdenv.isCygwin) && (!stdenv.isSunOS)); + doCheck = false; + + # Don't fixup "#! /bin/sh" in Autoconf, otherwise it will use the + # "fixed" path in generated files! + dontPatchShebangs = true; + + enableParallelBuilding = true; + + # Make the Autotest test suite run in parallel. + preCheck ='' + export TESTSUITEFLAGS="-j$NIX_BUILD_CORES" + ''; + + doInstallCheck = false; # fails + + meta = { + homepage = "https://www.gnu.org/software/autoconf/"; + description = "Part of the GNU Build System"; + + longDescription = '' + GNU Autoconf is an extensible package of M4 macros that produce + shell scripts to automatically configure software source code + packages. These scripts can adapt the packages to many kinds of + UNIX-like systems without manual user intervention. Autoconf + creates a configuration script for a package from a template + file that lists the operating system features that the package + can use, in the form of M4 macro calls. + ''; + + license = stdenv.lib.licenses.gpl2Plus; + + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/development/tools/misc/autoconf/default.nix b/pkgs/development/tools/misc/autoconf/default.nix index 936cc9a145456..57a92cee737b1 100644 --- a/pkgs/development/tools/misc/autoconf/default.nix +++ b/pkgs/development/tools/misc/autoconf/default.nix @@ -6,11 +6,11 @@ # files. stdenv.mkDerivation rec { - name = "autoconf-2.69"; + name = "autoconf-2.70"; src = fetchurl { url = "mirror://gnu/autoconf/${name}.tar.xz"; - sha256 = "113nlmidxy9kjr45kg9x3ngar4951mvag1js2a3j8nxcz34wxsv4"; + sha256 = "1ipckz0wr2mvhj9n3ys54fmf2aksin6bhqvzl304bn6rc1w257ps"; }; nativeBuildInputs = [ m4 perl ]; @@ -20,8 +20,7 @@ stdenv.mkDerivation rec { # http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/6822 for # details. # There are many test failures on `i386-pc-solaris2.11'. - #doCheck = ((!stdenv.isCygwin) && (!stdenv.isSunOS)); - doCheck = false; + doCheck = ((!stdenv.isCygwin) && (!stdenv.isSunOS)); # Don't fixup "#! /bin/sh" in Autoconf, otherwise it will use the # "fixed" path in generated files! @@ -34,8 +33,6 @@ stdenv.mkDerivation rec { export TESTSUITEFLAGS="-j$NIX_BUILD_CORES" ''; - doInstallCheck = false; # fails - meta = { homepage = "https://www.gnu.org/software/autoconf/"; description = "Part of the GNU Build System"; diff --git a/pkgs/development/tools/misc/binutils/patches/2.31/always-search-rpath.patch b/pkgs/development/tools/misc/binutils/always-search-rpath.patch index 2e9956e6b6e45..2e9956e6b6e45 100644 --- a/pkgs/development/tools/misc/binutils/patches/2.31/always-search-rpath.patch +++ b/pkgs/development/tools/misc/binutils/always-search-rpath.patch diff --git a/pkgs/development/tools/misc/binutils/patches/2.34/build-components-separately.patch b/pkgs/development/tools/misc/binutils/build-components-separately.patch index 38fa4934a28a6..38fa4934a28a6 100644 --- a/pkgs/development/tools/misc/binutils/patches/2.34/build-components-separately.patch +++ b/pkgs/development/tools/misc/binutils/build-components-separately.patch diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 978ec3f2f99f5..fb3293aee4418 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -19,13 +19,7 @@ let reuseLibs = enableShared && withAllTargets; - # Remove gold-symbol-visibility patch when updating, the proper fix - # is now upstream. - # https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=330b90b5ffbbc20c5de6ae6c7f60c40fab2e7a4f;hp=99181ccac0fc7d82e7dabb05dc7466e91f1645d3 - version = "${minorVersion}${patchVersion}"; - minorVersion = if stdenv.targetPlatform.isOr1k then "2.34" else "2.31"; - patchVersion = if stdenv.targetPlatform.isOr1k then "" else ".1"; - + version = "2.34"; basename = "binutils"; # The targetPrefix prepended to binary names to allow multiple binuntils on the # PATH to both be usable. @@ -37,49 +31,33 @@ let rev = "708acc851880dbeda1dd18aca4fd0a95b2573b36"; sha256 = "1kdrz6fki55lm15rwwamn74fnqpy0zlafsida2zymk76n3656c63"; }; - - # binutils sources not part of the bootstrap. - non-boot-src = (fetchurl { + # HACK to ensure that we preserve source from bootstrap binutils to not rebuild LLVM + normal-src = stdenv.__bootPackages.binutils-unwrapped.src or (fetchurl { url = "mirror://gnu/binutils/${basename}-${version}.tar.bz2"; - sha256 = { - "2.31.1" = "1l34hn1zkmhr1wcrgf0d4z7r3najxnw3cx2y2fk7v55zjlk3ik7z"; - "2.34" = "1rin1f5c7wm4n3piky6xilcrpf2s0n3dd5vqq8irrxkcic3i1w49"; - }.${version}; + sha256 = "1rin1f5c7wm4n3piky6xilcrpf2s0n3dd5vqq8irrxkcic3i1w49"; }); - - # HACK to ensure that we preserve source from bootstrap binutils to not rebuild LLVM - normal-src = stdenv.__bootPackages.binutils-unwrapped.src or non-boot-src; - - # Platforms where we directly use the final source. - # Generally for cross-compiled platforms, where the boot source won't compile. - skipBootSrc = stdenv.targetPlatform.isOr1k; - - # Select the specific source according to the platform in use. - src = if stdenv.targetPlatform.isVc4 then vc4-binutils-src - else if skipBootSrc then non-boot-src - else normal-src; - - patchesDir = ./patches + "/${minorVersion}"; in stdenv.mkDerivation { pname = targetPrefix + basename; - inherit src version; + inherit version; + + src = if stdenv.targetPlatform.isVc4 then vc4-binutils-src else normal-src; patches = [ # Make binutils output deterministic by default. - "${patchesDir}/deterministic.patch" + ./deterministic.patch # Bfd looks in BINDIR/../lib for some plugins that don't # exist. This is pointless (since users can't install plugins # there) and causes a cycle between the lib and bin outputs, so # get rid of it. - "${patchesDir}/no-plugins.patch" + ./no-plugins.patch # Help bfd choose between elf32-littlearm, elf32-littlearm-symbian, and # elf32-littlearm-vxworks in favor of the first. # https://github.com/NixOS/nixpkgs/pull/30484#issuecomment-345472766 - "${patchesDir}/disambiguate-arm-targets.patch" + ./disambiguate-arm-targets.patch # For some reason bfd ld doesn't search DT_RPATH when cross-compiling. It's # not clear why this behavior was decided upon but it has the unfortunate @@ -87,41 +65,28 @@ stdenv.mkDerivation { # shared objects when cross-compiling. Consequently, we are forced to # override this behavior, forcing ld to search DT_RPATH even when # cross-compiling. - "${patchesDir}/always-search-rpath.patch" - ] - # For version 2.31 exclusively - ++ lib.optionals (!stdenv.targetPlatform.isVc4 && minorVersion == "2.31") [ - # https://sourceware.org/bugzilla/show_bug.cgi?id=22868 - ./patches/2.31/gold-symbol-visibility.patch - - # https://sourceware.org/bugzilla/show_bug.cgi?id=23428 - # un-break features so linking against musl doesn't produce crash-only binaries - ./patches/2.31/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch - ./patches/2.31/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch - ./patches/2.31/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch - ] - ++ lib.optional stdenv.targetPlatform.isiOS ./support-ios.patch - ++ # This patch was suggested by Nick Clifton to fix - # https://sourceware.org/bugzilla/show_bug.cgi?id=16177 - # It can be removed when that 7-year-old bug is closed. - # This binutils bug causes GHC to emit broken binaries on armv7, and - # indeed GHC will refuse to compile with a binutils suffering from it. See - # this comment for more information: - # https://gitlab.haskell.org/ghc/ghc/issues/4210#note_78333 - lib.optional stdenv.targetPlatform.isAarch32 ./R_ARM_COPY.patch - ; + ./always-search-rpath.patch + + ] ++ lib.optional stdenv.targetPlatform.isiOS ./support-ios.patch + ++ # This patch was suggested by Nick Clifton to fix + # https://sourceware.org/bugzilla/show_bug.cgi?id=16177 + # It can be removed when that 7-year-old bug is closed. + # This binutils bug causes GHC to emit broken binaries on armv7, and + # indeed GHC will refuse to compile with a binutils suffering from it. See + # this comment for more information: + # https://gitlab.haskell.org/ghc/ghc/issues/4210#note_78333 + lib.optional stdenv.targetPlatform.isAarch32 ./R_ARM_COPY.patch; outputs = [ "out" "info" "man" ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ bison - ] ++ lib.optionals (lib.versionAtLeast version "2.34") [ perl texinfo ] ++ (lib.optionals stdenv.targetPlatform.isiOS [ autoreconfHook - ]) ++ lib.optionals stdenv.targetPlatform.isVc4 [ texinfo flex ]; + ]) ++ lib.optionals stdenv.targetPlatform.isVc4 [ flex ]; buildInputs = [ zlib gettext ]; inherit noSysDirs; @@ -182,7 +147,7 @@ stdenv.mkDerivation { enableParallelBuilding = true; passthru = { - inherit targetPrefix patchesDir; + inherit targetPrefix; }; meta = with lib; { diff --git a/pkgs/development/tools/misc/binutils/patches/2.31/deterministic.patch b/pkgs/development/tools/misc/binutils/deterministic.patch index 736e0aca6ce1f..736e0aca6ce1f 100644 --- a/pkgs/development/tools/misc/binutils/patches/2.31/deterministic.patch +++ b/pkgs/development/tools/misc/binutils/deterministic.patch diff --git a/pkgs/development/tools/misc/binutils/patches/2.31/disambiguate-arm-targets.patch b/pkgs/development/tools/misc/binutils/disambiguate-arm-targets.patch index abbfa73da05dc..abbfa73da05dc 100644 --- a/pkgs/development/tools/misc/binutils/patches/2.31/disambiguate-arm-targets.patch +++ b/pkgs/development/tools/misc/binutils/disambiguate-arm-targets.patch diff --git a/pkgs/development/tools/misc/binutils/patches/2.34/no-plugins.patch b/pkgs/development/tools/misc/binutils/no-plugins.patch index 68cf51b7dd3c8..68cf51b7dd3c8 100644 --- a/pkgs/development/tools/misc/binutils/patches/2.34/no-plugins.patch +++ b/pkgs/development/tools/misc/binutils/no-plugins.patch diff --git a/pkgs/development/tools/misc/binutils/patches/2.31/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch b/pkgs/development/tools/misc/binutils/patches/2.31/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch deleted file mode 100644 index 5a047b0f0703e..0000000000000 --- a/pkgs/development/tools/misc/binutils/patches/2.31/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch +++ /dev/null @@ -1,517 +0,0 @@ -From 6737a6b34f4823deb7142f27b4074831a37ac1e1 Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" <hjl.tools@gmail.com> -Date: Fri, 20 Jul 2018 09:18:47 -0700 -Subject: [PATCH] x86: Add a GNU_PROPERTY_X86_ISA_1_USED note if needed - -When -z separate-code, which is enabled by default for Linux/x86, is -used to create executable, ld won't place any data in the code-only -PT_LOAD segment. If there are no data sections placed before the -code-only PT_LOAD segment, the program headers won't be mapped into -any PT_LOAD segment. When the executable tries to access it (based -on the program header address passed in AT_PHDR), it will lead to -segfault. This patch inserts a GNU_PROPERTY_X86_ISA_1_USED note if -there may be no data sections before the text section so that the -first PT_LOAD segment won't be code-only and will contain the program -header. - -Testcases are adjusted to either pass "-z noseparate-code" to ld or -discard the .note.gnu.property section. A Linux/x86 run-time test is -added. - -bfd/ - - PR ld/23428 - * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the - separate code program header is needed, make sure that the first - read-only PT_LOAD segment has no code by adding a - GNU_PROPERTY_X86_ISA_1_USED note. - -ld/ - - PR ld/23428 - * testsuite/ld-elf/linux-x86.S: New file. - * testsuite/ld-elf/linux-x86.exp: Likewise. - * testsuite/ld-elf/pr23428.c: Likewise. - * testsuite/ld-elf/sec64k.exp: Pass "-z noseparate-code" to ld - for Linux/x86 targets. - * testsuite/ld-i386/abs-iamcu.d: Likewise. - * testsuite/ld-i386/abs.d: Likewise. - * testsuite/ld-i386/pr12718.d: Likewise. - * testsuite/ld-i386/pr12921.d: Likewise. - * testsuite/ld-x86-64/abs-k1om.d: Likewise. - * testsuite/ld-x86-64/abs-l1om.d: Likewise. - * testsuite/ld-x86-64/abs.d: Likewise. - * testsuite/ld-x86-64/pr12718.d: Likewise. - * testsuite/ld-x86-64/pr12921.d: Likewise. - * testsuite/ld-linkonce/zeroeh.ld: Discard .note.gnu.property - section. - * testsuite/ld-scripts/print-memory-usage.t: Likewise. - * testsuite/ld-scripts/size-2.t: Likewise. - * testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Use ld - to create executable if language is "asm". - -(cherry picked from commit 241e64e3b42cd9eba514b8e0ad2ef39a337f10a5) ---- - bfd/elfxx-x86.c | 60 ++++++++++++++----- - ld/testsuite/ld-elf/linux-x86.S | 63 ++++++++++++++++++++ - ld/testsuite/ld-elf/linux-x86.exp | 46 ++++++++++++++ - ld/testsuite/ld-elf/pr23428.c | 43 +++++++++++++ - ld/testsuite/ld-elf/sec64k.exp | 2 + - ld/testsuite/ld-i386/abs-iamcu.d | 2 +- - ld/testsuite/ld-i386/abs.d | 2 +- - ld/testsuite/ld-i386/pr12718.d | 2 +- - ld/testsuite/ld-i386/pr12921.d | 2 +- - ld/testsuite/ld-linkonce/zeroeh.ld | 1 + - ld/testsuite/ld-scripts/print-memory-usage.t | 2 + - ld/testsuite/ld-scripts/size-2.t | 1 + - ld/testsuite/ld-x86-64/abs-k1om.d | 2 +- - ld/testsuite/ld-x86-64/abs-l1om.d | 2 +- - ld/testsuite/ld-x86-64/abs.d | 2 +- - ld/testsuite/ld-x86-64/pr12718.d | 2 +- - ld/testsuite/ld-x86-64/pr12921.d | 2 +- - ld/testsuite/lib/ld-lib.exp | 5 +- - 20 files changed, 248 insertions(+), 25 deletions(-) - create mode 100644 ld/testsuite/ld-elf/linux-x86.S - create mode 100644 ld/testsuite/ld-elf/linux-x86.exp - create mode 100644 ld/testsuite/ld-elf/pr23428.c - -diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c -index a2497aab86..2e4ff88f1f 100644 ---- a/bfd/elfxx-x86.c -+++ b/bfd/elfxx-x86.c -@@ -2524,6 +2524,7 @@ _bfd_x86_elf_link_setup_gnu_properties - const struct elf_backend_data *bed; - unsigned int class_align = ABI_64_P (info->output_bfd) ? 3 : 2; - unsigned int got_align; -+ bfd_boolean has_text = FALSE; - - features = 0; - if (info->ibt) -@@ -2538,24 +2539,59 @@ _bfd_x86_elf_link_setup_gnu_properties - if (bfd_get_flavour (pbfd) == bfd_target_elf_flavour - && bfd_count_sections (pbfd) != 0) - { -+ if (!has_text) -+ { -+ /* Check if there is no non-empty text section. */ -+ sec = bfd_get_section_by_name (pbfd, ".text"); -+ if (sec != NULL && sec->size != 0) -+ has_text = TRUE; -+ } -+ - ebfd = pbfd; - - if (elf_properties (pbfd) != NULL) - break; - } - -- if (ebfd != NULL && features) -+ bed = get_elf_backend_data (info->output_bfd); -+ -+ htab = elf_x86_hash_table (info, bed->target_id); -+ if (htab == NULL) -+ return pbfd; -+ -+ if (ebfd != NULL) - { -- /* If features is set, add GNU_PROPERTY_X86_FEATURE_1_IBT and -- GNU_PROPERTY_X86_FEATURE_1_SHSTK. */ -- prop = _bfd_elf_get_property (ebfd, -- GNU_PROPERTY_X86_FEATURE_1_AND, -- 4); -- prop->u.number |= features; -- prop->pr_kind = property_number; -+ prop = NULL; -+ if (features) -+ { -+ /* If features is set, add GNU_PROPERTY_X86_FEATURE_1_IBT and -+ GNU_PROPERTY_X86_FEATURE_1_SHSTK. */ -+ prop = _bfd_elf_get_property (ebfd, -+ GNU_PROPERTY_X86_FEATURE_1_AND, -+ 4); -+ prop->u.number |= features; -+ prop->pr_kind = property_number; -+ } -+ else if (has_text -+ && elf_properties (ebfd) == NULL -+ && elf_tdata (info->output_bfd)->o->build_id.sec == NULL -+ && !htab->elf.dynamic_sections_created -+ && !info->traditional_format -+ && (info->output_bfd->flags & D_PAGED) != 0 -+ && info->separate_code) -+ { -+ /* If the separate code program header is needed, make sure -+ that the first read-only PT_LOAD segment has no code by -+ adding a GNU_PROPERTY_X86_ISA_1_USED note. */ -+ prop = _bfd_elf_get_property (ebfd, -+ GNU_PROPERTY_X86_ISA_1_USED, -+ 4); -+ prop->u.number = GNU_PROPERTY_X86_ISA_1_486; -+ prop->pr_kind = property_number; -+ } - - /* Create the GNU property note section if needed. */ -- if (pbfd == NULL) -+ if (prop != NULL && pbfd == NULL) - { - sec = bfd_make_section_with_flags (ebfd, - NOTE_GNU_PROPERTY_SECTION_NAME, -@@ -2581,12 +2617,6 @@ error_alignment: - - pbfd = _bfd_elf_link_setup_gnu_properties (info); - -- bed = get_elf_backend_data (info->output_bfd); -- -- htab = elf_x86_hash_table (info, bed->target_id); -- if (htab == NULL) -- return pbfd; -- - htab->r_info = init_table->r_info; - htab->r_sym = init_table->r_sym; - -diff --git a/ld/testsuite/ld-elf/linux-x86.S b/ld/testsuite/ld-elf/linux-x86.S -new file mode 100644 -index 0000000000..bdf40c6e01 ---- /dev/null -+++ b/ld/testsuite/ld-elf/linux-x86.S -@@ -0,0 +1,63 @@ -+ .text -+ .globl _start -+ .type _start,@function -+ .p2align 4 -+_start: -+ xorl %ebp, %ebp -+#ifdef __LP64__ -+ popq %rdi -+ movq %rsp, %rsi -+ andq $~15, %rsp -+#elif defined __x86_64__ -+ mov (%rsp),%edi -+ addl $4,%esp -+ movl %esp, %esi -+ andl $~15, %esp -+#else -+ popl %esi -+ movl %esp, %ecx -+ andl $~15, %esp -+ -+ subl $8,%esp -+ pushl %ecx -+ pushl %esi -+#endif -+ -+ call main -+ -+ hlt -+ -+ .type syscall, @function -+ .globl syscall -+ .p2align 4 -+syscall: -+#ifdef __x86_64__ -+ movq %rdi, %rax /* Syscall number -> rax. */ -+ movq %rsi, %rdi /* shift arg1 - arg5. */ -+ movq %rdx, %rsi -+ movq %rcx, %rdx -+ movq %r8, %r10 -+ movq %r9, %r8 -+ movq 8(%rsp),%r9 /* arg6 is on the stack. */ -+ syscall /* Do the system call. */ -+#else -+ push %ebp -+ push %edi -+ push %esi -+ push %ebx -+ mov 0x2c(%esp),%ebp -+ mov 0x28(%esp),%edi -+ mov 0x24(%esp),%esi -+ mov 0x20(%esp),%edx -+ mov 0x1c(%esp),%ecx -+ mov 0x18(%esp),%ebx -+ mov 0x14(%esp),%eax -+ int $0x80 -+ pop %ebx -+ pop %esi -+ pop %edi -+ pop %ebp -+#endif -+ ret /* Return to caller. */ -+ .size syscall, .-syscall -+ .section .note.GNU-stack,"",@progbits -diff --git a/ld/testsuite/ld-elf/linux-x86.exp b/ld/testsuite/ld-elf/linux-x86.exp -new file mode 100644 -index 0000000000..36217c6fb4 ---- /dev/null -+++ b/ld/testsuite/ld-elf/linux-x86.exp -@@ -0,0 +1,46 @@ -+# Expect script for simple native Linux/x86 tests. -+# Copyright (C) 2018 Free Software Foundation, Inc. -+# -+# This file is part of the GNU Binutils. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 3 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, -+# MA 02110-1301, USA. -+# -+ -+# Test very simple native Linux/x86 programs with linux-x86.S. -+if { ![isnative] || [which $CC] == 0 \ -+ || (![istarget "i?86-*-linux*"] \ -+ && ![istarget "x86_64-*-linux*"] \ -+ && ![istarget "amd64-*-linux*"]) } { -+ return -+} -+ -+# Add $PLT_CFLAGS if PLT is expected. -+global PLT_CFLAGS -+# Add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if non-PIE is required. -+global NOPIE_CFLAGS NOPIE_LDFLAGS -+ -+run_ld_link_exec_tests [list \ -+ [list \ -+ "Run PR ld/23428 test" \ -+ "--no-dynamic-linker -z separate-code" \ -+ "" \ -+ { linux-x86.S pr23428.c } \ -+ "pr23428" \ -+ "pass.out" \ -+ "$NOPIE_CFLAGS -fno-asynchronous-unwind-tables" \ -+ "asm" \ -+ ] \ -+] -diff --git a/ld/testsuite/ld-elf/pr23428.c b/ld/testsuite/ld-elf/pr23428.c -new file mode 100644 -index 0000000000..3631ed7926 ---- /dev/null -+++ b/ld/testsuite/ld-elf/pr23428.c -@@ -0,0 +1,43 @@ -+#include <unistd.h> -+#include <link.h> -+#include <syscall.h> -+ -+#define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1) -+ -+int -+main (int argc, char **argv) -+{ -+ char **ev = &argv[argc + 1]; -+ char **evp = ev; -+ ElfW(auxv_t) *av; -+ const ElfW(Phdr) *phdr = NULL; -+ size_t phnum = 0; -+ size_t loadnum = 0; -+ int fd = STDOUT_FILENO; -+ size_t i; -+ -+ while (*evp++ != NULL) -+ ; -+ -+ av = (ElfW(auxv_t) *) evp; -+ -+ for (; av->a_type != AT_NULL; ++av) -+ switch (av->a_type) -+ { -+ case AT_PHDR: -+ phdr = (const void *) av->a_un.a_val; -+ break; -+ case AT_PHNUM: -+ phnum = av->a_un.a_val; -+ break; -+ } -+ -+ for (i = 0; i < phnum; i++, phdr++) -+ if (phdr->p_type == PT_LOAD) -+ loadnum++; -+ -+ syscall (SYS_write, fd, STRING_COMMA_LEN ("PASS\n")); -+ -+ syscall (SYS_exit, !loadnum); -+ return 0; -+} -diff --git a/ld/testsuite/ld-elf/sec64k.exp b/ld/testsuite/ld-elf/sec64k.exp -index b58139e9dd..3909c0eaa1 100644 ---- a/ld/testsuite/ld-elf/sec64k.exp -+++ b/ld/testsuite/ld-elf/sec64k.exp -@@ -177,6 +177,8 @@ if { ![istarget "d10v-*-*"] - foreach sfile $sfiles { puts $ofd "#source: $sfile" } - if { [istarget spu*-*-*] } { - puts $ofd "#ld: --local-store 0:0" -+ } elseif { [istarget "i?86-*-linux*"] || [istarget "x86_64-*-linux*"] } { -+ puts $ofd "#ld: -z noseparate-code" - } else { - puts $ofd "#ld:" - } -diff --git a/ld/testsuite/ld-i386/abs-iamcu.d b/ld/testsuite/ld-i386/abs-iamcu.d -index ac9beff2e5..aba7d6b03f 100644 ---- a/ld/testsuite/ld-i386/abs-iamcu.d -+++ b/ld/testsuite/ld-i386/abs-iamcu.d -@@ -2,7 +2,7 @@ - #source: abs.s - #source: zero.s - #as: --32 -march=iamcu --#ld: -m elf_iamcu -+#ld: -m elf_iamcu -z noseparate-code - #objdump: -rs -j .text - - .*: file format .* -diff --git a/ld/testsuite/ld-i386/abs.d b/ld/testsuite/ld-i386/abs.d -index e660aca524..191ee4456a 100644 ---- a/ld/testsuite/ld-i386/abs.d -+++ b/ld/testsuite/ld-i386/abs.d -@@ -2,7 +2,7 @@ - #as: --32 - #source: abs.s - #source: zero.s --#ld: -melf_i386 -+#ld: -melf_i386 -z noseparate-code - #objdump: -rs - - .*: file format .* -diff --git a/ld/testsuite/ld-i386/pr12718.d b/ld/testsuite/ld-i386/pr12718.d -index ec51540a42..7eba52d95e 100644 ---- a/ld/testsuite/ld-i386/pr12718.d -+++ b/ld/testsuite/ld-i386/pr12718.d -@@ -1,6 +1,6 @@ - #name: PR ld/12718 - #as: --32 --#ld: -melf_i386 -+#ld: -melf_i386 -z noseparate-code - #readelf: -S - - There are 5 section headers, starting at offset 0x[0-9a-f]+: -diff --git a/ld/testsuite/ld-i386/pr12921.d b/ld/testsuite/ld-i386/pr12921.d -index e49079b3c8..ea2da3eb51 100644 ---- a/ld/testsuite/ld-i386/pr12921.d -+++ b/ld/testsuite/ld-i386/pr12921.d -@@ -1,6 +1,6 @@ - #name: PR ld/12921 - #as: --32 --#ld: -melf_i386 -+#ld: -melf_i386 -z noseparate-code - #readelf: -S --wide - - There are 7 section headers, starting at offset 0x[0-9a-f]+: -diff --git a/ld/testsuite/ld-linkonce/zeroeh.ld b/ld/testsuite/ld-linkonce/zeroeh.ld -index b22eaa12c9..f89855a08f 100644 ---- a/ld/testsuite/ld-linkonce/zeroeh.ld -+++ b/ld/testsuite/ld-linkonce/zeroeh.ld -@@ -2,4 +2,5 @@ SECTIONS { - .text 0xa00 : { *(.text); *(.gnu.linkonce.t.*) } - .gcc_except_table 0x2000 : { *(.gcc_except_table) } - .eh_frame 0x4000 : { *(.eh_frame) } -+ /DISCARD/ : { *(.note.gnu.property) } - } -diff --git a/ld/testsuite/ld-scripts/print-memory-usage.t b/ld/testsuite/ld-scripts/print-memory-usage.t -index 5ff057a5e3..6eda1d2dc4 100644 ---- a/ld/testsuite/ld-scripts/print-memory-usage.t -+++ b/ld/testsuite/ld-scripts/print-memory-usage.t -@@ -11,4 +11,6 @@ SECTIONS - *(.data) - *(.rw) - } -+ -+ /DISCARD/ : { *(.note.gnu.property) } - } -diff --git a/ld/testsuite/ld-scripts/size-2.t b/ld/testsuite/ld-scripts/size-2.t -index 723863995e..c3c4eddab4 100644 ---- a/ld/testsuite/ld-scripts/size-2.t -+++ b/ld/testsuite/ld-scripts/size-2.t -@@ -18,4 +18,5 @@ SECTIONS - LONG (SIZEOF (.tdata)) - LONG (SIZEOF (.tbss)) - } :image -+ /DISCARD/ : { *(.note.gnu.property) } - } -diff --git a/ld/testsuite/ld-x86-64/abs-k1om.d b/ld/testsuite/ld-x86-64/abs-k1om.d -index 2c26639fc0..6b0fde0eed 100644 ---- a/ld/testsuite/ld-x86-64/abs-k1om.d -+++ b/ld/testsuite/ld-x86-64/abs-k1om.d -@@ -2,7 +2,7 @@ - #source: ../ld-i386/abs.s - #source: ../ld-i386/zero.s - #as: --64 -march=k1om --#ld: -m elf_k1om -+#ld: -m elf_k1om -z noseparate-code - #objdump: -rs -j .text - - .*: file format .* -diff --git a/ld/testsuite/ld-x86-64/abs-l1om.d b/ld/testsuite/ld-x86-64/abs-l1om.d -index 1fb96d44b7..f87869f9d0 100644 ---- a/ld/testsuite/ld-x86-64/abs-l1om.d -+++ b/ld/testsuite/ld-x86-64/abs-l1om.d -@@ -2,7 +2,7 @@ - #source: ../ld-i386/abs.s - #source: ../ld-i386/zero.s - #as: --64 -march=l1om --#ld: -m elf_l1om -+#ld: -m elf_l1om -z noseparate-code - #objdump: -rs -j .text - #target: x86_64-*-linux* - -diff --git a/ld/testsuite/ld-x86-64/abs.d b/ld/testsuite/ld-x86-64/abs.d -index b24b018639..d99ab4685d 100644 ---- a/ld/testsuite/ld-x86-64/abs.d -+++ b/ld/testsuite/ld-x86-64/abs.d -@@ -1,7 +1,7 @@ - #name: Absolute non-overflowing relocs - #source: ../ld-i386/abs.s - #source: ../ld-i386/zero.s --#ld: -+#ld: -z noseparate-code - #objdump: -rs - - .*: file format .* -diff --git a/ld/testsuite/ld-x86-64/pr12718.d b/ld/testsuite/ld-x86-64/pr12718.d -index 07d17325d0..2c503ffbaa 100644 ---- a/ld/testsuite/ld-x86-64/pr12718.d -+++ b/ld/testsuite/ld-x86-64/pr12718.d -@@ -1,6 +1,6 @@ - #name: PR ld/12718 - #as: --64 --#ld: -melf_x86_64 -+#ld: -melf_x86_64 -z noseparate-code - #readelf: -S --wide - - There are 5 section headers, starting at offset 0x[0-9a-f]+: -diff --git a/ld/testsuite/ld-x86-64/pr12921.d b/ld/testsuite/ld-x86-64/pr12921.d -index 6fe6abee09..1162d55818 100644 ---- a/ld/testsuite/ld-x86-64/pr12921.d -+++ b/ld/testsuite/ld-x86-64/pr12921.d -@@ -1,6 +1,6 @@ - #name: PR ld/12921 - #as: --64 --#ld: -melf_x86_64 -+#ld: -melf_x86_64 -z noseparate-code - #readelf: -S --wide - - There are 7 section headers, starting at offset 0x[0-9a-f]+: -diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp -index cfbefe9028..1095091882 100644 ---- a/ld/testsuite/lib/ld-lib.exp -+++ b/ld/testsuite/lib/ld-lib.exp -@@ -1482,7 +1482,10 @@ proc run_ld_link_exec_tests { ldtests args } { - continue - } - -- if { [ string match "c++" $lang ] } { -+ if { [ string match "asm" $lang ] } { -+ set link_proc ld_link -+ set link_cmd $ld -+ } elseif { [ string match "c++" $lang ] } { - set link_proc ld_link - set link_cmd $CXX - } else { --- -2.20.1 - diff --git a/pkgs/development/tools/misc/binutils/patches/2.31/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch b/pkgs/development/tools/misc/binutils/patches/2.31/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch deleted file mode 100644 index ca50d9a57cd15..0000000000000 --- a/pkgs/development/tools/misc/binutils/patches/2.31/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch +++ /dev/null @@ -1,137 +0,0 @@ -From 28a27bdbb9500797e6767f80c8128b09112aeed5 Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" <hjl.tools@gmail.com> -Date: Sat, 11 Aug 2018 06:41:33 -0700 -Subject: [PATCH] x86: Properly add X86_ISA_1_NEEDED property - -Existing properties may be removed during property merging. We avoid -adding X86_ISA_1_NEEDED property only if existing properties won't be -removed. - -bfd/ - - PR ld/23428 - * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't - add X86_ISA_1_NEEDED property only if existing properties won't - be removed. - -ld/ - - PR ld/23428 - * testsuite/ld-elf/dummy.s: New file. - * testsuite/ld-elf/linux-x86.S: Add X86_FEATURE_1_AND property. - * testsuite/ld-elf/linux-x86.exp: Add dummy.s to pr23428. - -(cherry picked from commit ab9e342807d132182892de1be1a92d6e91a5c1da) ---- - bfd/elfxx-x86.c | 28 ++++++++++++++++++++++------ - ld/testsuite/ld-elf/dummy.s | 1 + - ld/testsuite/ld-elf/linux-x86.S | 28 ++++++++++++++++++++++++++++ - ld/testsuite/ld-elf/linux-x86.exp | 2 +- - 6 files changed, 66 insertions(+), 7 deletions(-) - create mode 100644 ld/testsuite/ld-elf/dummy.s - -diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c -index 7ccfd25815..2d8f7b640b 100644 ---- a/bfd/elfxx-x86.c -+++ b/bfd/elfxx-x86.c -@@ -2588,7 +2588,6 @@ _bfd_x86_elf_link_setup_gnu_properties - prop->pr_kind = property_number; - } - else if (has_text -- && elf_properties (ebfd) == NULL - && elf_tdata (info->output_bfd)->o->build_id.sec == NULL - && !htab->elf.dynamic_sections_created - && !info->traditional_format -@@ -2598,11 +2597,28 @@ _bfd_x86_elf_link_setup_gnu_properties - /* If the separate code program header is needed, make sure - that the first read-only PT_LOAD segment has no code by - adding a GNU_PROPERTY_X86_ISA_1_NEEDED note. */ -- prop = _bfd_elf_get_property (ebfd, -- GNU_PROPERTY_X86_ISA_1_NEEDED, -- 4); -- prop->u.number = GNU_PROPERTY_X86_ISA_1_486; -- prop->pr_kind = property_number; -+ elf_property_list *list; -+ bfd_boolean need_property = TRUE; -+ -+ for (list = elf_properties (ebfd); list; list = list->next) -+ switch (list->property.pr_type) -+ { -+ case GNU_PROPERTY_STACK_SIZE: -+ case GNU_PROPERTY_NO_COPY_ON_PROTECTED: -+ case GNU_PROPERTY_X86_ISA_1_NEEDED: -+ /* These properties won't be removed during merging. */ -+ need_property = FALSE; -+ break; -+ } -+ -+ if (need_property) -+ { -+ prop = _bfd_elf_get_property (ebfd, -+ GNU_PROPERTY_X86_ISA_1_NEEDED, -+ 4); -+ prop->u.number = GNU_PROPERTY_X86_ISA_1_486; -+ prop->pr_kind = property_number; -+ } - } - - /* Create the GNU property note section if needed. */ -diff --git a/ld/testsuite/ld-elf/dummy.s b/ld/testsuite/ld-elf/dummy.s -new file mode 100644 -index 0000000000..403f98000d ---- /dev/null -+++ b/ld/testsuite/ld-elf/dummy.s -@@ -0,0 +1 @@ -+# Dummy -diff --git a/ld/testsuite/ld-elf/linux-x86.S b/ld/testsuite/ld-elf/linux-x86.S -index bdf40c6e01..d94abc1106 100644 ---- a/ld/testsuite/ld-elf/linux-x86.S -+++ b/ld/testsuite/ld-elf/linux-x86.S -@@ -61,3 +61,31 @@ syscall: - ret /* Return to caller. */ - .size syscall, .-syscall - .section .note.GNU-stack,"",@progbits -+ -+ .section ".note.gnu.property", "a" -+#ifdef __LP64__ -+ .p2align 3 -+#else -+ .p2align 2 -+#endif -+ .long 1f - 0f /* name length */ -+ .long 5f - 2f /* data length */ -+ .long 5 /* note type */ -+0: .asciz "GNU" /* vendor name */ -+1: -+#ifdef __LP64__ -+ .p2align 3 -+#else -+ .p2align 2 -+#endif -+2: .long 0xc0000002 /* pr_type. */ -+ .long 4f - 3f /* pr_datasz. */ -+3: -+ .long 0x2 -+4: -+#ifdef __LP64__ -+ .p2align 3 -+#else -+ .p2align 2 -+#endif -+5: -diff --git a/ld/testsuite/ld-elf/linux-x86.exp b/ld/testsuite/ld-elf/linux-x86.exp -index 36217c6fb4..f6f5a80853 100644 ---- a/ld/testsuite/ld-elf/linux-x86.exp -+++ b/ld/testsuite/ld-elf/linux-x86.exp -@@ -37,7 +37,7 @@ run_ld_link_exec_tests [list \ - "Run PR ld/23428 test" \ - "--no-dynamic-linker -z separate-code" \ - "" \ -- { linux-x86.S pr23428.c } \ -+ { linux-x86.S pr23428.c dummy.s } \ - "pr23428" \ - "pass.out" \ - "$NOPIE_CFLAGS -fno-asynchronous-unwind-tables" \ --- -2.20.1 - diff --git a/pkgs/development/tools/misc/binutils/patches/2.31/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch b/pkgs/development/tools/misc/binutils/patches/2.31/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch deleted file mode 100644 index 866d6db8ce24d..0000000000000 --- a/pkgs/development/tools/misc/binutils/patches/2.31/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch +++ /dev/null @@ -1,583 +0,0 @@ -From d55c3e36094f06bb1fb02f5eac19fdccf1d91f7e Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" <hjl.tools@gmail.com> -Date: Wed, 8 Aug 2018 06:09:15 -0700 -Subject: [PATCH] x86: Properly merge GNU_PROPERTY_X86_ISA_1_USED -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Without the GNU_PROPERTY_X86_ISA_1_USED property, all ISAs may be used. -If a bit in the GNU_PROPERTY_X86_ISA_1_USED property is unset, the -corresponding x86 instruction set isn’t used. When merging properties -from 2 input files and one input file doesn't have the -GNU_PROPERTY_X86_ISA_1_USED property, the output file shouldn't have -it neither. This patch removes the GNU_PROPERTY_X86_ISA_1_USED -property if an input file doesn't have it. - -This patch replaces the GNU_PROPERTY_X86_ISA_1_USED property with the -GNU_PROPERTY_X86_ISA_1_NEEDED property which is the minimum ISA -requirement. - -bfd/ - - PR ld/23486 - * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove - GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it. - (_bfd_x86_elf_link_setup_gnu_properties): Adding the - GNU_PROPERTY_X86_ISA_1_NEEDED, instead of - GNU_PROPERTY_X86_ISA_1_USED, property. - -ld/ - - PR ld/23486 - * testsuite/ld-i386/i386.exp: Run PR ld/23486 tests. - * testsuite/ld-x86-64/x86-64.exp: Likewise. - * testsuite/ld-i386/pr23486a.d: New file. - * testsuite/ld-i386/pr23486b.d: Likewise. - * testsuite/ld-x86-64/pr23486a-x32.d: Likewise. - * testsuite/ld-x86-64/pr23486a.d: Likewise. - * testsuite/ld-x86-64/pr23486a.s: Likewise. - * testsuite/ld-x86-64/pr23486b-x32.d: Likewise. - * testsuite/ld-x86-64/pr23486b.d: Likewise. - * testsuite/ld-x86-64/pr23486b.s: Likewise. - * testsuite/ld-i386/property-3.r: Remove "x86 ISA used". - * testsuite/ld-i386/property-4.r: Likewise. - * testsuite/ld-i386/property-5.r: Likewise. - * testsuite/ld-i386/property-x86-ibt3a.d: Likewise. - * testsuite/ld-i386/property-x86-ibt3b.d: Likewise. - * testsuite/ld-i386/property-x86-shstk3a.d: Likewise. - * testsuite/ld-i386/property-x86-shstk3b.d: Likewise. - * testsuite/ld-x86-64/property-3.r: Likewise. - * testsuite/ld-x86-64/property-4.r: Likewise. - * testsuite/ld-x86-64/property-5.r: Likewise. - * testsuite/ld-x86-64/property-x86-ibt3a-x32.d: Likewise. - * testsuite/ld-x86-64/property-x86-ibt3a.d: Likewise. - * testsuite/ld-x86-64/property-x86-ibt3b-x32.d: Likewise. - * testsuite/ld-x86-64/property-x86-ibt3b.d: Likewise. - * testsuite/ld-x86-64/property-x86-shstk3a-x32.d: Likewise. - * testsuite/ld-x86-64/property-x86-shstk3a.d: Likewise. - * testsuite/ld-x86-64/property-x86-shstk3b-x32.d: Likewise. - * testsuite/ld-x86-64/property-x86-shstk3b.d: Likewise. - -(cherry picked from commit f7309df20c4e787041cedc4a6aced89c15259e54) ---- - bfd/elfxx-x86.c | 25 ++++++++++++--- - ld/testsuite/ld-i386/i386.exp | 2 ++ - ld/testsuite/ld-i386/pr23486a.d | 10 ++++++ - ld/testsuite/ld-i386/pr23486b.d | 10 ++++++ - ld/testsuite/ld-i386/property-3.r | 1 - - ld/testsuite/ld-i386/property-4.r | 1 - - ld/testsuite/ld-i386/property-5.r | 1 - - ld/testsuite/ld-i386/property-x86-ibt3a.d | 5 ++- - ld/testsuite/ld-i386/property-x86-ibt3b.d | 5 ++- - ld/testsuite/ld-i386/property-x86-shstk3a.d | 5 ++- - ld/testsuite/ld-i386/property-x86-shstk3b.d | 5 ++- - ld/testsuite/ld-x86-64/pr23486a-x32.d | 10 ++++++ - ld/testsuite/ld-x86-64/pr23486a.d | 10 ++++++ - ld/testsuite/ld-x86-64/pr23486a.s | 30 +++++++++++++++++ - ld/testsuite/ld-x86-64/pr23486b-x32.d | 10 ++++++ - ld/testsuite/ld-x86-64/pr23486b.d | 10 ++++++ - ld/testsuite/ld-x86-64/pr23486b.s | 30 +++++++++++++++++ - ld/testsuite/ld-x86-64/property-3.r | 1 - - ld/testsuite/ld-x86-64/property-4.r | 1 - - ld/testsuite/ld-x86-64/property-5.r | 1 - - .../ld-x86-64/property-x86-ibt3a-x32.d | 5 ++- - ld/testsuite/ld-x86-64/property-x86-ibt3a.d | 5 ++- - .../ld-x86-64/property-x86-ibt3b-x32.d | 5 ++- - ld/testsuite/ld-x86-64/property-x86-ibt3b.d | 5 ++- - .../ld-x86-64/property-x86-shstk3a-x32.d | 5 ++- - ld/testsuite/ld-x86-64/property-x86-shstk3a.d | 5 ++- - .../ld-x86-64/property-x86-shstk3b-x32.d | 5 ++- - ld/testsuite/ld-x86-64/property-x86-shstk3b.d | 5 ++- - ld/testsuite/ld-x86-64/x86-64.exp | 4 +++ - 31 files changed, 211 insertions(+), 47 deletions(-) - create mode 100644 ld/testsuite/ld-i386/pr23486a.d - create mode 100644 ld/testsuite/ld-i386/pr23486b.d - create mode 100644 ld/testsuite/ld-x86-64/pr23486a-x32.d - create mode 100644 ld/testsuite/ld-x86-64/pr23486a.d - create mode 100644 ld/testsuite/ld-x86-64/pr23486a.s - create mode 100644 ld/testsuite/ld-x86-64/pr23486b-x32.d - create mode 100644 ld/testsuite/ld-x86-64/pr23486b.d - create mode 100644 ld/testsuite/ld-x86-64/pr23486b.s - ---- a/bfd/elfxx-x86.c -+++ b/bfd/elfxx-x86.c -@@ -2407,12 +2407,27 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info, - switch (pr_type) - { - case GNU_PROPERTY_X86_ISA_1_USED: -+ if (aprop == NULL || bprop == NULL) -+ { -+ /* Only one of APROP and BPROP can be NULL. */ -+ if (aprop != NULL) -+ { -+ /* Remove this property since the other input file doesn't -+ have it. */ -+ aprop->pr_kind = property_remove; -+ updated = TRUE; -+ } -+ break; -+ } -+ goto or_property; -+ - case GNU_PROPERTY_X86_ISA_1_NEEDED: - if (aprop != NULL && bprop != NULL) - { -+or_property: - number = aprop->u.number; - aprop->u.number = number | bprop->u.number; -- /* Remove the property if ISA bits are empty. */ -+ /* Remove the property if all bits are empty. */ - if (aprop->u.number == 0) - { - aprop->pr_kind = property_remove; -@@ -2428,14 +2443,14 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info, - { - if (aprop->u.number == 0) - { -- /* Remove APROP if ISA bits are empty. */ -+ /* Remove APROP if all bits are empty. */ - aprop->pr_kind = property_remove; - updated = TRUE; - } - } - else - { -- /* Return TRUE if APROP is NULL and ISA bits of BPROP -+ /* Return TRUE if APROP is NULL and all bits of BPROP - aren't empty to indicate that BPROP should be added - to ABFD. */ - updated = bprop->u.number != 0; -@@ -2582,9 +2597,9 @@ _bfd_x86_elf_link_setup_gnu_properties - { - /* If the separate code program header is needed, make sure - that the first read-only PT_LOAD segment has no code by -- adding a GNU_PROPERTY_X86_ISA_1_USED note. */ -+ adding a GNU_PROPERTY_X86_ISA_1_NEEDED note. */ - prop = _bfd_elf_get_property (ebfd, -- GNU_PROPERTY_X86_ISA_1_USED, -+ GNU_PROPERTY_X86_ISA_1_NEEDED, - 4); - prop->u.number = GNU_PROPERTY_X86_ISA_1_486; - prop->pr_kind = property_number; -diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp -index 6d794fe653..78dad02579 100644 ---- a/ld/testsuite/ld-i386/i386.exp -+++ b/ld/testsuite/ld-i386/i386.exp -@@ -462,6 +462,8 @@ run_dump_test "pr23189" - run_dump_test "pr23194" - run_dump_test "pr23372a" - run_dump_test "pr23372b" -+run_dump_test "pr23486a" -+run_dump_test "pr23486b" - - if { !([istarget "i?86-*-linux*"] - || [istarget "i?86-*-gnu*"] -diff --git a/ld/testsuite/ld-i386/pr23486a.d b/ld/testsuite/ld-i386/pr23486a.d -new file mode 100644 -index 0000000000..41a6dcf7d5 ---- /dev/null -+++ b/ld/testsuite/ld-i386/pr23486a.d -@@ -0,0 +1,10 @@ -+#source: ../ld-x86-64/pr23486a.s -+#source: ../ld-x86-64/pr23486b.s -+#as: --32 -+#ld: -r -m elf_i386 -+#readelf: -n -+ -+Displaying notes found in: .note.gnu.property -+ Owner Data size Description -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586 -diff --git a/ld/testsuite/ld-i386/pr23486b.d b/ld/testsuite/ld-i386/pr23486b.d -new file mode 100644 -index 0000000000..08019b7274 ---- /dev/null -+++ b/ld/testsuite/ld-i386/pr23486b.d -@@ -0,0 +1,10 @@ -+#source: ../ld-x86-64/pr23486b.s -+#source: ../ld-x86-64/pr23486a.s -+#as: --32 -+#ld: -r -m elf_i386 -+#readelf: -n -+ -+Displaying notes found in: .note.gnu.property -+ Owner Data size Description -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586 -diff --git a/ld/testsuite/ld-i386/property-3.r b/ld/testsuite/ld-i386/property-3.r -index 0ed91f5922..d03203c1e5 100644 ---- a/ld/testsuite/ld-i386/property-3.r -+++ b/ld/testsuite/ld-i386/property-3.r -@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property - Owner Data size Description - GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 - Properties: stack size: 0x800000 -- x86 ISA used: 586, SSE - x86 ISA needed: i486, 586 - #pass -diff --git a/ld/testsuite/ld-i386/property-4.r b/ld/testsuite/ld-i386/property-4.r -index cb2bc15d9a..da295eb6c7 100644 ---- a/ld/testsuite/ld-i386/property-4.r -+++ b/ld/testsuite/ld-i386/property-4.r -@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property - Owner Data size Description - GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 - Properties: stack size: 0x800000 -- x86 ISA used: i486, 586, SSE - x86 ISA needed: i486, 586, SSE - #pass -diff --git a/ld/testsuite/ld-i386/property-5.r b/ld/testsuite/ld-i386/property-5.r -index 552965058c..e4141594b3 100644 ---- a/ld/testsuite/ld-i386/property-5.r -+++ b/ld/testsuite/ld-i386/property-5.r -@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property - Owner Data size Description - GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 - Properties: stack size: 0x900000 -- x86 ISA used: i486, 586, SSE - x86 ISA needed: i486, 586, SSE - #pass -diff --git a/ld/testsuite/ld-i386/property-x86-ibt3a.d b/ld/testsuite/ld-i386/property-x86-ibt3a.d -index 4bb35b00fb..0aedea1614 100644 ---- a/ld/testsuite/ld-i386/property-x86-ibt3a.d -+++ b/ld/testsuite/ld-i386/property-x86-ibt3a.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: i486, 586, SSE2, SSE3 -- x86 ISA needed: 586, SSE, SSE3, SSE4_1 -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1 -diff --git a/ld/testsuite/ld-i386/property-x86-ibt3b.d b/ld/testsuite/ld-i386/property-x86-ibt3b.d -index 418d58a8f7..bd69ac6478 100644 ---- a/ld/testsuite/ld-i386/property-x86-ibt3b.d -+++ b/ld/testsuite/ld-i386/property-x86-ibt3b.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: i486, 586, SSE2, SSE3 -- x86 ISA needed: 586, SSE, SSE3, SSE4_1 -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1 -diff --git a/ld/testsuite/ld-i386/property-x86-shstk3a.d b/ld/testsuite/ld-i386/property-x86-shstk3a.d -index e261038f60..76d2a39f2c 100644 ---- a/ld/testsuite/ld-i386/property-x86-shstk3a.d -+++ b/ld/testsuite/ld-i386/property-x86-shstk3a.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: i486, 586, SSE2, SSE3 -- x86 ISA needed: 586, SSE, SSE3, SSE4_1 -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1 -diff --git a/ld/testsuite/ld-i386/property-x86-shstk3b.d b/ld/testsuite/ld-i386/property-x86-shstk3b.d -index 25f3d2361e..e770ecffa5 100644 ---- a/ld/testsuite/ld-i386/property-x86-shstk3b.d -+++ b/ld/testsuite/ld-i386/property-x86-shstk3b.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: i486, 586, SSE2, SSE3 -- x86 ISA needed: 586, SSE, SSE3, SSE4_1 -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1 -diff --git a/ld/testsuite/ld-x86-64/pr23486a-x32.d b/ld/testsuite/ld-x86-64/pr23486a-x32.d -new file mode 100644 -index 0000000000..6d9fa68cdb ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr23486a-x32.d -@@ -0,0 +1,10 @@ -+#source: pr23486a.s -+#source: pr23486b.s -+#as: --x32 -+#ld: -r -m elf32_x86_64 -+#readelf: -n -+ -+Displaying notes found in: .note.gnu.property -+ Owner Data size Description -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586 -diff --git a/ld/testsuite/ld-x86-64/pr23486a.d b/ld/testsuite/ld-x86-64/pr23486a.d -new file mode 100644 -index 0000000000..dc2b7bf760 ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr23486a.d -@@ -0,0 +1,10 @@ -+#source: pr23486a.s -+#source: pr23486b.s -+#as: --64 -defsym __64_bit__=1 -+#ld: -r -m elf_x86_64 -+#readelf: -n -+ -+Displaying notes found in: .note.gnu.property -+ Owner Data size Description -+ GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586 -diff --git a/ld/testsuite/ld-x86-64/pr23486a.s b/ld/testsuite/ld-x86-64/pr23486a.s -new file mode 100644 -index 0000000000..a07d0c7ced ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr23486a.s -@@ -0,0 +1,30 @@ -+ .section ".note.gnu.property", "a" -+.ifdef __64_bit__ -+ .p2align 3 -+.else -+ .p2align 2 -+.endif -+ .long 1f - 0f /* name length. */ -+ .long 4f - 1f /* data length. */ -+ /* NT_GNU_PROPERTY_TYPE_0 */ -+ .long 5 /* note type. */ -+0: -+ .asciz "GNU" /* vendor name. */ -+1: -+.ifdef __64_bit__ -+ .p2align 3 -+.else -+ .p2align 2 -+.endif -+ /* GNU_PROPERTY_X86_ISA_1_USED */ -+ .long 0xc0000000 /* pr_type. */ -+ .long 3f - 2f /* pr_datasz. */ -+2: -+ .long 0xa -+3: -+.ifdef __64_bit__ -+ .p2align 3 -+.else -+ .p2align 2 -+.endif -+4: -diff --git a/ld/testsuite/ld-x86-64/pr23486b-x32.d b/ld/testsuite/ld-x86-64/pr23486b-x32.d -new file mode 100644 -index 0000000000..0445e69d82 ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr23486b-x32.d -@@ -0,0 +1,10 @@ -+#source: pr23486b.s -+#source: pr23486a.s -+#as: --x32 -+#ld: -r -m elf32_x86_64 -+#readelf: -n -+ -+Displaying notes found in: .note.gnu.property -+ Owner Data size Description -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586 -diff --git a/ld/testsuite/ld-x86-64/pr23486b.d b/ld/testsuite/ld-x86-64/pr23486b.d -new file mode 100644 -index 0000000000..dc2b7bf760 ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr23486b.d -@@ -0,0 +1,10 @@ -+#source: pr23486a.s -+#source: pr23486b.s -+#as: --64 -defsym __64_bit__=1 -+#ld: -r -m elf_x86_64 -+#readelf: -n -+ -+Displaying notes found in: .note.gnu.property -+ Owner Data size Description -+ GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586 -diff --git a/ld/testsuite/ld-x86-64/pr23486b.s b/ld/testsuite/ld-x86-64/pr23486b.s -new file mode 100644 -index 0000000000..c5167eeb65 ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr23486b.s -@@ -0,0 +1,30 @@ -+ .section ".note.gnu.property", "a" -+.ifdef __64_bit__ -+ .p2align 3 -+.else -+ .p2align 2 -+.endif -+ .long 1f - 0f /* name length. */ -+ .long 4f - 1f /* data length. */ -+ /* NT_GNU_PROPERTY_TYPE_0 */ -+ .long 5 /* note type. */ -+0: -+ .asciz "GNU" /* vendor name. */ -+1: -+.ifdef __64_bit__ -+ .p2align 3 -+.else -+ .p2align 2 -+.endif -+ /* GNU_PROPERTY_X86_ISA_1_NEEDED */ -+ .long 0xc0000001 /* pr_type. */ -+ .long 3f - 2f /* pr_datasz. */ -+2: -+ .long 0x3 -+3: -+.ifdef __64_bit__ -+ .p2align 3 -+.else -+ .p2align 2 -+.endif -+4: -diff --git a/ld/testsuite/ld-x86-64/property-3.r b/ld/testsuite/ld-x86-64/property-3.r -index 0ed91f5922..d03203c1e5 100644 ---- a/ld/testsuite/ld-x86-64/property-3.r -+++ b/ld/testsuite/ld-x86-64/property-3.r -@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property - Owner Data size Description - GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 - Properties: stack size: 0x800000 -- x86 ISA used: 586, SSE - x86 ISA needed: i486, 586 - #pass -diff --git a/ld/testsuite/ld-x86-64/property-4.r b/ld/testsuite/ld-x86-64/property-4.r -index cb2bc15d9a..da295eb6c7 100644 ---- a/ld/testsuite/ld-x86-64/property-4.r -+++ b/ld/testsuite/ld-x86-64/property-4.r -@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property - Owner Data size Description - GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 - Properties: stack size: 0x800000 -- x86 ISA used: i486, 586, SSE - x86 ISA needed: i486, 586, SSE - #pass -diff --git a/ld/testsuite/ld-x86-64/property-5.r b/ld/testsuite/ld-x86-64/property-5.r -index 552965058c..e4141594b3 100644 ---- a/ld/testsuite/ld-x86-64/property-5.r -+++ b/ld/testsuite/ld-x86-64/property-5.r -@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property - Owner Data size Description - GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 - Properties: stack size: 0x900000 -- x86 ISA used: i486, 586, SSE - x86 ISA needed: i486, 586, SSE - #pass -diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d b/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d -index 011426f5a4..4cec728dc7 100644 ---- a/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d -+++ b/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 -- x86 ISA needed: i486, 586, SSE2, SSE3 -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 -diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3a.d b/ld/testsuite/ld-x86-64/property-x86-ibt3a.d -index 1b4229a037..a8df49a351 100644 ---- a/ld/testsuite/ld-x86-64/property-x86-ibt3a.d -+++ b/ld/testsuite/ld-x86-64/property-x86-ibt3a.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 -- x86 ISA needed: i486, 586, SSE2, SSE3 -+ GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 -diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d b/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d -index 290ed6abf1..c112626711 100644 ---- a/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d -+++ b/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 -- x86 ISA needed: i486, 586, SSE2, SSE3 -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 -diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3b.d b/ld/testsuite/ld-x86-64/property-x86-ibt3b.d -index 1142e03272..f10dffdc2c 100644 ---- a/ld/testsuite/ld-x86-64/property-x86-ibt3b.d -+++ b/ld/testsuite/ld-x86-64/property-x86-ibt3b.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 -- x86 ISA needed: i486, 586, SSE2, SSE3 -+ GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 -diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d b/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d -index 819542d181..0147a3c7b6 100644 ---- a/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d -+++ b/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 -- x86 ISA needed: i486, 586, SSE2, SSE3 -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 -diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3a.d b/ld/testsuite/ld-x86-64/property-x86-shstk3a.d -index 4c5d0e0a18..1f8c2dc929 100644 ---- a/ld/testsuite/ld-x86-64/property-x86-shstk3a.d -+++ b/ld/testsuite/ld-x86-64/property-x86-shstk3a.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 -- x86 ISA needed: i486, 586, SSE2, SSE3 -+ GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 -diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d b/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d -index ba181e0bc5..7ca2539ca5 100644 ---- a/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d -+++ b/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 -- x86 ISA needed: i486, 586, SSE2, SSE3 -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 -diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3b.d b/ld/testsuite/ld-x86-64/property-x86-shstk3b.d -index 5216f385dd..f66a40e449 100644 ---- a/ld/testsuite/ld-x86-64/property-x86-shstk3b.d -+++ b/ld/testsuite/ld-x86-64/property-x86-shstk3b.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 -- x86 ISA needed: i486, 586, SSE2, SSE3 -+ GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 -diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp -index 6edb9e86f4..ae21e554ad 100644 ---- a/ld/testsuite/ld-x86-64/x86-64.exp -+++ b/ld/testsuite/ld-x86-64/x86-64.exp -@@ -403,6 +403,10 @@ run_dump_test "pr23372a" - run_dump_test "pr23372a-x32" - run_dump_test "pr23372b" - run_dump_test "pr23372b-x32" -+run_dump_test "pr23486a" -+run_dump_test "pr23486a-x32" -+run_dump_test "pr23486b" -+run_dump_test "pr23486b-x32" - - if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} { - return --- -2.20.1 - diff --git a/pkgs/development/tools/misc/binutils/patches/2.31/build-components-separately.patch b/pkgs/development/tools/misc/binutils/patches/2.31/build-components-separately.patch deleted file mode 100644 index d3cd0d2131ccb..0000000000000 --- a/pkgs/development/tools/misc/binutils/patches/2.31/build-components-separately.patch +++ /dev/null @@ -1,178 +0,0 @@ -From bc09a9236f67e710d545ac11bcdac7b55dbcc1a0 Mon Sep 17 00:00:00 2001 -From: John Ericson <John.Ericson@Obsidian.Systems> -Date: Thu, 12 Oct 2017 11:16:57 -0400 -Subject: [PATCH] Build components separately - ---- - bfd/configure.ac | 18 +++--------------- - opcodes/Makefile.am | 17 +++++++++++++---- - opcodes/configure.ac | 45 ++++++--------------------------------------- - 3 files changed, 22 insertions(+), 58 deletions(-) - -diff --git a/bfd/configure.ac b/bfd/configure.ac -index 9a183c1628..8728837384 100644 ---- a/bfd/configure.ac -+++ b/bfd/configure.ac -@@ -241,31 +241,19 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, - - LT_LIB_M - --# When building a shared libbfd, link against the pic version of libiberty --# so that apps that use libbfd won't need libiberty just to satisfy any --# libbfd references. --# We can't do that if a pic libiberty is unavailable since including non-pic --# code would insert text relocations into libbfd. - SHARED_LIBADD= --SHARED_LDFLAGS= -+SHARED_LDFLAGS=-liberty - if test "$enable_shared" = "yes"; then --changequote(,)dnl -- x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` --changequote([,])dnl -- if test -n "$x"; then -- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" -- fi -- - # More hacks to build DLLs on Windows. - case "${host}" in - *-*-cygwin*) - SHARED_LDFLAGS="-no-undefined" -- SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" -+ SHARED_LIBADD="-liberty -lintl -lcygwin -lkernel32" - ;; - - # Hack to build or1k-src on OSX - or1k*-*-darwin*) -- SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl" -+ SHARED_LIBADD="-liberty -lintl" - ;; - esac - -diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am -index 925e7ff651..47b395c195 100644 ---- a/opcodes/Makefile.am -+++ b/opcodes/Makefile.am -@@ -52,7 +52,7 @@ libopcodes_la_LDFLAGS += -rpath $(rpath_bfdlibdir) - endif - - # This is where bfd.h lives. --BFD_H = ../bfd/bfd.h -+BFD_H = $(BFDDIR)/bfd.h - - BUILD_LIBS = @BUILD_LIBS@ - BUILD_LIB_DEPS = @BUILD_LIB_DEPS@ -@@ -303,7 +303,7 @@ OFILES = @BFD_MACHINES@ - # development.sh is used to determine -Werror default. - CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh - --AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@ -+AM_CPPFLAGS = -I. -I$(srcdir) -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@ - - disassemble.lo: disassemble.c - if am__fastdepCC -@@ -324,12 +324,21 @@ libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c - # old version of libbfd, or to pick up libbfd for the wrong architecture - # if host != build. So for building with shared libraries we use a - # hardcoded path to libbfd.so instead of relying on the entries in libbfd.la. --libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@ -+libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@ libtool-soversion - libopcodes_la_LIBADD = $(OFILES) @SHARED_LIBADD@ --libopcodes_la_LDFLAGS += -release `cat ../bfd/libtool-soversion` @SHARED_LDFLAGS@ -+libopcodes_la_LDFLAGS += -release `cat libtool-soversion` @SHARED_LDFLAGS@ - # Allow dependency tracking to work on all the source files. - EXTRA_libopcodes_la_SOURCES = $(LIBOPCODES_CFILES) - -+libtool-soversion: -+ @echo "creating $@" -+ bfd_soversion="$(VERSION)" ;\ -+ . $(BFDDIR)/development.sh ;\ -+ if test "$$development" = true ; then \ -+ bfd_soversion="$(VERSION).$${bfd_version_date}" ;\ -+ fi ;\ -+ echo "$${bfd_soversion}" > $@ -+ - # libtool will build .libs/libopcodes.a. We create libopcodes.a in - # the build directory so that we don't have to convert all the - # programs that use libopcodes.a simultaneously. This is a hack which -diff --git a/opcodes/configure.ac b/opcodes/configure.ac -index b9f5eb8a4f..ef2c2152b7 100644 ---- a/opcodes/configure.ac -+++ b/opcodes/configure.ac -@@ -89,6 +89,7 @@ AC_PROG_INSTALL - - AC_CHECK_HEADERS(string.h strings.h stdlib.h limits.h) - ACX_HEADER_STRING -+GCC_HEADER_STDINT(bfd_stdint.h) - - AC_CHECK_DECLS([basename, stpcpy]) - -@@ -134,61 +135,27 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, - - LT_LIB_M - --#Libs for generator progs --if test "x$cross_compiling" = "xno"; then -- BUILD_LIBS=../libiberty/libiberty.a -- BUILD_LIB_DEPS=$BUILD_LIBS --else -- # if cross-compiling, assume that the system provides -liberty -- # and that the version is compatible with new headers. -- BUILD_LIBS=-liberty -- BUILD_LIB_DEPS= --fi --BUILD_LIBS="$BUILD_LIBS $LIBINTL" --BUILD_LIB_DEPS="$BUILD_LIB_DEPS $LIBINTL_DEP" -+BUILD_LIBS="-liberty $LIBINTL" -+BUILD_LIB_DEPS="$LIBINTL_DEP" - - AC_SUBST(BUILD_LIBS) - AC_SUBST(BUILD_LIB_DEPS) - - # Horrible hacks to build DLLs on Windows and a shared library elsewhere. - SHARED_LDFLAGS= --SHARED_LIBADD= -+SHARED_LIBADD=-liberty - SHARED_DEPENDENCIES= - if test "$enable_shared" = "yes"; then --# When building a shared libopcodes, link against the pic version of libiberty --# so that apps that use libopcodes won't need libiberty just to satisfy any --# libopcodes references. --# We can't do that if a pic libiberty is unavailable since including non-pic --# code would insert text relocations into libopcodes. - # Note that linking against libbfd as we do here, which is itself linked - # against libiberty, may not satisfy all the libopcodes libiberty references - # since libbfd may not pull in the entirety of libiberty. --changequote(,)dnl -- x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` --changequote([,])dnl -- if test -n "$x"; then -- SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" -- fi -- - case "${host}" in - *-*-cygwin*) - SHARED_LDFLAGS="-no-undefined" -- SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin" -+ SHARED_LIBADD="-lbfd -liberty -lintl -lcygwin" - ;; -- *-*-darwin*) -- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib ${SHARED_LIBADD}" -- SHARED_DEPENDENCIES="../bfd/libbfd.la" -- ;; - *) -- case "$host_vendor" in -- hp) -- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl ${SHARED_LIBADD}" -- ;; -- *) -- SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so ${SHARED_LIBADD}" -- ;; -- esac -- SHARED_DEPENDENCIES="../bfd/libbfd.la" -+ SHARED_LIBADD="-lbfd ${SHARED_LIBADD}" - ;; - esac - --- -2.14.2 - diff --git a/pkgs/development/tools/misc/binutils/patches/2.31/gold-symbol-visibility.patch b/pkgs/development/tools/misc/binutils/patches/2.31/gold-symbol-visibility.patch deleted file mode 100644 index 0fb05a482d1cc..0000000000000 --- a/pkgs/development/tools/misc/binutils/patches/2.31/gold-symbol-visibility.patch +++ /dev/null @@ -1,79 +0,0 @@ -commit 8564af037f5c4c6d2744a89497691359205b2bbc -Author: Shea Levy <shea@shealevy.com> -Date: Mon Mar 19 10:52:40 2018 -0400 - - Revert "Allow multiply-defined absolute symbols when they have the same value." - - This reverts commit 5dc824ed42cd173c1525f5abc76f4091f11a4dbc. - -diff --git a/gold/ChangeLog-2017 b/gold/ChangeLog-2017 -index b2a47710b5..d7ca1b48c0 100644 ---- a/gold/ChangeLog-2017 -+++ b/gold/ChangeLog-2017 -@@ -114,11 +114,6 @@ - (localedir): Define as @localedir@. - (gnulocaledir, gettextsrcdir): Use @datarootdir@. - --2017-11-28 Cary Coutant <ccoutant@gmail.com> -- -- * resolve.cc (Symbol_table::resolve): Allow multiply-defined absolute -- symbols when they have the same value. -- - 2017-11-28 Cary Coutant <ccoutant@gmail.com> - - * object.h (class Sized_relobj_file): Remove discarded_eh_frame_shndx_. -diff --git a/gold/resolve.cc b/gold/resolve.cc -index 4a5784cf8b..803576bfed 100644 ---- a/gold/resolve.cc -+++ b/gold/resolve.cc -@@ -247,28 +247,18 @@ Symbol_table::resolve(Sized_symbol<size>* to, - Object* object, const char* version, - bool is_default_version) - { -- bool to_is_ordinary; -- const unsigned int to_shndx = to->shndx(&to_is_ordinary); -- - // It's possible for a symbol to be defined in an object file - // using .symver to give it a version, and for there to also be - // a linker script giving that symbol the same version. We - // don't want to give a multiple-definition error for this - // harmless redefinition. -+ bool to_is_ordinary; - if (to->source() == Symbol::FROM_OBJECT - && to->object() == object -- && to->is_defined() - && is_ordinary -+ && to->is_defined() -+ && to->shndx(&to_is_ordinary) == st_shndx - && to_is_ordinary -- && to_shndx == st_shndx -- && to->value() == sym.get_st_value()) -- return; -- -- // Likewise for an absolute symbol defined twice with the same value. -- if (!is_ordinary -- && st_shndx == elfcpp::SHN_ABS -- && !to_is_ordinary -- && to_shndx == elfcpp::SHN_ABS - && to->value() == sym.get_st_value()) - return; - -@@ -360,8 +350,8 @@ Symbol_table::resolve(Sized_symbol<size>* to, - && (sym.get_st_bind() == elfcpp::STB_WEAK - || to->binding() == elfcpp::STB_WEAK) - && orig_st_shndx != elfcpp::SHN_UNDEF -+ && to->shndx(&to_is_ordinary) != elfcpp::SHN_UNDEF - && to_is_ordinary -- && to_shndx != elfcpp::SHN_UNDEF - && sym.get_st_size() != 0 // Ignore weird 0-sized symbols. - && to->symsize() != 0 - && (sym.get_st_type() != to->type() -@@ -372,7 +362,7 @@ Symbol_table::resolve(Sized_symbol<size>* to, - { - Symbol_location fromloc - = { object, orig_st_shndx, static_cast<off_t>(sym.get_st_value()) }; -- Symbol_location toloc = { to->object(), to_shndx, -+ Symbol_location toloc = { to->object(), to->shndx(&to_is_ordinary), - static_cast<off_t>(to->value()) }; - this->candidate_odr_violations_[to->name()].insert(fromloc); - this->candidate_odr_violations_[to->name()].insert(toloc); diff --git a/pkgs/development/tools/misc/binutils/patches/2.31/no-plugins.patch b/pkgs/development/tools/misc/binutils/patches/2.31/no-plugins.patch deleted file mode 100644 index 9624b7976b70f..0000000000000 --- a/pkgs/development/tools/misc/binutils/patches/2.31/no-plugins.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -ru binutils-2.27-orig/bfd/plugin.c binutils-2.27/bfd/plugin.c ---- binutils-2.27-orig/bfd/plugin.c 2016-10-14 17:46:30.791315555 +0200 -+++ binutils-2.27/bfd/plugin.c 2016-10-14 17:46:38.583298765 +0200 -@@ -333,6 +333,7 @@ - if (plugin_program_name == NULL) - return found; - -+#if 0 - plugin_dir = concat (BINDIR, "/../lib/bfd-plugins", NULL); - p = make_relative_prefix (plugin_program_name, - BINDIR, -@@ -364,6 +365,7 @@ - free (p); - if (d) - closedir (d); -+#endif - - return found; - } diff --git a/pkgs/development/tools/misc/binutils/patches/2.34/always-search-rpath.patch b/pkgs/development/tools/misc/binutils/patches/2.34/always-search-rpath.patch deleted file mode 100644 index 2e9956e6b6e45..0000000000000 --- a/pkgs/development/tools/misc/binutils/patches/2.34/always-search-rpath.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/ld/genscripts.sh b/ld/genscripts.sh -index b6940d376d..0feb1adfd0 100755 ---- a/ld/genscripts.sh -+++ b/ld/genscripts.sh -@@ -125,6 +125,9 @@ if test "x$NATIVE" = "xyes" ; then - USE_LIBPATH=yes - fi - -+# TODO: why is this needed? -+USE_LIBPATH=yes -+ - # Set the library search path, for libraries named by -lfoo. - # If LIB_PATH is defined (e.g., by Makefile) and non-empty, it is used. - # Otherwise, the default is set here. diff --git a/pkgs/development/tools/misc/binutils/patches/2.34/deterministic.patch b/pkgs/development/tools/misc/binutils/patches/2.34/deterministic.patch deleted file mode 100644 index 736e0aca6ce1f..0000000000000 --- a/pkgs/development/tools/misc/binutils/patches/2.34/deterministic.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur orig/binutils-2.23.1/ld/ldlang.c binutils-2.23.1/ld/ldlang.c ---- orig/ld/ldlang.c -+++ new/ld/ldlang.c -@@ -3095,6 +3095,8 @@ - ldfile_output_machine)) - einfo (_("%P%F:%s: can not set architecture: %E\n"), name); - -+ link_info.output_bfd->flags |= BFD_DETERMINISTIC_OUTPUT; -+ - link_info.hash = bfd_link_hash_table_create (link_info.output_bfd); - if (link_info.hash == NULL) - einfo (_("%P%F: can not create hash table: %E\n")); diff --git a/pkgs/development/tools/misc/binutils/patches/2.34/disambiguate-arm-targets.patch b/pkgs/development/tools/misc/binutils/patches/2.34/disambiguate-arm-targets.patch deleted file mode 100644 index abbfa73da05dc..0000000000000 --- a/pkgs/development/tools/misc/binutils/patches/2.34/disambiguate-arm-targets.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c -index 9f956d3..f5b61f1 100644 ---- a/bfd/elf32-arm.c -+++ b/bfd/elf32-arm.c -@@ -19585,7 +19585,10 @@ elf32_arm_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker) - #undef ELF_MAXPAGESIZE - #define ELF_MAXPAGESIZE 0x1000 - -+/* Prioritize elf32-*arm (priority 1) over elf32-*arm-vxworks (priority 2) */ -+#define elf_match_priority 2 - #include "elf32-target.h" -+#undef elf_match_priority - - - /* Merge backend specific data from an object file to the output -@@ -19974,4 +19977,7 @@ elf32_arm_symbian_plt_sym_val (bfd_vma i, const asection *plt, - #undef ELF_MAXPAGESIZE - #define ELF_MAXPAGESIZE 0x8000 - -+/* Prioritize elf32-*arm (priority 1) over elf32-*arm-symbian (priority 2) */ -+#define elf_match_priority 2 - #include "elf32-target.h" -+#undef elf_match_priority diff --git a/pkgs/development/tools/rust/cargo-c/default.nix b/pkgs/development/tools/rust/cargo-c/default.nix index ee0074f7d8393..ce57194bc49ba 100644 --- a/pkgs/development/tools/rust/cargo-c/default.nix +++ b/pkgs/development/tools/rust/cargo-c/default.nix @@ -5,7 +5,7 @@ rustPlatform.buildRustPackage rec { pname = "cargo-c"; - version = "0.6.18"; + version = "0.7.0"; src = stdenv.mkDerivation rec { name = "${pname}-source-${version}"; @@ -14,11 +14,11 @@ rustPlatform.buildRustPackage rec { owner = "lu-zero"; repo = pname; rev = "v${version}"; - sha256 = "1dh5z210nl8grjxb8zxch8h7799w61bah7r2j0s07091rcpfsrsb"; + sha256 = "0pd1vnpy29fxmf47pvkyxd6bydar8cykfjx0f1bbw3gfk7vychbj"; }; cargoLock = fetchurl { url = "https://github.com/lu-zero/${pname}/releases/download/v${version}/Cargo.lock"; - sha256 = "1h5wmfmm2a2ilyw3ar88rqm7yvdc2vhyx4pgg781615ax52fhjli"; + sha256 = "10xhd5m63r928gfvr4djmis30mra8wdsx55kgin9kiig2kylx69h"; }; installPhase = '' @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage rec { ''; }; - cargoSha256 = "0ll9p2rbnw46zd9m2bmdmn99v9jjjf8i33xpkvd1rx42ki7sys62"; + cargoSha256 = "1axg0kr8xsb5fm3r8qgc7s3g70pa8g9vc68d6icm7ms77phczx4r"; nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] |