bintools: Add isXXX flags to check linker type
This commit is contained in:
parent
a73b59a157
commit
dee9af9323
12 changed files with 24 additions and 9 deletions
|
@ -31,6 +31,13 @@
|
|||
|
||||
# Darwin code signing support utilities
|
||||
, postLinkSignHook ? null, signingUtils ? null
|
||||
|
||||
# Linker type
|
||||
, isLld ? bintools.isLld or false
|
||||
, isCctools ? bintools.isCctools or false
|
||||
, isGNU ? bintools.isGNU or false
|
||||
, isGold ? bintools.isGold or false
|
||||
, isBfd ? bintools.isBfd or false
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
@ -113,6 +120,8 @@ stdenv.mkDerivation {
|
|||
passthru = {
|
||||
inherit bintools libc nativeTools nativeLibc nativePrefix;
|
||||
|
||||
inherit isLld isCctools isGNU isGold isBfd;
|
||||
|
||||
emacsBufferSetup = pkgs: ''
|
||||
; We should handle propagation here too
|
||||
(mapc
|
||||
|
|
|
@ -5,7 +5,7 @@ let
|
|||
if stdenv.hostPlatform != stdenv.targetPlatform
|
||||
then "${stdenv.targetPlatform.config}-"
|
||||
else "";
|
||||
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
|
||||
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru.isLld = true; } ''
|
||||
mkdir -p $out/bin
|
||||
for prog in ${lld}/bin/*; do
|
||||
ln -s $prog $out/bin/${prefix}$(basename $prog)
|
||||
|
|
|
@ -5,7 +5,7 @@ let
|
|||
if stdenv.hostPlatform != stdenv.targetPlatform
|
||||
then "${stdenv.targetPlatform.config}-"
|
||||
else "";
|
||||
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
|
||||
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru.isLld = true; } ''
|
||||
mkdir -p $out/bin
|
||||
for prog in ${lld}/bin/*; do
|
||||
ln -s $prog $out/bin/${prefix}$(basename $prog)
|
||||
|
|
|
@ -5,7 +5,7 @@ let
|
|||
if stdenv.hostPlatform != stdenv.targetPlatform
|
||||
then "${stdenv.targetPlatform.config}-"
|
||||
else "";
|
||||
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
|
||||
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru.isLld = true; } ''
|
||||
mkdir -p $out/bin
|
||||
for prog in ${lld}/bin/*; do
|
||||
ln -s $prog $out/bin/${prefix}$(basename $prog)
|
||||
|
|
|
@ -5,7 +5,7 @@ let
|
|||
if stdenv.hostPlatform != stdenv.targetPlatform
|
||||
then "${stdenv.targetPlatform.config}-"
|
||||
else "";
|
||||
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } (''
|
||||
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru.isLld = true; } (''
|
||||
mkdir -p $out/bin
|
||||
for prog in ${lld}/bin/*; do
|
||||
ln -s $prog $out/bin/${prefix}$(basename $prog)
|
||||
|
|
|
@ -5,7 +5,7 @@ let
|
|||
if stdenv.hostPlatform != stdenv.targetPlatform
|
||||
then "${stdenv.targetPlatform.config}-"
|
||||
else "";
|
||||
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } (''
|
||||
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru.isLld = true; } (''
|
||||
mkdir -p $out/bin
|
||||
for prog in ${lld}/bin/*; do
|
||||
ln -s $prog $out/bin/${prefix}$(basename $prog)
|
||||
|
|
|
@ -5,7 +5,7 @@ let
|
|||
if stdenv.hostPlatform != stdenv.targetPlatform
|
||||
then "${stdenv.targetPlatform.config}-"
|
||||
else "";
|
||||
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
|
||||
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru.isLld = true; } ''
|
||||
mkdir -p $out/bin
|
||||
for prog in ${lld}/bin/*; do
|
||||
ln -s $prog $out/bin/${prefix}$(basename $prog)
|
||||
|
|
|
@ -5,7 +5,7 @@ let
|
|||
if stdenv.hostPlatform != stdenv.targetPlatform
|
||||
then "${stdenv.targetPlatform.config}-"
|
||||
else "";
|
||||
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
|
||||
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru.isLld = true; } ''
|
||||
mkdir -p $out/bin
|
||||
for prog in ${lld}/bin/*; do
|
||||
ln -s $prog $out/bin/${prefix}$(basename $prog)
|
||||
|
|
|
@ -5,7 +5,7 @@ let
|
|||
if stdenv.hostPlatform != stdenv.targetPlatform
|
||||
then "${stdenv.targetPlatform.config}-"
|
||||
else "";
|
||||
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
|
||||
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru.isLld = true; } ''
|
||||
mkdir -p $out/bin
|
||||
for prog in ${lld}/bin/*; do
|
||||
ln -s $prog $out/bin/${prefix}$(basename $prog)
|
||||
|
|
|
@ -5,7 +5,7 @@ let
|
|||
if stdenv.hostPlatform != stdenv.targetPlatform
|
||||
then "${stdenv.targetPlatform.config}-"
|
||||
else "";
|
||||
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } (''
|
||||
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru.isLld = true; } (''
|
||||
mkdir -p $out/bin
|
||||
for prog in ${lld}/bin/*; do
|
||||
ln -s $prog $out/bin/${prefix}$(basename $prog)
|
||||
|
|
|
@ -197,6 +197,11 @@ stdenv.mkDerivation {
|
|||
inherit targetPrefix;
|
||||
hasGold = enableGold;
|
||||
isGNU = true;
|
||||
# TODO Currently platform.linker == "gold" has no effect outside
|
||||
# of building GHC. If/when that's fixed, these flags should
|
||||
# probably move to the invocations of bintools-wrapper
|
||||
isGold = false;
|
||||
isBfd = true;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -65,6 +65,7 @@ stdenv.mkDerivation {
|
|||
|
||||
passthru = {
|
||||
inherit targetPrefix;
|
||||
isCctools = true;
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
|
Loading…
Reference in a new issue