diff options
3 files changed, 89 insertions, 1 deletions
diff --git a/meta-filesystems/recipes-utils/xfsprogs/files/0001-Check-for-MAP_SYNC-in-sys-mman.h.patch b/meta-filesystems/recipes-utils/xfsprogs/files/0001-Check-for-MAP_SYNC-in-sys-mman.h.patch new file mode 100644 index 0000000000..75b227ac19 --- /dev/null +++ b/meta-filesystems/recipes-utils/xfsprogs/files/0001-Check-for-MAP_SYNC-in-sys-mman.h.patch | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | From f41ef1f06d428c81fcdef73d896dfc7ceda1809c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 23 Aug 2018 04:59:39 +0000 | ||
| 4 | Subject: [PATCH] Check for MAP_SYNC in sys/mman.h | ||
| 5 | |||
| 6 | Not all arches have wired MAP_SYNC e.g. mips | ||
| 7 | which have conflicts with definition, so checking | ||
| 8 | a generic file is going to mis-configure xfsprogs | ||
| 9 | for such arches. | ||
| 10 | |||
| 11 | libc now has added the relevant macros to | ||
| 12 | sys/mman.h, and returns the right values for arches | ||
| 13 | where its implemented and nothing for others | ||
| 14 | unlike asm-generic/mman.h which only checks | ||
| 15 | for kernel headers and ignored arches | ||
| 16 | |||
| 17 | Upstream-Status: Pending | ||
| 18 | |||
| 19 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 20 | --- | ||
| 21 | include/linux.h | 3 +-- | ||
| 22 | m4/package_libcdev.m4 | 3 +-- | ||
| 23 | 2 files changed, 2 insertions(+), 4 deletions(-) | ||
| 24 | |||
| 25 | diff --git a/include/linux.h b/include/linux.h | ||
| 26 | index 1998941..7e5c9ab 100644 | ||
| 27 | --- a/include/linux.h | ||
| 28 | +++ b/include/linux.h | ||
| 29 | @@ -331,8 +331,7 @@ fsmap_advance( | ||
| 30 | #define MAP_SYNC 0 | ||
| 31 | #define MAP_SHARED_VALIDATE 0 | ||
| 32 | #else | ||
| 33 | -#include <asm-generic/mman.h> | ||
| 34 | -#include <asm-generic/mman-common.h> | ||
| 35 | +#include <sys/mman.h> | ||
| 36 | #endif /* HAVE_MAP_SYNC */ | ||
| 37 | |||
| 38 | #endif /* __XFS_LINUX_H__ */ | ||
| 39 | diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4 | ||
| 40 | index 0a6b514..2b47d2f 100644 | ||
| 41 | --- a/m4/package_libcdev.m4 | ||
| 42 | +++ b/m4/package_libcdev.m4 | ||
| 43 | @@ -335,8 +335,7 @@ AC_DEFUN([AC_HAVE_STATFS_FLAGS], | ||
| 44 | AC_DEFUN([AC_HAVE_MAP_SYNC], | ||
| 45 | [ AC_MSG_CHECKING([for MAP_SYNC]) | ||
| 46 | AC_TRY_COMPILE([ | ||
| 47 | -#include <asm-generic/mman.h> | ||
| 48 | -#include <asm-generic/mman-common.h> | ||
| 49 | +#include <sys/mman.h> | ||
| 50 | ], [ | ||
| 51 | int flags = MAP_SYNC | MAP_SHARED_VALIDATE; | ||
| 52 | ], have_map_sync=yes | ||
diff --git a/meta-filesystems/recipes-utils/xfsprogs/files/0002-include-include-xfs-linux.h-after-sys-mman.h.patch b/meta-filesystems/recipes-utils/xfsprogs/files/0002-include-include-xfs-linux.h-after-sys-mman.h.patch new file mode 100644 index 0000000000..89447fd92e --- /dev/null +++ b/meta-filesystems/recipes-utils/xfsprogs/files/0002-include-include-xfs-linux.h-after-sys-mman.h.patch | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | From 18298d7c028cd5fbd2c68fa428dc2384344aeb91 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 23 Aug 2018 05:33:57 +0000 | ||
| 4 | Subject: [PATCH] include include/xfs/linux.h after <sys/mman.h> | ||
| 5 | |||
| 6 | This helps compiling with musl which goes ahead and undefines MAP_SYNC | ||
| 7 | for mips and other architectures where its not wired in kernel | ||
| 8 | |||
| 9 | Upstream-Status: Pending | ||
| 10 | |||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | --- | ||
| 13 | io/mmap.c | 5 +++-- | ||
| 14 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/io/mmap.c b/io/mmap.c | ||
| 17 | index 106be49..34fadf4 100644 | ||
| 18 | --- a/io/mmap.c | ||
| 19 | +++ b/io/mmap.c | ||
| 20 | @@ -16,10 +16,11 @@ | ||
| 21 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 22 | */ | ||
| 23 | |||
| 24 | -#include "command.h" | ||
| 25 | -#include "input.h" | ||
| 26 | #include <sys/mman.h> | ||
| 27 | #include <signal.h> | ||
| 28 | + | ||
| 29 | +#include "command.h" | ||
| 30 | +#include "input.h" | ||
| 31 | #include "init.h" | ||
| 32 | #include "io.h" | ||
| 33 | |||
diff --git a/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.17.0.bb b/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.17.0.bb index 06f774d875..ee571ce863 100644 --- a/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.17.0.bb +++ b/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.17.0.bb | |||
| @@ -9,6 +9,8 @@ SRC_URI = "https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/${BP}.tar.xz \ | |||
| 9 | file://remove_flags_from_build_flags.patch \ | 9 | file://remove_flags_from_build_flags.patch \ |
| 10 | file://0001-build-Check-for-sync_file_range-libc-function.patch \ | 10 | file://0001-build-Check-for-sync_file_range-libc-function.patch \ |
| 11 | file://disable-xfs_scrub-build.patch \ | 11 | file://disable-xfs_scrub-build.patch \ |
| 12 | file://0001-Check-for-MAP_SYNC-in-sys-mman.h.patch \ | ||
| 13 | file://0002-include-include-xfs-linux.h-after-sys-mman.h.patch \ | ||
| 12 | " | 14 | " |
| 13 | SRC_URI[md5sum] = "b935b693dfac0264e232c3c4e52d5569" | 15 | SRC_URI[md5sum] = "b935b693dfac0264e232c3c4e52d5569" |
| 14 | SRC_URI[sha256sum] = "f53f5169cb98cfca471ddea30092738c427ba284c5356e01b45dd1ae3b297e0d" | 16 | SRC_URI[sha256sum] = "f53f5169cb98cfca471ddea30092738c427ba284c5356e01b45dd1ae3b297e0d" |
| @@ -48,13 +50,14 @@ export tagname="CC" | |||
| 48 | 50 | ||
| 49 | EXTRA_OEMAKE = "DIST_ROOT='${D}'" | 51 | EXTRA_OEMAKE = "DIST_ROOT='${D}'" |
| 50 | 52 | ||
| 51 | do_configure_prepend () { | 53 | do_configure () { |
| 52 | export BUILD_CC="${BUILD_CC} ${BUILD_CFLAGS}" | 54 | export BUILD_CC="${BUILD_CC} ${BUILD_CFLAGS}" |
| 53 | # Prevent Makefile from calling configure without arguments, | 55 | # Prevent Makefile from calling configure without arguments, |
| 54 | # when do_configure gets called for a second time. | 56 | # when do_configure gets called for a second time. |
| 55 | rm -f ${B}/include/builddefs ${B}/include/platform_defs.h ${B}/configure | 57 | rm -f ${B}/include/builddefs ${B}/include/platform_defs.h ${B}/configure |
| 56 | # Recreate configure script. | 58 | # Recreate configure script. |
| 57 | oe_runmake configure | 59 | oe_runmake configure |
| 60 | oe_runconf | ||
| 58 | } | 61 | } |
| 59 | 62 | ||
| 60 | do_install_append() { | 63 | do_install_append() { |
