From f783fcba13fcc759ce010ae4c6994783f3e806ba Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 3 Jun 2022 15:20:21 +0100 Subject: [PATCH] xbursttools: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: mipsel-unknown-linux-uclibc-ld: boothandler.o:(.bss+0x8): multiple definition of `start_addr'; main.o:(.bss+0x8): first defined here --- pkgs/tools/misc/xburst-tools/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/misc/xburst-tools/default.nix b/pkgs/tools/misc/xburst-tools/default.nix index 9ac031309948..e850e347b29a 100644 --- a/pkgs/tools/misc/xburst-tools/default.nix +++ b/pkgs/tools/misc/xburst-tools/default.nix @@ -19,6 +19,11 @@ stdenv.mkDerivation { sh autogen.sh ''; + # Workaround build failure on -fno-common toolchains: + # mipsel-unknown-linux-uclibc-ld: boothandler.o:(.bss+0x8): multiple definition of + # `start_addr'; main.o:(.bss+0x8): first defined here + NIX_CFLAGS_COMPILE_FOR_TARGET = "-fcommon"; + configureFlags = lib.optionals (gccCross != null) [ "--enable-firmware" "CROSS_COMPILE=${gccCross.targetPrefix}"