From: Alessandro Carminati <acarmina@redhat•com>
To: linux-kselftest@vger•kernel.org
Cc: Dan Carpenter <dan.carpenter@linaro•org>,
Daniel Diaz <daniel.diaz@linaro•org>,
David Gow <davidgow@google•com>,
Arthur Grillo <arthurgrillo@riseup•net>,
Brendan Higgins <brendan.higgins@linux•dev>,
Naresh Kamboju <naresh.kamboju@linaro•org>,
Andrew Morton <akpm@linux-foundation•org>,
Maxime Ripard <mripard@kernel•org>,
Ville Syrjala <ville.syrjala@linux•intel.com>,
Daniel Vetter <daniel@ffwll•ch>,
Guenter Roeck <linux@roeck-us•net>,
Alessandro Carminati <alessandro.carminati@gmail•com>,
Jani Nikula <jani.nikula@intel•com>,
Shuah Khan <skhan@linuxfoundation•org>,
Mickael Salaun <mic@digikod•net>, Kees Cook <kees@kernel•org>,
Stephen Rothwell <sfr@canb•auug.org.au>,
dri-devel@lists•freedesktop.org, kunit-dev@googlegroups•com,
linux-arch@vger•kernel.org, linux-kernel@vger•kernel.org,
linux-s390@vger•kernel.org, linux-next@vger•kernel.org,
Alessandro Carminati <acarmina@redhat•com>
Subject: [PATCH] kunit: fixes Compilation error on s390
Date: Sat, 29 Mar 2025 15:03:20 +0000 [thread overview]
Message-ID: <20250329150320.331018-1-acarmina@redhat.com> (raw)
The current implementation of suppressing warning backtraces uses __func__,
which is a compile-time constant only for non -fPIC compilation.
GCC's support for this situation in position-independent code varies across
versions and architectures.
On the s390 architecture, -fPIC is required for compilation, and support
for this scenario is available in GCC 11 and later.
Fixes: d8b14a2 ("bug/kunit: core support for suppressing warning backtraces")
Signed-off-by: Alessandro Carminati <acarmina@redhat•com>
---
lib/kunit/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/kunit/Kconfig b/lib/kunit/Kconfig
index 201402f0ab49..6c937144dcea 100644
--- a/lib/kunit/Kconfig
+++ b/lib/kunit/Kconfig
@@ -17,6 +17,7 @@ if KUNIT
config KUNIT_SUPPRESS_BACKTRACE
bool "KUnit - Enable backtrace suppression"
+ depends on (!S390 && CC_IS_GCC) || (CC_IS_GCC && GCC_VERSION >= 110000)
default y
help
Enable backtrace suppression for KUnit. If enabled, backtraces
--
2.34.1
next reply other threads:[~2025-03-29 15:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-29 15:03 Alessandro Carminati [this message]
2025-03-29 22:09 ` [PATCH] kunit: fixes Compilation error on s390 Stephen Rothwell
2025-03-30 5:12 ` David Gow
2025-03-31 9:33 ` Heiko Carstens
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=20250329150320.331018-1-acarmina@redhat.com \
--to=acarmina@redhat$(echo .)com \
--cc=akpm@linux-foundation$(echo .)org \
--cc=alessandro.carminati@gmail$(echo .)com \
--cc=arthurgrillo@riseup$(echo .)net \
--cc=brendan.higgins@linux$(echo .)dev \
--cc=dan.carpenter@linaro$(echo .)org \
--cc=daniel.diaz@linaro$(echo .)org \
--cc=daniel@ffwll$(echo .)ch \
--cc=davidgow@google$(echo .)com \
--cc=dri-devel@lists$(echo .)freedesktop.org \
--cc=jani.nikula@intel$(echo .)com \
--cc=kees@kernel$(echo .)org \
--cc=kunit-dev@googlegroups$(echo .)com \
--cc=linux-arch@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-kselftest@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=linux-s390@vger$(echo .)kernel.org \
--cc=linux@roeck-us$(echo .)net \
--cc=mic@digikod$(echo .)net \
--cc=mripard@kernel$(echo .)org \
--cc=naresh.kamboju@linaro$(echo .)org \
--cc=sfr@canb$(echo .)auug.org.au \
--cc=skhan@linuxfoundation$(echo .)org \
--cc=ville.syrjala@linux$(echo .)intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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