From 407e4481148bb482fb2eb75ce058c981e99549b3 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 22 Apr 2021 11:54:07 +0000 Subject: [PATCH] gcc8,gcc9: fix ctypes on NetBSD This patch was applied to gcc7 in aab8c7ba437 ("netbsd: add cross target"), but it hasn't been brought forward to newer compilers that have the same problem. GCC 6 and (probably) GCC 4.9 also have the issue, but the patch doesn't apply cleanly to them so I'm leaving them alone for now. GCC 10, our current default, appears to have finally fixed this. --- pkgs/development/compilers/gcc/8/default.nix | 1 + pkgs/development/compilers/gcc/9/default.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index 6ecf462d54d..4edc034720c 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -55,6 +55,7 @@ let majorVersion = "8"; patches = optional (targetPlatform != hostPlatform) ../libstdc++-target.patch + ++ optional targetPlatform.isNetBSD ../libstdc++-netbsd-ctypes.patch ++ optional noSysDirs ../no-sys-dirs.patch /* ++ optional (hostPlatform != buildPlatform) (fetchpatch { # XXX: Refine when this should be applied url = "https://git.busybox.net/buildroot/plain/package/gcc/${version}/0900-remove-selftests.patch?id=11271540bfe6adafbc133caf6b5b902a816f5f02"; diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix index 7f35f5c7bb9..ca92a8f4845 100644 --- a/pkgs/development/compilers/gcc/9/default.nix +++ b/pkgs/development/compilers/gcc/9/default.nix @@ -70,6 +70,7 @@ let majorVersion = "9"; # This patch can most likely be removed by a post 9.3.0-release. [ ./avoid-cycling-subreg-reloads.patch ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch + ++ optional targetPlatform.isNetBSD ../libstdc++-netbsd-ctypes.patch ++ optional noSysDirs ../no-sys-dirs.patch /* ++ optional (hostPlatform != buildPlatform) (fetchpatch { # XXX: Refine when this should be applied url = "https://git.busybox.net/buildroot/plain/package/gcc/${version}/0900-remove-selftests.patch?id=11271540bfe6adafbc133caf6b5b902a816f5f02";