From f9ed5e00896ecc2825e320b9e9a6a65aac502853 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 26 Jan 2019 01:46:10 -0500 Subject: [PATCH] =?UTF-8?q?libstdcxx:=20don=E2=80=99t=20set=20stdlib=20aut?= =?UTF-8?q?omatically?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We don’t need to set -stdlib=libstdc++. This only works on Clang so it is not good to set it globally. In addition, Clang knows to use libstdc++ on Linux by default if no stdlib is set: https://github.com/llvm-mirror/clang/blob/324f918438715b4a0d024af5930628c1674f4fcd/lib/Driver/ToolChains/Linux.cpp#L456 It’s a good policy to just leave off stdlib for now. Fixes #29877. --- pkgs/development/compilers/gcc/libstdc++-hook.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/compilers/gcc/libstdc++-hook.sh b/pkgs/development/compilers/gcc/libstdc++-hook.sh index 8b1d5d2da678..19db70597ce5 100644 --- a/pkgs/development/compilers/gcc/libstdc++-hook.sh +++ b/pkgs/development/compilers/gcc/libstdc++-hook.sh @@ -2,4 +2,3 @@ getHostRole export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem $(echo -n @gcc@/include/c++/*) -isystem $(echo -n @gcc@/include/c++/*)/$(@gcc@/bin/gcc -dumpmachine)" -export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libstdc++"