git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commitb2ae45bd770fc14134e51382d28e06f695f785a1 authorWilliam A. Kennington III <william@wkennington.com> dateFri 10 Jul 2015, 11:07 (11 years ago) parentfc7c18a
1 file changed+7−10
pkgs/tools/filesystems/btrfsprogs/default.nix+7−10
pkgs/tools/filesystems/btrfsprogs/default.nix+7−10
@@ -1,9 +1,10 @@
11{ stdenv, fetchurl, pkgconfig, attr, acl, zlib, libuuid, e2fsprogs, lzo
2−, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, libxslt }:
2+, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, libxslt
3+}:
34
45let version = "4.1.1"; in
56
6−stdenv.mkDerivation (rec {
7+stdenv.mkDerivation rec {
78 name = "btrfs-progs-${version}";
89
910 src = fetchurl {
@@ -16,10 +17,9 @@ stdenv.mkDerivation (rec {
1617 asciidoc xmlto docbook_xml_dtd_45 docbook_xsl libxslt
1718 ];
1819
19− # for btrfs to get the rpath to libgcc_s, needed for pthread_cancel to work
20− NIX_CFLAGS_LINK = "-lgcc_s";
21−
22− makeFlags = "prefix=$(out)";
20+ # gcc bug with -O1 on ARM with gcc 4.8
21+ # This should be fine on all platforms so apply universally
22+ patchPhase = "sed -i s/-O1/-O2/ configure";
2323
2424 meta = with stdenv.lib; {
2525 description = "Utilities for the btrfs filesystem";
@@ -28,7 +28,4 @@ stdenv.mkDerivation (rec {
2828 maintainers = with maintainers; [ raskin wkennington ];
2929 platforms = platforms.linux;
3030 };
31−} // (if stdenv.isArm then {
32− # gcc bug with -O1 on ARM
33− patchPhase = "sed -i s/-O1/-O2/ configure";
34−} else {}))
31+}