From 1d0dac572c92fbbb56825197efa1e2162dfc14d5 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 30 Dec 2024 00:47:45 +0100 Subject: [PATCH] ncftp: Fix build Looks like gcc caught up with clang. --- pkgs/by-name/nc/ncftp/package.nix | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/nc/ncftp/package.nix b/pkgs/by-name/nc/ncftp/package.nix index 01eef692a2da..d2f4d93c6516 100644 --- a/pkgs/by-name/nc/ncftp/package.nix +++ b/pkgs/by-name/nc/ncftp/package.nix @@ -19,18 +19,20 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - # Workaround build failure on -fno-common toolchains like upstream - # gcc-10. Otherwise build fails as: - # ld: bookmark.o: (.bss+0x20): multiple definition of `gBm'; - # gpshare.o:(.bss+0x0): first defined here - env.NIX_CFLAGS_COMPILE = toString ( - [ "-fcommon" ] - # these are required for the configure script to work with clang - ++ lib.optionals stdenv.hostPlatform.isDarwin [ + env = { + NIX_CFLAGS_COMPILE = toString [ + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: bookmark.o: (.bss+0x20): multiple definition of `gBm'; + # gpshare.o:(.bss+0x0): first defined here + "-fcommon" + # configure fails due to ancient sample C program: + # error: installation or configuration problem: C compiler cannot create executables. "-Wno-implicit-int" + # error: two or more data types in declaration specifiers "-Wno-implicit-function-declaration" - ] - ); + ]; + }; preConfigure = '' find -name Makefile.in | xargs sed -i '/^TMPDIR=/d'