useOldCXXAbi: Change into a setup hook

Stdenv adapters considered weird.
This commit is contained in:
Eelco Dolstra 2016-04-01 13:36:59 +02:00
parent c20a54570a
commit 13a1c7b8c1
4 changed files with 5 additions and 8 deletions

View File

@ -0,0 +1 @@
export NIX_CFLAGS_COMPILE+=" -D_GLIBCXX_USE_CXX11_ABI=0"

View File

@ -25,8 +25,8 @@ buildFHSUserEnv {
]
++ lib.optional withJava jdk
++ lib.optional withPrimus (primus.override {
stdenv = useOldCXXAbi stdenv;
stdenv_i686 = useOldCXXAbi pkgsi686Linux.stdenv;
stdenv = overrideInStdenv stdenv [ useOldCXXAbi ];
stdenv_i686 = overrideInStdenv pkgsi686Linux.stdenv [ useOldCXXAbi ];
})
;

View File

@ -242,10 +242,4 @@ rec {
else pkgs.stdenv;
};
/* Modify a stdenv so a build uses pre-C++11 ABI by default. */
useOldCXXAbi = stdenv: stdenv //
{ mkDerivation = args: stdenv.mkDerivation (args // {
NIX_CFLAGS_COMPILE = toString (args.NIX_CFLAGS_COMPILE or "") + " -D_GLIBCXX_USE_CXX11_ABI=0";
});
};
}

View File

@ -325,6 +325,8 @@ in
separateDebugInfo = makeSetupHook { } ../build-support/setup-hooks/separate-debug-info.sh;
useOldCXXAbi = makeSetupHook { } ../build-support/setup-hooks/use-old-cxx-abi.sh;
### TOOLS