Bug 465782 - s390x: Valgrind doesn't compile with Clang on s390x
Summary: s390x: Valgrind doesn't compile with Clang on s390x
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Andreas Arnez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-15 17:25 UTC by Andreas Arnez
Modified: 2023-10-19 11:58 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Enable compiling Valgrind with clang (29.12 KB, patch)
2023-04-04 14:13 UTC, Andreas Arnez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Arnez 2023-02-15 17:25:56 UTC
When trying to compile Valgrind with Clang on s390x, there are multiple errors:

(1) "scalar-to-vector conversion failed, possible invalid constraint for vector type" -- in various inline-assemblies where an unsigned long is passed to an "f" constraint.
(2) "register expected" -- in an inline assembly where the notation "r11" for a general register is used.
(3) "invalid operand in inline asm: 'svc ${1:b}" -- in an inline assembly where a "b" modifier is used for a constant.
(4) "__builtin_setjmp is not supported for the current target" -- when expanding the VG_MINIMAL_SETJMP/LONGJMP macros.
Comment 1 Andreas Arnez 2023-04-04 14:13:10 UTC
Created attachment 157848 [details]
Enable compiling Valgrind with clang

This enables compiling Valgrind with Clang, excluding the s390-specific test cases. I'm working on another patch for the test cases, but that will be more extensive.
Comment 2 Andreas Arnez 2023-05-11 10:57:20 UTC
(In reply to Andreas Arnez from comment #1)
> Created attachment 157848 [details]
> Enable compiling Valgrind with clang
I pushed the above. Now clang should compile Valgrind for s390x successfully, except for the test cases.
Comment 3 Andreas Arnez 2023-10-19 11:58:05 UTC
I also pushed various patches for the test cases. While I've still seen Clang-specific issues with test case results, at least Valgrind can now be fully built with Clang for s390x. In my view, further test case fixes are out of the scope of this Bug. So I consider this fixed.