diff options
author | Ola x Nilsson <olani@axis.com> | 2024-01-26 14:57:46 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-01-27 08:20:02 +0000 |
commit | fd0980f74f0b34363cf4282667c918f1925db0f9 (patch) | |
tree | d3d05ccc927abb03cbcfa27e66253f24d0097ca9 /meta/recipes-devtools/python | |
parent | 348d9aba3305cd98b0c0b1ec0f4b1407e786307a (diff) | |
download | poky-fd0980f74f0b34363cf4282667c918f1925db0f9.tar.gz |
python3-numpy: Use Large File Support version of fallocate
This was supposed to always be the case from upstream but was exposed
by the 64-bit-time QA checker when file function scanning was enabled.
(From OE-Core rev: 3d556e59f658ac29615fb7a14b6ea48533122ff6)
Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python')
-rw-r--r-- | meta/recipes-devtools/python/python3-numpy/0001-BUG-Use-large-file-fallocate-on-32-bit-linux-platfor.patch | 51 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3-numpy_1.26.3.bb | 1 |
2 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-numpy/0001-BUG-Use-large-file-fallocate-on-32-bit-linux-platfor.patch b/meta/recipes-devtools/python/python3-numpy/0001-BUG-Use-large-file-fallocate-on-32-bit-linux-platfor.patch new file mode 100644 index 0000000000..0702b8499a --- /dev/null +++ b/meta/recipes-devtools/python/python3-numpy/0001-BUG-Use-large-file-fallocate-on-32-bit-linux-platfor.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From 43b9b2626a59e8764f3bfb1d6b0d73b2d665584e Mon Sep 17 00:00:00 2001 | ||
2 | From: Ola x Nilsson <olani@axis.com> | ||
3 | Date: Fri, 19 Jan 2024 10:26:41 +0100 | ||
4 | Subject: [PATCH] BUG: Use large file fallocate on 32 bit linux platforms | ||
5 | |||
6 | Using a local prototype for fallocate instead of the fcntl.h header | ||
7 | meant that the redirect triggered by -D_FILE_OFFSET_BITS=64 was not | ||
8 | triggered. | ||
9 | |||
10 | The prototypes in feature_detection_stdio.h should only be used by | ||
11 | functions in setup_common.py. If they are used by the feature | ||
12 | discovery code they might trigger false positives. | ||
13 | |||
14 | Upstream-Status: Backport [https://github.com/numpy/numpy/commit/f49c6f9ea735cd7f718e74f8d637ffbbd3a7a03b] | ||
15 | Signed-off-by: Ola x Nilsson <olani@axis.com> | ||
16 | |||
17 | --- | ||
18 | numpy/core/feature_detection_stdio.h | 3 +++ | ||
19 | numpy/core/src/multiarray/convert.c | 5 +++-- | ||
20 | 2 files changed, 6 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/numpy/core/feature_detection_stdio.h b/numpy/core/feature_detection_stdio.h | ||
23 | index bc14d16..d8bbfbd 100644 | ||
24 | --- a/numpy/core/feature_detection_stdio.h | ||
25 | +++ b/numpy/core/feature_detection_stdio.h | ||
26 | @@ -1,6 +1,9 @@ | ||
27 | +#define _GNU_SOURCE | ||
28 | #include <stdio.h> | ||
29 | #include <fcntl.h> | ||
30 | |||
31 | +#if 0 /* Only for setup_common.py, not the C compiler */ | ||
32 | off_t ftello(FILE *stream); | ||
33 | int fseeko(FILE *stream, off_t offset, int whence); | ||
34 | int fallocate(int, int, off_t, off_t); | ||
35 | +#endif | ||
36 | diff --git a/numpy/core/src/multiarray/convert.c b/numpy/core/src/multiarray/convert.c | ||
37 | index 60c1a1b..8ec0aee 100644 | ||
38 | --- a/numpy/core/src/multiarray/convert.c | ||
39 | +++ b/numpy/core/src/multiarray/convert.c | ||
40 | @@ -23,8 +23,9 @@ | ||
41 | #include "array_coercion.h" | ||
42 | #include "refcount.h" | ||
43 | |||
44 | -int | ||
45 | -fallocate(int fd, int mode, off_t offset, off_t len); | ||
46 | +#if defined(HAVE_FALLOCATE) && defined(__linux__) | ||
47 | +#include <fcntl.h> | ||
48 | +#endif | ||
49 | |||
50 | /* | ||
51 | * allocate nbytes of diskspace for file fp | ||
diff --git a/meta/recipes-devtools/python/python3-numpy_1.26.3.bb b/meta/recipes-devtools/python/python3-numpy_1.26.3.bb index 023d40a9b2..326e2c3591 100644 --- a/meta/recipes-devtools/python/python3-numpy_1.26.3.bb +++ b/meta/recipes-devtools/python/python3-numpy_1.26.3.bb | |||
@@ -12,6 +12,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${SRCNAME}-${PV}.tar.gz \ | |||
12 | file://0001-numpy-core-Define-RISCV-32-support.patch \ | 12 | file://0001-numpy-core-Define-RISCV-32-support.patch \ |
13 | file://fix_reproducibility.patch \ | 13 | file://fix_reproducibility.patch \ |
14 | file://run-ptest \ | 14 | file://run-ptest \ |
15 | file://0001-BUG-Use-large-file-fallocate-on-32-bit-linux-platfor.patch \ | ||
15 | " | 16 | " |
16 | SRC_URI[sha256sum] = "697df43e2b6310ecc9d95f05d5ef20eacc09c7c4ecc9da3f235d39e71b7da1e4" | 17 | SRC_URI[sha256sum] = "697df43e2b6310ecc9d95f05d5ef20eacc09c7c4ecc9da3f235d39e71b7da1e4" |
17 | 18 | ||