summary refs log tree commit diff stats
path: root/gitlab/issues_text/target_s390x/host_missing/accel_missing/1668
blob: 21da2aaad060d310c0cad93ec37568b28ae06ece (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Fedora 38 build of clang 16 fails when run under s390x emulation (both system & linux-user)
Description of problem:
Spawn a Fedora 38 container using `s390x` linux-user based emulation

```
$ podman run -it --platform linux/s390x fedora:latest
```

Install clang inside it

```
sh-5.2# dnf -y install clang
```

Try to run clang

```
sh-5.2# clang --version
clang version 16.0.4 (Fedora 16.0.4-1.fc38)
Target: s390x-redhat-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
sh-5.2# clang --help   
clang-16: error: unsupported option '--help'; did you mean '--help'?
clang-16: error: no input files
```

Notice the nonsense error message when requesting `--help`. With Fedora 37 build of clang 15 (compiled with gcc 12), under s390x emulation, `--help` will correctly print the help.  In fact all options except for `--version` appear to be broken:

```
sh-5.2# echo "void foo(void) {}" > foo.c
sh-5.2# clang -c foo.c
clang-16: error: unknown argument: '-c'
```


IOW, there appears to be something in the clang 16 (compiled with gcc 13) in Fedora 38 that is tripping up s390x emulation.

It is unclear whether the trigger was from building clang 16 with a newer gcc 13, or whether something changed from clang 15 -> 16.

Originally reported with qemu-user-static-7.2.1-1.fc38.x86_64, but I've reproduced with QEMU upstream 7.1.0 release and QEMU upstream git master (v8.0.0-394-gc2b7158455)

This was originally reported in Fedora at

  https://bugzilla.redhat.com/show_bug.cgi?id=2209635