summary refs log tree commit diff
path: root/pkgs/os-specific/linux/iproute
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-05-21 11:10:20 +0100
committerMatthieu Coudron <teto@users.noreply.github.com>2022-05-21 15:17:27 +0200
commitd0c7af7c98374faa5cb1e4cb7f174ed1676cd115 (patch)
tree7375ea72a5203626d488b8d75538f6b7c4b7b8e9 /pkgs/os-specific/linux/iproute
parent8a1f275216d9979b58f772e59d62cb8aa3c8b822 (diff)
downloadnixpkgs-d0c7af7c98374faa5cb1e4cb7f174ed1676cd115.tar
nixpkgs-d0c7af7c98374faa5cb1e4cb7f174ed1676cd115.tar.gz
nixpkgs-d0c7af7c98374faa5cb1e4cb7f174ed1676cd115.tar.bz2
nixpkgs-d0c7af7c98374faa5cb1e4cb7f174ed1676cd115.tar.lz
nixpkgs-d0c7af7c98374faa5cb1e4cb7f174ed1676cd115.tar.xz
nixpkgs-d0c7af7c98374faa5cb1e4cb7f174ed1676cd115.tar.zst
nixpkgs-d0c7af7c98374faa5cb1e4cb7f174ed1676cd115.zip
iproute_mptcp: fix build for -fno-common toolchains
Without the change build on upstream gcc-10 fals as:

    ld: ipxfrm.o:(.bss+0x0): multiple definition of `filter'; ipmroute.o:(.bss+0x0): first defined here
    ld: xfrm_monitor.o:(.bss+0x0): multiple definition of `listen_all_nsid'; ipmonitor.o:(.bss+0x0): first defined here
Diffstat (limited to 'pkgs/os-specific/linux/iproute')
-rw-r--r--pkgs/os-specific/linux/iproute/mptcp.nix17
1 files changed, 14 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/iproute/mptcp.nix b/pkgs/os-specific/linux/iproute/mptcp.nix
index 8a4cde0c79e..e43af52bb34 100644
--- a/pkgs/os-specific/linux/iproute/mptcp.nix
+++ b/pkgs/os-specific/linux/iproute/mptcp.nix
@@ -1,4 +1,4 @@
-{ lib, iproute2, fetchFromGitHub }:
+{ lib, iproute2, fetchFromGitHub, fetchpatch }:
 
 iproute2.overrideAttrs (oa: rec {
   pname = "iproute_mptcp";
@@ -15,8 +15,19 @@ iproute2.overrideAttrs (oa: rec {
     patchShebangs configure
   '';
 
-  # We override "patches" to never apply any iproute2 patches:
-  patches = [ ];
+  patches = [
+    # We override "patches" to never apply any iproute2 patches:
+  ] ++ [
+    # iproute-mptcp patches:
+
+    # Pull upstream fix for -fno-common toolchain support:
+    #   https://github.com/multipath-tcp/iproute-mptcp/pull/8
+    (fetchpatch {
+      name = "fno-common.patch";
+      url = "https://github.com/multipath-tcp/iproute-mptcp/commit/7aebfde8624c978f6f73b03142892f802d21cc0b.patch";
+      sha256 = "098402sjdm10r9xggz6naygnfjs74d9k3s2wc2aczx0d2zayhff8";
+    })
+  ];
 
   meta = with lib; {
     homepage = "https://github.com/multipath-tcp/iproute-mptcp";