mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-24 20:02:58 +03:00
useOldCXXAbi: Change into a setup hook
Stdenv adapters considered weird.
This commit is contained in:
parent
c20a54570a
commit
13a1c7b8c1
1
pkgs/build-support/setup-hooks/use-old-cxx-abi.sh
Normal file
1
pkgs/build-support/setup-hooks/use-old-cxx-abi.sh
Normal file
@ -0,0 +1 @@
|
||||
export NIX_CFLAGS_COMPILE+=" -D_GLIBCXX_USE_CXX11_ABI=0"
|
@ -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 ];
|
||||
})
|
||||
;
|
||||
|
||||
|
@ -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";
|
||||
});
|
||||
};
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user