From c0d4a1bfe4f9bea0ec55586cf43281c0c8711eab Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 3 Jun 2022 14:56:42 +0100 Subject: [PATCH] webos.novacomd: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: src/host/usb-linux.c:82: multiple definition of `t_recovery_queue'; src/host/recovery.c:45: first defined here --- pkgs/development/mobile/webos/novacomd.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/mobile/webos/novacomd.nix b/pkgs/development/mobile/webos/novacomd.nix index dc330ce6d4e9..5e12fb5ce8a3 100644 --- a/pkgs/development/mobile/webos/novacomd.nix +++ b/pkgs/development/mobile/webos/novacomd.nix @@ -29,6 +29,11 @@ stdenv.mkDerivation rec { buildInputs = [ libusb-compat-0_1 ]; + # Workaround build failure on -fno-common toolchains: + # ld: src/host/usb-linux.c:82: multiple definition of `t_recovery_queue'; + # src/host/recovery.c:45: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + cmakeFlags = [ "-DWEBOS_TARGET_MACHINE_IMPL=host" ]; meta = with lib; {