diff options
| -rw-r--r-- | meta-oe/recipes-core/ndctl/ndctl/0001-build-set-HAVE_STATEMENT_EXPR-var.patch | 60 | ||||
| -rw-r--r-- | meta-oe/recipes-core/ndctl/ndctl_v73.bb | 3 |
2 files changed, 62 insertions, 1 deletions
diff --git a/meta-oe/recipes-core/ndctl/ndctl/0001-build-set-HAVE_STATEMENT_EXPR-var.patch b/meta-oe/recipes-core/ndctl/ndctl/0001-build-set-HAVE_STATEMENT_EXPR-var.patch new file mode 100644 index 0000000000..486d6c07be --- /dev/null +++ b/meta-oe/recipes-core/ndctl/ndctl/0001-build-set-HAVE_STATEMENT_EXPR-var.patch | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | From b06d16ec2d4aefc4cf1675e9dd6314956bc32d69 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 3 | Date: Thu, 7 Apr 2022 14:36:58 +0800 | ||
| 4 | Subject: [PATCH] build: set HAVE_STATEMENT_EXPR var | ||
| 5 | |||
| 6 | The v73 version tries to build and run a test program at compile | ||
| 7 | time to check whether compiler supports sizeof and expression statements | ||
| 8 | and sets HAVE_STATEMENT_EXPR accordingly. This requires EXEWRAPPER_ENABLED | ||
| 9 | in meson.bbclass to be True and qemu-usermode to be working. | ||
| 10 | |||
| 11 | In cases when EXEWRAPPER_ENABLED is False, build fails with error: | ||
| 12 | |||
| 13 | | ../git/meson.build:213:0: ERROR: Can not run test applications in | ||
| 14 | this cross environment. | ||
| 15 | |||
| 16 | We don't really need to do this as these have been supported since gcc3 and can set the configs to 1. | ||
| 17 | |||
| 18 | The autotools implementation also used to set it to 1 so this doesn't change anything: | ||
| 19 | |||
| 20 | https://github.com/pmem/ndctl/blob/v72.1/configure.ac#L70 | ||
| 21 | |||
| 22 | Upstream-Status: Inappropriate | ||
| 23 | |||
| 24 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 25 | --- | ||
| 26 | meson.build | 18 ++---------------- | ||
| 27 | 1 file changed, 2 insertions(+), 16 deletions(-) | ||
| 28 | |||
| 29 | diff --git a/meson.build b/meson.build | ||
| 30 | index 42e11aa..e8d218b 100644 | ||
| 31 | --- a/meson.build | ||
| 32 | +++ b/meson.build | ||
| 33 | @@ -210,22 +210,8 @@ conf.set('ENABLE_DESTRUCTIVE', get_option('destructive').enabled()) | ||
| 34 | conf.set('ENABLE_LOGGING', get_option('logging').enabled()) | ||
| 35 | conf.set('ENABLE_DEBUG', get_option('dbg').enabled()) | ||
| 36 | |||
| 37 | -typeof = cc.run(''' | ||
| 38 | - int main() { | ||
| 39 | - struct { | ||
| 40 | - char a[16]; | ||
| 41 | - } x; | ||
| 42 | - typeof(x) y; | ||
| 43 | - | ||
| 44 | - return sizeof(x) == sizeof(y); | ||
| 45 | - } | ||
| 46 | - ''' | ||
| 47 | -) | ||
| 48 | - | ||
| 49 | -if typeof.compiled() and typeof.returncode() == 1 | ||
| 50 | - conf.set('HAVE_TYPEOF', 1) | ||
| 51 | - conf.set('HAVE_STATEMENT_EXPR', 1) | ||
| 52 | -endif | ||
| 53 | +conf.set('HAVE_TYPEOF', 1) | ||
| 54 | +conf.set('HAVE_STATEMENT_EXPR', 1) | ||
| 55 | |||
| 56 | if target_machine.endian() == 'big' | ||
| 57 | conf.set('HAVE_BIG_ENDIAN', 1) | ||
| 58 | -- | ||
| 59 | 2.17.1 | ||
| 60 | |||
diff --git a/meta-oe/recipes-core/ndctl/ndctl_v73.bb b/meta-oe/recipes-core/ndctl/ndctl_v73.bb index c88d392970..da649d578b 100644 --- a/meta-oe/recipes-core/ndctl/ndctl_v73.bb +++ b/meta-oe/recipes-core/ndctl/ndctl_v73.bb | |||
| @@ -13,7 +13,8 @@ inherit meson pkgconfig bash-completion systemd | |||
| 13 | SRCREV = "dd58d43458943d20ff063850670bf54a5242c9c5" | 13 | SRCREV = "dd58d43458943d20ff063850670bf54a5242c9c5" |
| 14 | SRC_URI = "git://github.com/pmem/ndctl.git;branch=main;protocol=https \ | 14 | SRC_URI = "git://github.com/pmem/ndctl.git;branch=main;protocol=https \ |
| 15 | file://0001-util-Correct-path-to-iniparser.h.patch \ | 15 | file://0001-util-Correct-path-to-iniparser.h.patch \ |
| 16 | file://0001-meson-Use-pkg-config-to-detect-iniparser.patch" | 16 | file://0001-meson-Use-pkg-config-to-detect-iniparser.patch \ |
| 17 | file://0001-build-set-HAVE_STATEMENT_EXPR-var.patch" | ||
| 17 | 18 | ||
| 18 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>v\d+(\.\d+)*)" | 19 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>v\d+(\.\d+)*)" |
| 19 | 20 | ||
