From b2ae45bd770fc14134e51382d28e06f695f785a1 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Fri, 10 Jul 2015 11:07:39 -0700 Subject: [PATCH] btrfsProgs: Cleanup some old build changes The change of optimization flags should be safe for all platforms as the default for most applications is -O2. It is also unecessary to forcefully link against libgcc_s as btrfsprogs no longer errors when scrubbing without this linkage. --- pkgs/tools/filesystems/btrfsprogs/default.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/pkgs/tools/filesystems/btrfsprogs/default.nix b/pkgs/tools/filesystems/btrfsprogs/default.nix index 3ec048592370..95b34ed8960c 100644 --- a/pkgs/tools/filesystems/btrfsprogs/default.nix +++ b/pkgs/tools/filesystems/btrfsprogs/default.nix @@ -1,9 +1,10 @@ { stdenv, fetchurl, pkgconfig, attr, acl, zlib, libuuid, e2fsprogs, lzo -, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, libxslt }: +, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, libxslt +}: let version = "4.1.1"; in -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { name = "btrfs-progs-${version}"; src = fetchurl { @@ -16,10 +17,9 @@ stdenv.mkDerivation (rec { asciidoc xmlto docbook_xml_dtd_45 docbook_xsl libxslt ]; - # for btrfs to get the rpath to libgcc_s, needed for pthread_cancel to work - NIX_CFLAGS_LINK = "-lgcc_s"; - - makeFlags = "prefix=$(out)"; + # gcc bug with -O1 on ARM with gcc 4.8 + # This should be fine on all platforms so apply universally + patchPhase = "sed -i s/-O1/-O2/ configure"; meta = with stdenv.lib; { description = "Utilities for the btrfs filesystem"; @@ -28,7 +28,4 @@ stdenv.mkDerivation (rec { maintainers = with maintainers; [ raskin wkennington ]; platforms = platforms.linux; }; -} // (if stdenv.isArm then { - # gcc bug with -O1 on ARM - patchPhase = "sed -i s/-O1/-O2/ configure"; -} else {})) +}