patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Timothy McDaniel <timothy.mcdaniel@intel.com>,
	Kent Wires <kent.wires@intel.com>
Cc: <dev@dpdk.org>, Thomas Monjalon <thomas@monjalon.net>,
	David Marchand <david.marchand@redhat.com>, <stable@dpdk.org>,
	Luca Boccassi <bluca@debian.org>
Subject: [PATCH] event/dlb2: fix meson build
Date: Thu, 3 Nov 2022 15:22:03 +0000	[thread overview]
Message-ID: <20221103152204.2706555-1-ferruh.yigit@amd.com> (raw)

"meson setup" fails when '-Werror' compiler flag is enabled [1].
This is not a build error in the driver but a build error in meson
during "meson setup" stage.

This issue exists for a while but meson takes it as a warning and
ignores it unless '-Werror' compiler flag is provided.
Although it doesn't cause build error without '-Werror', relevant code
should be broken functionally, this patch fixes that too.

Build file using a variable to detect if macro defined, but that
variable is not set, looks like copy/paste error.
Replacing variable with hardcoded macro name.

[1]
Reproduced via `meson -Dc_args='-Werror' build`
in file 'build/meson-logs/meson-log.txt'

``
Running compile:
Working directory:  /tmp/tmpfrnw2x8z
Command line:  ccache cc /tmp/tmpfrnw2x8z/testfile.c -pipe -E -P
		-Werror -D_FILE_OFFSET_BITS=64 -P -O0 -march=native
Code:
        #ifndef dev/qat_crypto_pmd_gen4.c
        # define dev/qat_crypto_pmd_gen4.c
        #endif
        "MESON_GET_DEFINE_DELIMITER"
dev/qat_crypto_pmd_gen4.c
Compiler stdout:
         "MESON_GET_DEFINE_DELIMITER"
/qat_crypto_pmd_gen4.c/qat_crypto_pmd_gen4.c

Compiler stderr:
 /tmp/tmpfrnw2x8z/testfile.c:3:20:
    error: extra tokens at end of #ifndef directive [-Werror]
    3 |         #ifndef dev/qat_crypto_pmd_gen4.c
      |                    ^
/tmp/tmpfrnw2x8z/testfile.c:4:18:
    error: ISO C99 requires whitespace after the macro name [-Werror]
    4 |         # define dev/qat_crypto_pmd_gen4.c
      |                  ^~~
cc1: all warnings being treated as errors

drivers/event/dlb2/meson.build:41:10:
ERROR: Could not get define 'dev/qat_crypto_pmd_gen4.c'
``

Fixes: d0ce87e41cdc ("event/dlb2: support single 512B write of 4 QEs")
Cc: stable@dpdk.org

Reported-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/event/dlb2/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/event/dlb2/meson.build b/drivers/event/dlb2/meson.build
index 20ef159ab327..a2e60273c516 100644
--- a/drivers/event/dlb2/meson.build
+++ b/drivers/event/dlb2/meson.build
@@ -38,7 +38,7 @@ if binutils_ok
 
     # check if all required flags already enabled (variant a).
     dlb2_avx512_on = false
-    if cc.get_define(f, args: machine_args) == '__AVX512VL__'
+    if cc.get_define('__AVX512VL__', args: machine_args) != ''
         dlb2_avx512_on = true
     endif
 
-- 
2.25.1


             reply	other threads:[~2022-11-03 15:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03 15:22 Ferruh Yigit [this message]
2022-11-03 15:35 ` Thomas Monjalon
2022-11-03 16:22   ` Ferruh Yigit
2022-11-04 11:00     ` Jerin Jacob
2022-11-07 14:22       ` Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221103152204.2706555-1-ferruh.yigit@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=bluca@debian.org \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=kent.wires@intel.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=timothy.mcdaniel@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).