All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] scripts/checkpatch.pl: incorrect parsing of commit message
@ 2022-05-30 14:30 Heinrich Schuchardt
  0 siblings, 0 replies; only message in thread
From: Heinrich Schuchardt @ 2022-05-30 14:30 UTC (permalink / raw)
  To: Andy Whitcroft, Joe Perches
  Cc: Dwaipayan Ray, Lukas Bulwahn, linux-kernel, Heinrich Schuchardt

The following text from a commit message

    "Building on RISC-V results in an error

        cc: error: ‘-march=native’: ISA string must begin with rv32 or rv64"

results in a false positive in scripts/checkpatch.pl:

    ERROR: Unrecognized email address:
    'error: ‘-march=native’: ISA string must begin with rv32 or rv64"'

If a line does not start in column 1 and does not contain an email
address, it is obviously not a Cc: tag and checkpatch.pl should not
indicate an error.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 507c146..bbf4650 100644
--- a/meson.build
+++ b/meson.build
@@ -17,7 +17,10 @@ pktgen_conf = configuration_data()
 # set up some global vars for compiler, platform, configuration, etc.
 cc = meson.get_compiler('c')
 
-add_project_arguments('-march=native', language: 'c')
+target = target_machine.cpu_family()
+if (target != 'riscv64')
+    add_project_arguments('-march=native', language: 'c')
+endif
 
 if get_option('enable-avx') and cc.has_argument('-mavx')
     add_project_arguments('-mavx', language: 'c')
-- 
2.36.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-30 15:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30 14:30 [BUG] scripts/checkpatch.pl: incorrect parsing of commit message Heinrich Schuchardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.