lol

lib{std,}c++: Fix setup hooks for cross

+104 -16
+13 -2
pkgs/development/compilers/gcc/libstdc++-hook.sh
··· 1 - export NIX_CXXSTDLIB_COMPILE+=" -isystem $(echo -n @gcc@/include/c++/*) -isystem $(echo -n @gcc@/include/c++/*)/$(@gcc@/bin/gcc -dumpmachine)" 2 - export NIX_CXXSTDLIB_LINK=" -stdlib=libstdc++" 1 + # The `hostOffset` describes how the host platform of the dependencies are slid 2 + # relative to the depending package. It is brought into scope of the setup hook 3 + # defined as the role of the dependency whose hooks is being run. 4 + case $hostOffset in 5 + -1) local role='BUILD_' ;; 6 + 0) local role='' ;; 7 + 1) local role='TARGET_' ;; 8 + *) echo "cc-wrapper: Error: Cannot be used with $hostOffset-offset deps" >2; 9 + return 1 ;; 10 + esac 11 + 12 + export NIX_${role}CXXSTDLIB_COMPILE+=" -isystem $(echo -n @gcc@/include/c++/*) -isystem $(echo -n @gcc@/include/c++/*)/$(@gcc@/bin/gcc -dumpmachine)" 13 + export NIX_${role}CXXSTDLIB_LINK=" -stdlib=libstdc++"
+13 -2
pkgs/development/compilers/llvm/3.5/libc++/setup-hook.sh
··· 1 + # The `hostOffset` describes how the host platform of the dependencies are slid 2 + # relative to the depending package. It is brought into scope of the setup hook 3 + # defined as the role of the dependency whose hooks is being run. 4 + case $hostOffset in 5 + -1) local role='BUILD_' ;; 6 + 0) local role='' ;; 7 + 1) local role='TARGET_' ;; 8 + *) echo "cc-wrapper: Error: Cannot be used with $hostOffset-offset deps" >2; 9 + return 1 ;; 10 + esac 11 + 1 12 linkCxxAbi="@linkCxxAbi@" 2 - export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" 3 - export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}" 13 + export NIX_${role}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" 14 + export NIX_${role}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
+13 -2
pkgs/development/compilers/llvm/3.7/libc++/setup-hook.sh
··· 1 + # The `hostOffset` describes how the host platform of the dependencies are slid 2 + # relative to the depending package. It is brought into scope of the setup hook 3 + # defined as the role of the dependency whose hooks is being run. 4 + case $hostOffset in 5 + -1) local role='BUILD_' ;; 6 + 0) local role='' ;; 7 + 1) local role='TARGET_' ;; 8 + *) echo "cc-wrapper: Error: Cannot be used with $hostOffset-offset deps" >2; 9 + return 1 ;; 10 + esac 11 + 1 12 linkCxxAbi="@linkCxxAbi@" 2 - export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" 3 - export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}" 13 + export NIX_${role}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" 14 + export NIX_${role}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
+13 -2
pkgs/development/compilers/llvm/3.8/libc++/setup-hook.sh
··· 1 + # The `hostOffset` describes how the host platform of the dependencies 2 + # relative to the depending package. It is brought into scope of the setup hook 3 + # defined as the role of the dependency whose hooks is being run. 4 + case $hostOffset in 5 + -1) local role='BUILD_' ;; 6 + 0) local role='' ;; 7 + 1) local role='TARGET_' ;; 8 + *) echo "cc-wrapper: Error: Cannot be used with $hostOffset-offset deps" >2; 9 + return 1 ;; 10 + esac 11 + 1 12 linkCxxAbi="@linkCxxAbi@" 2 - export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" 3 - export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}" 13 + export NIX_${role}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" 14 + export NIX_${role}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
+13 -2
pkgs/development/compilers/llvm/3.9/libc++/setup-hook.sh
··· 1 + # The `hostOffset` describes how the host platform of the dependencies 2 + # relative to the depending package. It is brought into scope of the setup hook 3 + # defined as the role of the dependency whose hooks is being run. 4 + case $hostOffset in 5 + -1) local role='BUILD_' ;; 6 + 0) local role='' ;; 7 + 1) local role='TARGET_' ;; 8 + *) echo "cc-wrapper: Error: Cannot be used with $hostOffset-offset deps" >2; 9 + return 1 ;; 10 + esac 11 + 1 12 linkCxxAbi="@linkCxxAbi@" 2 - export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" 3 - export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}" 13 + export NIX_${role}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" 14 + export NIX_${role}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
+13 -2
pkgs/development/compilers/llvm/4/libc++/setup-hook.sh
··· 1 + # The `hostOffset` describes how the host platform of the dependencies 2 + # relative to the depending package. It is brought into scope of the setup hook 3 + # defined as the role of the dependency whose hooks is being run. 4 + case $hostOffset in 5 + -1) local role='BUILD_' ;; 6 + 0) local role='' ;; 7 + 1) local role='TARGET_' ;; 8 + *) echo "cc-wrapper: Error: Cannot be used with $hostOffset-offset deps" >2; 9 + return 1 ;; 10 + esac 11 + 1 12 linkCxxAbi="@linkCxxAbi@" 2 - export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" 3 - export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}" 13 + export NIX_${role}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" 14 + export NIX_${role}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
+13 -2
pkgs/development/compilers/llvm/5/libc++/setup-hook.sh
··· 1 + # The `hostOffset` describes how the host platform of the dependencies 2 + # relative to the depending package. It is brought into scope of the setup hook 3 + # defined as the role of the dependency whose hooks is being run. 4 + case $hostOffset in 5 + -1) local role='BUILD_' ;; 6 + 0) local role='' ;; 7 + 1) local role='TARGET_' ;; 8 + *) echo "cc-wrapper: Error: Cannot be used with $hostOffset-offset deps" >2; 9 + return 1 ;; 10 + esac 11 + 1 12 linkCxxAbi="@linkCxxAbi@" 2 - export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" 3 - export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}" 13 + export NIX_${role}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" 14 + export NIX_${role}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
+13 -2
pkgs/development/compilers/llvm/6/libc++/setup-hook.sh
··· 1 + # The `hostOffset` describes how the host platform of the dependencies 2 + # relative to the depending package. It is brought into scope of the setup hook 3 + # defined as the role of the dependency whose hooks is being run. 4 + case $hostOffset in 5 + -1) local role='BUILD_' ;; 6 + 0) local role='' ;; 7 + 1) local role='TARGET_' ;; 8 + *) echo "cc-wrapper: Error: Cannot be used with $hostOffset-offset deps" >2; 9 + return 1 ;; 10 + esac 11 + 1 12 linkCxxAbi="@linkCxxAbi@" 2 - export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" 3 - export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}" 13 + export NIX_${role}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" 14 + export NIX_${role}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"