Skip to content

Commit

Permalink
binutils: 2.30.0 -> 2.31.1
Browse files Browse the repository at this point in the history
  • Loading branch information
NeQuissimus committed Jan 20, 2019
1 parent 44bd85c commit 53e1db9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 143 deletions.
4 changes: 2 additions & 2 deletions pkgs/development/libraries/libbfd/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv
, fetchpatch, gnu-config, autoreconfHook264, bison, binutils-unwrapped
, fetchpatch, gnu-config, autoreconfHook, bison, binutils-unwrapped
, libiberty, zlib
}:

Expand Down Expand Up @@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
# We update these ourselves
dontUpdateAutotoolsGnuConfigScripts = true;

nativeBuildInputs = [ autoreconfHook264 bison ];
nativeBuildInputs = [ autoreconfHook bison ];
buildInputs = [ libiberty zlib ];

configurePlatforms = [ "build" "host" ];
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/libopcodes/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, buildPackages
, autoreconfHook264, bison, binutils-unwrapped
, autoreconfHook, bison, binutils-unwrapped
, libiberty, libbfd
}:

Expand All @@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
'';

depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ autoreconfHook264 bison ];
nativeBuildInputs = [ autoreconfHook bison ];
buildInputs = [ libiberty ];
# dis-asm.h includes bfd.h
propagatedBuildInputs = [ libbfd ];
Expand Down
13 changes: 4 additions & 9 deletions pkgs/development/tools/misc/binutils/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, lib, buildPackages
, fetchurl, zlib, autoreconfHook264
, fetchurl, zlib, autoreconfHook
# Enabling all targets increases output size to a multiple.
, withAllTargets ? false, libbfd, libopcodes
, enableShared ? true
Expand All @@ -12,7 +12,7 @@ let
# 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";
version = "2.31.1";
basename = "binutils-${version}";
# The targetPrefix prepended to binary names to allow multiple binuntils on the
# PATH to both be usable.
Expand All @@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
# HACK to ensure that we preserve source from bootstrap binutils to not rebuild LLVM
src = stdenv.__bootPackages.binutils-unwrapped.src or (fetchurl {
url = "mirror://gnu/binutils/${basename}.tar.bz2";
sha256 = "028cklfqaab24glva1ks2aqa1zxa6w6xmc8q34zs1sb7h22dxspg";
sha256 = "1l34hn1zkmhr1wcrgf0d4z7r3najxnw3cx2y2fk7v55zjlk3ik7z";
});

patches = [
Expand Down Expand Up @@ -54,11 +54,6 @@ stdenv.mkDerivation rec {

# https://sourceware.org/bugzilla/show_bug.cgi?id=22868
./gold-symbol-visibility.patch

# Version 2.30 introduced strict requirements on ELF relocations which cannot
# be satisfied on aarch64 platform. Add backported fix from bugzilla.
# https://sourceware.org/bugzilla/show_bug.cgi?id=22764
./relax-R_AARCH64_ABS32-R_AARCH64_ABS16-absolute.patch
] ++ lib.optional stdenv.targetPlatform.isiOS ./support-ios.patch;

outputs = [ "out" "info" "man" ];
Expand All @@ -67,7 +62,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
bison
] ++ lib.optionals stdenv.targetPlatform.isiOS [
autoreconfHook264
autoreconfHook
];
buildInputs = [ zlib ];

Expand Down

This file was deleted.

4 comments on commit 53e1db9

@dtzWill
Copy link
Member

@dtzWill dtzWill commented on 53e1db9 Jan 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stock 2.31.1 is pretty broken, producing insta-segfault binaries when using musl :(.

Gentoo's patch stack is 60 high now haha, not sure if that's how they roll or a sign :).

The worst of the problems I'm seeing are re:musl, but I'll note that since we build things like busybox shell against static musl, this bug impacts anyone unlucky enough to use a Nix built against staging ;).

Such a nix will explode constantly when building things haha, this was my life a few minutes ago and for an undisclosed amount of debugging time prior ;). Hooray for rollback though!

I'll see about grabbing the patches, FWIW I'm primarily talking about this:

https://sourceware.org/bugzilla/show_bug.cgi?id=23428

But I'm nervous when anything as critical (and organizationally "basic") as our linker has such problems :3.
However many other distributions seem good with (patched) versions so hopefully this won't be too much trouble.

"Your code can't be exploited it never runs! Muahahahaha take that CVE's!" 😁


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=log;hp=binutils-2_31_1;h=binutils-2_31-branch

@vcunat
Copy link
Member

@vcunat vcunat commented on 53e1db9 Jan 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect there's something fundamentally wrong with the project, as we've had significant problems not too long ago already: f9b2d7b

@NeQuissimus
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh lawd! My bad @dtzWill :) If we ever meet, a beer on me!

@dtzWill
Copy link
Member

@dtzWill dtzWill commented on 53e1db9 Jan 23, 2019 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.