Skip to content

Commit

Permalink
ncftp: Fix build
Browse files Browse the repository at this point in the history
Looks like gcc caught up with clang.
  • Loading branch information
jtojnar authored and bjornfor committed Dec 30, 2024
1 parent ba810ef commit 1d0dac5
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions pkgs/by-name/nc/ncftp/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 1d0dac5

Please sign in to comment.