Compare commits
4 Commits
master
...
purity-tes
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5995f80395 | ||
![]() |
bac950f333 | ||
![]() |
70f75fcf4b | ||
![]() |
88dd14103e |
19
pkgs/development/tools/misc/binutils/ar-purity.patch
Normal file
19
pkgs/development/tools/misc/binutils/ar-purity.patch
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
diff -rc binutils-2.18/bfd/archive.c binutils-2.18-new/bfd/archive.c
|
||||||
|
*** binutils-2.18/bfd/archive.c 2007-08-06 21:59:14.000000000 +0200
|
||||||
|
--- binutils-2.18-new/bfd/archive.c 2008-03-27 13:17:55.000000000 +0100
|
||||||
|
***************
|
||||||
|
*** 1383,1388 ****
|
||||||
|
--- 1383,1395 ----
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ char * envvar = getenv("NIX_AR_FORCE_PURITY");
|
||||||
|
+ if (envvar && strcmp(envvar, "1") == 0) {
|
||||||
|
+ status.st_mtime = 0;
|
||||||
|
+ status.st_uid = 0;
|
||||||
|
+ status.st_gid = 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
amt = sizeof (struct ar_hdr) + sizeof (struct areltdata);
|
||||||
|
ared = bfd_zalloc (abfd, amt);
|
||||||
|
if (ared == NULL)
|
|
@ -2,12 +2,23 @@
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "binutils-2.18";
|
name = "binutils-2.18";
|
||||||
|
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = mirror://gnu/binutils/binutils-2.18.tar.bz2;
|
url = mirror://gnu/binutils/binutils-2.18.tar.bz2;
|
||||||
sha256 = "16zfc7llbjdn69bbdy7kqgg2xa67ypgj7z5qicgwzvghaaj36yj8";
|
sha256 = "16zfc7llbjdn69bbdy7kqgg2xa67ypgj7z5qicgwzvghaaj36yj8";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Set timestamps, uids and gids in .a archives to 0 during Nix
|
||||||
|
# builds so that multiple builds of the same derivation yield the
|
||||||
|
# same result.
|
||||||
|
./ar-purity.patch
|
||||||
|
];
|
||||||
|
|
||||||
inherit noSysDirs;
|
inherit noSysDirs;
|
||||||
|
|
||||||
configureFlags = "--disable-werror"; # needed for dietlibc build
|
configureFlags = "--disable-werror"; # needed for dietlibc build
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -50,6 +50,7 @@ rec {
|
||||||
tarball = download {inherit url sha1 pkgname;};
|
tarball = download {inherit url sha1 pkgname;};
|
||||||
inherit system;
|
inherit system;
|
||||||
allowedReferences = [];
|
allowedReferences = [];
|
||||||
|
dummy = "2";
|
||||||
};
|
};
|
||||||
|
|
||||||
# The various statically linked components that make up the standard
|
# The various statically linked components that make up the standard
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
export NIX_ENFORCE_PURITY=1
|
export NIX_ENFORCE_PURITY=1
|
||||||
|
export NIX_AR_FORCE_PURITY=1
|
||||||
|
|
||||||
if test "$param1" = "static"; then
|
if test "$param1" = "static"; then
|
||||||
export NIX_CFLAGS_LINK="-static"
|
export NIX_CFLAGS_LINK="-static"
|
||||||
|
|
|
@ -296,9 +296,9 @@ let
|
||||||
|
|
||||||
in [
|
in [
|
||||||
i686LinuxPkgs
|
i686LinuxPkgs
|
||||||
x86_64LinuxPkgs
|
#x86_64LinuxPkgs
|
||||||
i686FreeBSDPkgs
|
#i686FreeBSDPkgs
|
||||||
powerpcDarwinPkgs
|
#powerpcDarwinPkgs
|
||||||
i686DarwinPkgs
|
#i686DarwinPkgs
|
||||||
cygwinPkgs
|
#cygwinPkgs
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user