summary refs log tree commit diff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-05-17 16:50:37 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-05-17 16:51:03 +0100
commit3d2fd9ab51f74e113aa6a5a704676b4fe3854df1 (patch)
tree0d1d6be4957624aac560be6e1b87412d1075356c
parent115f2f7878bbee1683071f1ef3c031736fed822d (diff)
downloadnixpkgs-3d2fd9ab51f74e113aa6a5a704676b4fe3854df1.tar
nixpkgs-3d2fd9ab51f74e113aa6a5a704676b4fe3854df1.tar.gz
nixpkgs-3d2fd9ab51f74e113aa6a5a704676b4fe3854df1.tar.bz2
nixpkgs-3d2fd9ab51f74e113aa6a5a704676b4fe3854df1.tar.lz
nixpkgs-3d2fd9ab51f74e113aa6a5a704676b4fe3854df1.tar.xz
nixpkgs-3d2fd9ab51f74e113aa6a5a704676b4fe3854df1.tar.zst
nixpkgs-3d2fd9ab51f74e113aa6a5a704676b4fe3854df1.zip
lsh: add -fcommon workaround
Workaround build failure on -fno-common toolchains like upstream
gcc-10. Otherwise build fails as:

    ld: liblsh.a(unix_user.o):/build/lsh-2.0.4/src/server_userauth.h:108: multiple definition of
      `server_userauth_none_preauth'; lshd.o:/build/lsh-2.0.4/src/server_userauth.h:108: first defined here
-rw-r--r--pkgs/tools/networking/lsh/default.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/tools/networking/lsh/default.nix b/pkgs/tools/networking/lsh/default.nix
index 5893579b1a7..07f0524d5f4 100644
--- a/pkgs/tools/networking/lsh/default.nix
+++ b/pkgs/tools/networking/lsh/default.nix
@@ -31,7 +31,12 @@ stdenv.mkDerivation rec {
     export lsh_cv_sys_unix98_ptys=yes
   '';
 
-  NIX_CFLAGS_COMPILE = "-std=gnu90";
+  # -fcommon: workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #   ld: liblsh.a(unix_user.o):/build/lsh-2.0.4/src/server_userauth.h:108: multiple definition of
+  #     `server_userauth_none_preauth'; lshd.o:/build/lsh-2.0.4/src/server_userauth.h:108: first defined here
+  # Should be present in upcoming 2.1 release.
+  NIX_CFLAGS_COMPILE = "-std=gnu90 -fcommon";
 
   buildInputs = [ gperf guile gmp zlib liboop readline gnum4 pam ];