* [PATCH] kunit: fixes Compilation error on s390
@ 2025-03-29 15:03 Alessandro Carminati
2025-03-29 22:09 ` Stephen Rothwell
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Alessandro Carminati @ 2025-03-29 15:03 UTC (permalink / raw)
To: linux-kselftest
Cc: Dan Carpenter, Daniel Diaz, David Gow, Arthur Grillo,
Brendan Higgins, Naresh Kamboju, Andrew Morton, Maxime Ripard,
Ville Syrjala, Daniel Vetter, Guenter Roeck, Alessandro Carminati,
Jani Nikula, Shuah Khan, Mickael Salaun, Kees Cook,
Stephen Rothwell, dri-devel, kunit-dev, linux-arch, linux-kernel,
linux-s390, linux-next, Alessandro Carminati
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] kunit: fixes Compilation error on s390
2025-03-29 15:03 [PATCH] kunit: fixes Compilation error on s390 Alessandro Carminati
@ 2025-03-29 22:09 ` Stephen Rothwell
2025-03-30 5:12 ` David Gow
2025-03-31 9:33 ` Heiko Carstens
2 siblings, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2025-03-29 22:09 UTC (permalink / raw)
To: Alessandro Carminati
Cc: linux-kselftest, Dan Carpenter, Daniel Diaz, David Gow,
Arthur Grillo, Brendan Higgins, Naresh Kamboju, Andrew Morton,
Maxime Ripard, Ville Syrjala, Daniel Vetter, Guenter Roeck,
Alessandro Carminati, Jani Nikula, Shuah Khan, Mickael Salaun,
Kees Cook, dri-devel, kunit-dev, linux-arch, linux-kernel,
linux-s390, linux-next
[-- Attachment #1: Type: text/plain, Size: 771 bytes --]
Hi Alessandro,
On Sat, 29 Mar 2025 15:03:20 +0000 Alessandro Carminati <acarmina@redhat.com> wrote:
>
> 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>
Please keep all the commit message tags together at the end of the
commit message.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kunit: fixes Compilation error on s390
2025-03-29 15:03 [PATCH] kunit: fixes Compilation error on s390 Alessandro Carminati
2025-03-29 22:09 ` Stephen Rothwell
@ 2025-03-30 5:12 ` David Gow
2025-03-31 9:33 ` Heiko Carstens
2 siblings, 0 replies; 4+ messages in thread
From: David Gow @ 2025-03-30 5:12 UTC (permalink / raw)
To: Alessandro Carminati
Cc: linux-kselftest, Dan Carpenter, Daniel Diaz, Arthur Grillo,
Brendan Higgins, Naresh Kamboju, Andrew Morton, Maxime Ripard,
Ville Syrjala, Daniel Vetter, Guenter Roeck, Alessandro Carminati,
Jani Nikula, Shuah Khan, Mickael Salaun, Kees Cook,
Stephen Rothwell, dri-devel, kunit-dev, linux-arch, linux-kernel,
linux-s390, linux-next
[-- Attachment #1: Type: text/plain, Size: 1263 bytes --]
On Sat, 29 Mar 2025 at 23:04, Alessandro Carminati <acarmina@redhat.com> wrote:
>
> 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>
> ---
Makes sense and seems to work here. Thanks!
Acked-by: David Gow <davidgow@google.com>
Cheers,
-- David
> 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
>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5281 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kunit: fixes Compilation error on s390
2025-03-29 15:03 [PATCH] kunit: fixes Compilation error on s390 Alessandro Carminati
2025-03-29 22:09 ` Stephen Rothwell
2025-03-30 5:12 ` David Gow
@ 2025-03-31 9:33 ` Heiko Carstens
2 siblings, 0 replies; 4+ messages in thread
From: Heiko Carstens @ 2025-03-31 9:33 UTC (permalink / raw)
To: Alessandro Carminati
Cc: linux-kselftest, Dan Carpenter, Daniel Diaz, David Gow,
Arthur Grillo, Brendan Higgins, Naresh Kamboju, Andrew Morton,
Maxime Ripard, Ville Syrjala, Daniel Vetter, Guenter Roeck,
Alessandro Carminati, Jani Nikula, Shuah Khan, Mickael Salaun,
Kees Cook, Stephen Rothwell, dri-devel, kunit-dev, linux-arch,
linux-kernel, linux-s390, linux-next, Vasily Gorbik,
Alexander Gordeev
On Sat, Mar 29, 2025 at 03:03:20PM +0000, Alessandro Carminati wrote:
> 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(+)
Acked-by: Heiko Carstens <hca@linux.ibm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-03-31 9:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-29 15:03 [PATCH] kunit: fixes Compilation error on s390 Alessandro Carminati
2025-03-29 22:09 ` Stephen Rothwell
2025-03-30 5:12 ` David Gow
2025-03-31 9:33 ` Heiko Carstens
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).