From 65e363e753405e1255446b8615b0bc7d29e99714 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 6 Jun 2022 19:10:07 +0100 Subject: offrss: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: serve_pdf.o:offrss.h:75: multiple definition of `cgi_url_path'; offrss.o:offrss.h:75: first defined here --- pkgs/applications/networking/offrss/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/networking/offrss/default.nix b/pkgs/applications/networking/offrss/default.nix index 19dba8d5fae..cad7339fe08 100644 --- a/pkgs/applications/networking/offrss/default.nix +++ b/pkgs/applications/networking/offrss/default.nix @@ -13,6 +13,11 @@ stdenv.mkDerivation rec { ++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) podofo ++ lib.optional (!stdenv.isLinux) libiconv; + # Workaround build failure on -fno-common toolchains: + # ld: serve_pdf.o:offrss.h:75: multiple definition of `cgi_url_path'; + # offrss.o:offrss.h:75: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + configurePhase = '' substituteInPlace Makefile \ --replace '$(CC) $(CFLAGS) $(LDFLAGS)' '$(CXX) $(CFLAGS) $(LDFLAGS)' -- cgit 1.4.1