From 1db7f30d1f96bab9512029b16a427ec2c7e81432 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 27 Feb 2023 19:34:07 +0000 Subject: [PATCH] lld: explain why we change the stack size on Musl Suggested-by: Rahul Butani --- pkgs/development/compilers/llvm/10/lld/default.nix | 2 ++ pkgs/development/compilers/llvm/11/lld/default.nix | 2 ++ pkgs/development/compilers/llvm/12/lld/default.nix | 2 ++ pkgs/development/compilers/llvm/13/lld/default.nix | 2 ++ pkgs/development/compilers/llvm/14/lld/default.nix | 2 ++ pkgs/development/compilers/llvm/15/lld/default.nix | 2 ++ pkgs/development/compilers/llvm/5/lld/default.nix | 2 ++ pkgs/development/compilers/llvm/6/lld/default.nix | 2 ++ pkgs/development/compilers/llvm/7/lld/default.nix | 2 ++ pkgs/development/compilers/llvm/8/lld/default.nix | 2 ++ pkgs/development/compilers/llvm/9/lld/default.nix | 2 ++ pkgs/development/compilers/llvm/git/lld/default.nix | 2 ++ 12 files changed, 24 insertions(+) diff --git a/pkgs/development/compilers/llvm/10/lld/default.nix b/pkgs/development/compilers/llvm/10/lld/default.nix index 94cab09d680d5..d4c686a0f4db6 100644 --- a/pkgs/development/compilers/llvm/10/lld/default.nix +++ b/pkgs/development/compilers/llvm/10/lld/default.nix @@ -25,6 +25,8 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + + # Musl's default stack size is too small for lld to be able to link Firefox. LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/11/lld/default.nix b/pkgs/development/compilers/llvm/11/lld/default.nix index 0a245879e93c2..dbcd96a3edcee 100644 --- a/pkgs/development/compilers/llvm/11/lld/default.nix +++ b/pkgs/development/compilers/llvm/11/lld/default.nix @@ -25,6 +25,8 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + + # Musl's default stack size is too small for lld to be able to link Firefox. LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/12/lld/default.nix b/pkgs/development/compilers/llvm/12/lld/default.nix index 507628b1b6fb3..01b7e410aa073 100644 --- a/pkgs/development/compilers/llvm/12/lld/default.nix +++ b/pkgs/development/compilers/llvm/12/lld/default.nix @@ -33,6 +33,8 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + + # Musl's default stack size is too small for lld to be able to link Firefox. LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/13/lld/default.nix b/pkgs/development/compilers/llvm/13/lld/default.nix index f4bd093f6a480..c8c3e0b448bd5 100644 --- a/pkgs/development/compilers/llvm/13/lld/default.nix +++ b/pkgs/development/compilers/llvm/13/lld/default.nix @@ -34,6 +34,8 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + + # Musl's default stack size is too small for lld to be able to link Firefox. LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/14/lld/default.nix b/pkgs/development/compilers/llvm/14/lld/default.nix index 2e0d893c7febe..02ca4c8024873 100644 --- a/pkgs/development/compilers/llvm/14/lld/default.nix +++ b/pkgs/development/compilers/llvm/14/lld/default.nix @@ -37,6 +37,8 @@ stdenv.mkDerivation rec { cmakeFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + + # Musl's default stack size is too small for lld to be able to link Firefox. LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/15/lld/default.nix b/pkgs/development/compilers/llvm/15/lld/default.nix index e8bca769de5fa..cc18aee76a448 100644 --- a/pkgs/development/compilers/llvm/15/lld/default.nix +++ b/pkgs/development/compilers/llvm/15/lld/default.nix @@ -36,6 +36,8 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + + # Musl's default stack size is too small for lld to be able to link Firefox. LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/5/lld/default.nix b/pkgs/development/compilers/llvm/5/lld/default.nix index c1949e619c441..d3cbede8433a8 100644 --- a/pkgs/development/compilers/llvm/5/lld/default.nix +++ b/pkgs/development/compilers/llvm/5/lld/default.nix @@ -24,6 +24,8 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + + # Musl's default stack size is too small for lld to be able to link Firefox. LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/6/lld/default.nix b/pkgs/development/compilers/llvm/6/lld/default.nix index 19a0c3a37e17f..a2a011c59b53f 100644 --- a/pkgs/development/compilers/llvm/6/lld/default.nix +++ b/pkgs/development/compilers/llvm/6/lld/default.nix @@ -25,6 +25,8 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + + # Musl's default stack size is too small for lld to be able to link Firefox. LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/7/lld/default.nix b/pkgs/development/compilers/llvm/7/lld/default.nix index 4c450bc8a1d04..2016e6321e0ff 100644 --- a/pkgs/development/compilers/llvm/7/lld/default.nix +++ b/pkgs/development/compilers/llvm/7/lld/default.nix @@ -25,6 +25,8 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + + # Musl's default stack size is too small for lld to be able to link Firefox. LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/8/lld/default.nix b/pkgs/development/compilers/llvm/8/lld/default.nix index 4906989378bd6..9a3a49db78555 100644 --- a/pkgs/development/compilers/llvm/8/lld/default.nix +++ b/pkgs/development/compilers/llvm/8/lld/default.nix @@ -25,6 +25,8 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + + # Musl's default stack size is too small for lld to be able to link Firefox. LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/9/lld/default.nix b/pkgs/development/compilers/llvm/9/lld/default.nix index d37e5996c98f6..bf79c7597829a 100644 --- a/pkgs/development/compilers/llvm/9/lld/default.nix +++ b/pkgs/development/compilers/llvm/9/lld/default.nix @@ -25,6 +25,8 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + + # Musl's default stack size is too small for lld to be able to link Firefox. LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/git/lld/default.nix b/pkgs/development/compilers/llvm/git/lld/default.nix index e8bca769de5fa..cc18aee76a448 100644 --- a/pkgs/development/compilers/llvm/git/lld/default.nix +++ b/pkgs/development/compilers/llvm/git/lld/default.nix @@ -36,6 +36,8 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + + # Musl's default stack size is too small for lld to be able to link Firefox. LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ];