[PATCH] kunit: fixes Compilation error on s390
David Gow
davidgow at google.com
Sun Mar 30 05:12:11 UTC 2025
On Sat, 29 Mar 2025 at 23:04, Alessandro Carminati <acarmina at 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 at redhat.com>
> ---
Makes sense and seems to work here. Thanks!
Acked-by: David Gow <davidgow at 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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5281 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250330/49cff915/attachment-0001.bin>
More information about the dri-devel
mailing list