Skip to content

Commit

Permalink
python3Packages.cffi: fix tests on FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
rhelmot committed Nov 17, 2024
1 parent a2f60bb commit 16316b4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
diff -r c649a735cf82 testing/support.py
--- a/testing/support.py Thu Feb 23 05:42:01 2023 +0100
+++ b/testing/support.py Sat May 20 21:46:56 2023 -0400
@@ -112,6 +112,7 @@
'-Wno-unreachable-code']
# special things for clang
extra_compile_args.append('-Qunused-arguments')
+ extra_compile_args.append('-Wno-null-pointer-subtraction')
else:
# assume a standard gcc
diff --git a/testing/support.py b/testing/support.py
index 063e52cf..ef0abdc7 100644
--- a/testing/support.py
+++ b/testing/support.py
@@ -117,6 +117,7 @@ else:
extra_compile_args = ['-Werror', '-Wall', '-Wextra', '-Wconversion',
'-Wno-unused-parameter',
'-Wno-unreachable-code']
+extra_compile_args.append('-Wno-null-pointer-subtraction')

is_musl = False
if sys.platform == 'linux':
4 changes: 4 additions & 0 deletions pkgs/development/python-modules/cffi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ else
--replace '/usr/include/libffi' '${lib.getDev libffi}/include'
'';

disabledTests = lib.optionals stdenv.isFreeBSD [
"test_dlopen_handle" # assumes that libdl.dlopen works.
];

nativeBuildInputs = [ pkg-config ];

build-system = [ setuptools ];
Expand Down

0 comments on commit 16316b4

Please sign in to comment.