Skip to content

Commit

Permalink
btrfsProgs: Cleanup some old build changes
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wkennington committed Jul 13, 2015
1 parent fc7c18a commit b2ae45b
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions 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 {
Expand All @@ -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";
Expand All @@ -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 {}))
}

0 comments on commit b2ae45b

Please sign in to comment.