about summary refs log tree commit diff
path: root/pkgs/development/tools/misc
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2018-04-11 14:55:52 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2018-04-11 14:55:52 +0200
commitee6894ca1297afe0caf2f389c1f9a9220826b749 (patch)
tree02f96b5744cef8bc55010fb8301f5b50c0748d4c /pkgs/development/tools/misc
parent392874b9b1411dc7b879997bd8776b921feea61d (diff)
parent617c26df84d5670574864a9ccad0eaf8708bd86a (diff)
downloadnixlib-ee6894ca1297afe0caf2f389c1f9a9220826b749.tar
nixlib-ee6894ca1297afe0caf2f389c1f9a9220826b749.tar.gz
nixlib-ee6894ca1297afe0caf2f389c1f9a9220826b749.tar.bz2
nixlib-ee6894ca1297afe0caf2f389c1f9a9220826b749.tar.lz
nixlib-ee6894ca1297afe0caf2f389c1f9a9220826b749.tar.xz
nixlib-ee6894ca1297afe0caf2f389c1f9a9220826b749.tar.zst
nixlib-ee6894ca1297afe0caf2f389c1f9a9220826b749.zip
Merge staging into master
Diffstat (limited to 'pkgs/development/tools/misc')
-rw-r--r--pkgs/development/tools/misc/automake/automake-1.16.x.nix4
-rw-r--r--pkgs/development/tools/misc/binutils/2.30.nix131
-rw-r--r--pkgs/development/tools/misc/binutils/default.nix13
-rw-r--r--pkgs/development/tools/misc/binutils/gold-symbol-visibility.patch79
-rw-r--r--pkgs/development/tools/misc/creduce/default.nix2
-rw-r--r--pkgs/development/tools/misc/csmith/default.nix2
-rw-r--r--pkgs/development/tools/misc/help2man/default.nix28
-rw-r--r--pkgs/development/tools/misc/intel-gpu-tools/default.nix2
-rw-r--r--pkgs/development/tools/misc/lsof/default.nix13
-rw-r--r--pkgs/development/tools/misc/lsof/dfile.patch18
10 files changed, 115 insertions, 177 deletions
diff --git a/pkgs/development/tools/misc/automake/automake-1.16.x.nix b/pkgs/development/tools/misc/automake/automake-1.16.x.nix
index 43efcf462800..affc400a9ed0 100644
--- a/pkgs/development/tools/misc/automake/automake-1.16.x.nix
+++ b/pkgs/development/tools/misc/automake/automake-1.16.x.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, perl, autoconf, makeWrapper, doCheck ? false }:
 
 stdenv.mkDerivation rec {
-  name = "automake-1.16";
+  name = "automake-1.16.1";
 
   src = fetchurl {
     url = "mirror://gnu/automake/${name}.tar.xz";
-    sha256 = "12jvcmkcmd5p14b41w9f7ixd3sca97pymd6lqbkwnl8qn6bjv3zr";
+    sha256 = "08g979ficj18i1w6w5219bgmns7czr03iadf20mk3lrzl8wbn1ax";
   };
 
   nativeBuildInputs = [ autoconf perl ];
diff --git a/pkgs/development/tools/misc/binutils/2.30.nix b/pkgs/development/tools/misc/binutils/2.30.nix
deleted file mode 100644
index 830c07330524..000000000000
--- a/pkgs/development/tools/misc/binutils/2.30.nix
+++ /dev/null
@@ -1,131 +0,0 @@
-{ stdenv, buildPackages
-, fetchurl, zlib
-, buildPlatform, hostPlatform, targetPlatform
-, noSysDirs, gold ? true, bison ? null
-}:
-
-let
-  version = "2.30";
-  basename = "binutils-${version}";
-  inherit (stdenv.lib) optional optionals optionalString;
-  # The targetPrefix prepended to binary names to allow multiple binuntils on the
-  # PATH to both be usable.
-  targetPrefix = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-";
-in
-
-stdenv.mkDerivation rec {
-  name = targetPrefix + basename;
-
-  src = fetchurl {
-    url = "mirror://gnu/binutils/${basename}.tar.bz2";
-    sha256 = "028cklfqaab24glva1ks2aqa1zxa6w6xmc8q34zs1sb7h22dxspg";
-  };
-
-  patches = [
-    # Turn on --enable-new-dtags by default to make the linker set
-    # RUNPATH instead of RPATH on binaries.  This is important because
-    # RUNPATH can be overriden using LD_LIBRARY_PATH at runtime.
-    ./new-dtags.patch
-
-    # Since binutils 2.22, DT_NEEDED flags aren't copied for dynamic outputs.
-    # That requires upstream changes for things to work. So we can patch it to
-    # get the old behaviour by now.
-    ./dtneeded.patch
-
-    # Make binutils output deterministic by default.
-    ./deterministic.patch
-
-    # Always add PaX flags section to ELF files.
-    # This is needed, for instance, so that running "ldd" on a binary that is
-    # PaX-marked to disable mprotect doesn't fail with permission denied.
-    ./pt-pax-flags.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.
-    ./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
-    ./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
-    # consequence that the linker will fail to find transitive dependencies of
-    # shared objects when cross-compiling. Consequently, we are forced to
-    # override this behavior, forcing ld to search DT_RPATH even when
-    # cross-compiling.
-    ./always-search-rpath.patch
-  ];
-
-  outputs = [ "out" "info" "man" ];
-
-  depsBuildBuild = [ buildPackages.stdenv.cc ];
-  nativeBuildInputs = [ bison ];
-  buildInputs = [ zlib ];
-
-  inherit noSysDirs;
-
-  preConfigure = ''
-    # Clear the default library search path.
-    if test "$noSysDirs" = "1"; then
-        echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt
-    fi
-
-    # Use symlinks instead of hard links to save space ("strip" in the
-    # fixup phase strips each hard link separately).
-    for i in binutils/Makefile.in gas/Makefile.in ld/Makefile.in gold/Makefile.in; do
-        sed -i "$i" -e 's|ln |ln -s |'
-    done
-  '';
-
-  # As binutils takes part in the stdenv building, we don't want references
-  # to the bootstrap-tools libgcc (as uses to happen on arm/mips)
-  NIX_CFLAGS_COMPILE = if hostPlatform.isDarwin
-    then "-Wno-string-plus-int -Wno-deprecated-declarations"
-    else "-static-libgcc";
-
-  # TODO(@Ericson2314): Always pass "--target" and always targetPrefix.
-  configurePlatforms =
-    # TODO(@Ericson2314): Figure out what's going wrong with Arm
-    if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isArm
-    then []
-    else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
-
-  configureFlags = [
-    "--enable-targets=all" "--enable-64-bit-bfd"
-    "--disable-install-libbfd"
-    "--disable-shared" "--enable-static"
-    "--with-system-zlib"
-
-    "--enable-deterministic-archives"
-    "--disable-werror"
-    "--enable-fix-loongson2f-nop"
-  ] ++ optionals gold [ "--enable-gold" "--enable-plugins" ];
-
-  enableParallelBuilding = true;
-
-  passthru = {
-    inherit targetPrefix version;
-  };
-
-  meta = with stdenv.lib; {
-    description = "Tools for manipulating binaries (linker, assembler, etc.)";
-    longDescription = ''
-      The GNU Binutils are a collection of binary tools.  The main
-      ones are `ld' (the GNU linker) and `as' (the GNU assembler).
-      They also include the BFD (Binary File Descriptor) library,
-      `gprof', `nm', `strip', etc.
-    '';
-    homepage = http://www.gnu.org/software/binutils/;
-    license = licenses.gpl3Plus;
-    maintainers = with maintainers; [ ericson2314 ];
-    platforms = platforms.unix;
-
-    /* Give binutils a lower priority than gcc-wrapper to prevent a
-       collision due to the ld/as wrappers/symlinks in the latter. */
-    priority = 10;
-  };
-}
diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix
index 05d0d21a179b..5c88902a68c4 100644
--- a/pkgs/development/tools/misc/binutils/default.nix
+++ b/pkgs/development/tools/misc/binutils/default.nix
@@ -5,10 +5,10 @@
 }:
 
 let
-  # Note to whoever is upgrading this: 2.29 is broken.
-  # ('nix-build pkgs/stdenv/linux/make-bootstrap-tools.nix -A test' segfaults on aarch64)
-  # Also glibc might need patching, see commit 733e20fee4a6700510f71fbe1a58ac23ea202f6a.
-  version = "2.28.1";
+  # 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 = "2.30";
   basename = "binutils-${version}";
   inherit (stdenv.lib) optional optionals optionalString;
   # The targetPrefix prepended to binary names to allow multiple binuntils on the
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://gnu/binutils/${basename}.tar.bz2";
-    sha256 = "1sj234nd05cdgga1r36zalvvdkvpfbr12g5mir2n8i1dwsdrj939";
+    sha256 = "028cklfqaab24glva1ks2aqa1zxa6w6xmc8q34zs1sb7h22dxspg";
   };
 
   patches = [
@@ -61,6 +61,9 @@ stdenv.mkDerivation rec {
     # override this behavior, forcing ld to search DT_RPATH even when
     # cross-compiling.
     ./always-search-rpath.patch
+
+    # https://sourceware.org/bugzilla/show_bug.cgi?id=22868
+    ./gold-symbol-visibility.patch
   ];
 
   outputs = [ "out" "info" "man" ];
diff --git a/pkgs/development/tools/misc/binutils/gold-symbol-visibility.patch b/pkgs/development/tools/misc/binutils/gold-symbol-visibility.patch
new file mode 100644
index 000000000000..0fb05a482d1c
--- /dev/null
+++ b/pkgs/development/tools/misc/binutils/gold-symbol-visibility.patch
@@ -0,0 +1,79 @@
+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/creduce/default.nix b/pkgs/development/tools/misc/creduce/default.nix
index 37ec63627b15..cbf5883b2973 100644
--- a/pkgs/development/tools/misc/creduce/default.nix
+++ b/pkgs/development/tools/misc/creduce/default.nix
@@ -6,8 +6,6 @@
 , utillinux
 }:
 
-assert stdenv.isLinux -> (utillinux != null);
-
 stdenv.mkDerivation rec {
   name = "creduce-${version}";
   version = "2.7.0";
diff --git a/pkgs/development/tools/misc/csmith/default.nix b/pkgs/development/tools/misc/csmith/default.nix
index 9a8c24fa1685..c4994ad24d79 100644
--- a/pkgs/development/tools/misc/csmith/default.nix
+++ b/pkgs/development/tools/misc/csmith/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ m4 makeWrapper ];
-  buildInputs = [ libbsd perl SysCPU ];
+  buildInputs = [ perl SysCPU libbsd ];
 
   postInstall = ''
     substituteInPlace $out/bin/compiler_test.pl \
diff --git a/pkgs/development/tools/misc/help2man/default.nix b/pkgs/development/tools/misc/help2man/default.nix
index 6e341b577cfb..b786aa2123f6 100644
--- a/pkgs/development/tools/misc/help2man/default.nix
+++ b/pkgs/development/tools/misc/help2man/default.nix
@@ -1,26 +1,34 @@
-{ stdenv, hostPlatform, fetchurl, perl, gettext, LocaleGettext, makeWrapper }:
+{ stdenv, hostPlatform, fetchurl, perl, gettext, LocaleGettext }:
 
 stdenv.mkDerivation rec {
-  name = "help2man-1.47.5";
+  name = "help2man-1.47.6";
 
   src = fetchurl {
     url = "mirror://gnu/help2man/${name}.tar.xz";
-    sha256 = "1cb14kp380jzk1yi4i7x9d8qplc8c5mgcbgycgs9ggpx34jhp9kw";
+    sha256 = "0vz4dlrvy4vc6l7w0a7n668pfa0rdm73wr2gar58wqranyah46yr";
   };
 
-  nativeBuildInputs = [ makeWrapper gettext LocaleGettext ];
+  nativeBuildInputs = [ gettext LocaleGettext ];
   buildInputs = [ perl LocaleGettext ];
 
   doCheck = false;                                # target `check' is missing
 
   patches = if hostPlatform.isCygwin then [ ./1.40.4-cygwin-nls.patch ] else null;
 
-  postInstall =
-    '' wrapProgram "$out/bin/help2man" \
-         --prefix PERL5LIB : "$(echo ${LocaleGettext}/lib/perl*/site_perl)" \
-         ${stdenv.lib.optionalString hostPlatform.isCygwin "--prefix PATH : ${gettext}/bin"}
-    '';
-
+  # We don't use makeWrapper here because it uses substitutions our
+  # bootstrap shell can't handle.
+  postInstall = ''
+    gettext_perl="$(echo ${LocaleGettext}/lib/perl*/site_perl)"
+    mv $out/bin/help2man $out/bin/.help2man-wrapped
+    cat > $out/bin/help2man <<EOF
+    #! $SHELL -e
+    export PERL5LIB=\''${PERL5LIB:+:}$gettext_perl
+    ${stdenv.lib.optionalString hostPlatform.isCygwin
+        "export PATH=\''${PATH:+:}${gettext}/bin"}
+    exec -a \$0 $out/bin/.help2man-wrapped "\$@"
+    EOF
+    chmod +x $out/bin/help2man
+  '';
 
   meta = with stdenv.lib; {
     description = "Generate man pages from `--help' output";
diff --git a/pkgs/development/tools/misc/intel-gpu-tools/default.nix b/pkgs/development/tools/misc/intel-gpu-tools/default.nix
index 775a31df2b17..5176be123018 100644
--- a/pkgs/development/tools/misc/intel-gpu-tools/default.nix
+++ b/pkgs/development/tools/misc/intel-gpu-tools/default.nix
@@ -25,6 +25,8 @@ stdenv.mkDerivation rec {
     substituteInPlace tests/Makefile.am --replace '$(CAIRO_CFLAGS)' '$(CAIRO_CFLAGS) $(GLIB_CFLAGS)'
   '';
 
+  enableParallelBuilding = true;
+
   meta = with stdenv.lib; {
     homepage = https://01.org/linuxgraphics/;
     description = "Tools for development and testing of the Intel DRM driver";
diff --git a/pkgs/development/tools/misc/lsof/default.nix b/pkgs/development/tools/misc/lsof/default.nix
index 224e0aba6ef7..53b960a7c031 100644
--- a/pkgs/development/tools/misc/lsof/default.nix
+++ b/pkgs/development/tools/misc/lsof/default.nix
@@ -4,13 +4,13 @@ let dialect = with stdenv.lib; last (splitString "-" stdenv.system); in
 
 stdenv.mkDerivation rec {
   name = "lsof-${version}";
-  version = "4.89";
+  version = "4.90";
 
   depsBuildBuild = [ buildPackages.stdenv.cc ];
   buildInputs = [ ncurses ];
 
   src = fetchurl {
-    urls =
+    urls = ["https://fossies.org/linux/misc/lsof_4.90.tar.bz2"] ++ # Mirrors seem to be down...
       ["ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${version}.tar.bz2"]
       ++ map (
         # the tarball is moved after new version is released
@@ -23,22 +23,19 @@ stdenv.mkDerivation rec {
         + "${stdenv.lib.optionalString isOld "OLD/"}lsof_${version}.tar.bz2"
       ) [ false true ]
       ;
-    sha256 = "061p18v0mhzq517791xkjs8a5dfynq1418a1mwxpji69zp2jzb41";
+    sha256 = "1xhn3amvl5mmwji5g90nkw7lfmh2494v18qbv1f729hrg468853g";
   };
 
   unpackPhase = "tar xvjf $src; cd lsof_*; tar xvf lsof_*.tar; sourceRoot=$( echo lsof_*/); ";
 
-  patches = [ ./dfile.patch ];
-
   postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
     substituteInPlace dialects/linux/dlsof.h --replace "defined(__UCLIBC__)" 1
   '';
 
   # Stop build scripts from searching global include paths
-  LSOF_INCLUDE = "${stdenv.cc.libc}/include";
+  LSOF_INCLUDE = "${stdenv.lib.getDev stdenv.cc.libc}/include";
   configurePhase = "LINUX_CONF_CC=$CC_FOR_BUILD LSOF_CC=$CC LSOF_AR=\"$AR cr\" LSOF_RANLIB=$RANLIB ./Configure -n ${dialect}";
   preBuild = ''
-    sed -i Makefile -e 's/^CFGF=/&	-DHASIPv6=1/;' -e 's/-lcurses/-lncurses/'
     for filepath in $(find dialects/${dialect} -type f); do
       sed -i "s,/usr/include,$LSOF_INCLUDE,g" $filepath
     done
@@ -58,7 +55,7 @@ stdenv.mkDerivation rec {
       socket (IPv6/IPv4/UNIX local), or partition (by opening a file
       from it).
     '';
-    maintainers = [ ];
+    maintainers = [ stdenv.lib.maintainers.dezgeg ];
     platforms = stdenv.lib.platforms.unix;
   };
 }
diff --git a/pkgs/development/tools/misc/lsof/dfile.patch b/pkgs/development/tools/misc/lsof/dfile.patch
deleted file mode 100644
index 47202d5ebeab..000000000000
--- a/pkgs/development/tools/misc/lsof/dfile.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- lsof_4.89_src/dialects/darwin/libproc/dfile.c	2014-10-30 12:39:46.000000000 +0100
-+++ lsof_4.89_src/dialects/darwin/libproc/dfile_new.c	2016-10-04 13:44:58.000000000 +0200
-@@ -286,13 +286,13 @@
- 
- #if	defined(PROC_FP_GUARDED)
- 	if (extra > 1)
--	    putchar(`,');
-+	    putchar(',');
- 	if (lf->guardflags) {
- 	    struct pff_tab *tp;
- 	    long gf;
- 
- 	    (void) printf("guard=");
--	    tp = Pgf_tab;
-+	    tp = Pff_tab;
- 	    gf = lf->guardflags;
- 	    while (gf && !FsvFlagX) {
- 		while (tp->nm) {