Skip to contentSkip to conversation

travis-ci: Use clang-10 for the [s390x] Clang (disable-tcg) job

PATCH In review Philippe Mathieu-Daudé 3 participants 5 messages May 12, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 travis-ci: Use clang-10 for the [s390x] Clang (disable-tcg) job

On Ubuntu Bionic 18.04 LTS clang binary points to the 6.0 version:

  $ clang --version
  clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)

However we can install clang-10 from the bionic-updates stream [*] and use it, to silent the following warnings:

     CC      pc-bios/s390-ccw/main.o
  clang: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported [-Wignored-optimization-argument]
  clang: warning: argument unused during compilation: '-msoft-float' [-Wunused-command-line-argument]
  /home/travis/build/qemu/qemu/pc-bios/s390-ccw/main.c:284:5: warning: no previous prototype for function 'main' [-Wmissing-prototypes]
  int main(void)
      ^

1 warning generated.
clang: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported [-Wignored-optimization-argument]

[*] https://packages.ubuntu.com/bionic-updates/clang-10

---
However this doesn't resolve:

    /home/travis/build/philmd/qemu/pc-bios/s390-ccw/jump2ipl.c:67:18: error: invalid operand for instruction
        asm volatile("lghi 1,1\n\t"
                     ^
    <inline asm>:1:7: note: instantiated into assembly here
            lghi 1,1
                 ^
    /home/travis/build/philmd/qemu/pc-bios/s390-ccw/jump2ipl.c:67:29: error: invalid operand for instruction
        asm volatile("lghi 1,1\n\t"
                                ^
    <inline asm>:2:7: note: instantiated into assembly here
            diag 1,1,0x308
                 ^
    2 errors generated.
    Makefile:20: recipe for target 'jump2ipl.o' failed
    make[1]: *** [jump2ipl.o] Error 1

(see https://travis-ci.org/github/philmd/qemu/jobs/770920106#L1803,
https://travis-ci.org/github/philmd/qemu/jobs/770920522#L1818 for more errors).

---
 .travis.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
.travis.yml +2 -1
index 4609240b5aa..9c0deea9a06 100644
@@ -278,6 +278,7 @@ jobs:
       compiler: clang
       addons:
         apt_packages:
+          - clang-10
           - libaio-dev
           - libattr1-dev
           - libbrlapi-dev
@@ -303,7 +304,7 @@ jobs:
       env:
         - TEST_CMD="make check-unit"
         - CONFIG="--disable-containers --disable-tcg --enable-kvm
-                  --disable-tools --host-cc=clang --cxx=clang++"
+                  --disable-tools --host-cc=clang-10 --cc=clang-10 --cxx=clang++-10"
         - UNRELIABLE=true
 
     # Release builds
Signature · 1 line
2.26.3
#1 lore raw
Quoted 59 lines · Philippe Mathieu-Daudé

On Ubuntu Bionic 18.04 LTS clang binary points to the 6.0 version:

  $ clang --version
  clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)

However we can install clang-10 from the bionic-updates stream [*] and use it, to silent the following warnings:

     CC      pc-bios/s390-ccw/main.o
  clang: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported [-Wignored-optimization-argument]
  clang: warning: argument unused during compilation: '-msoft-float' [-Wunused-command-line-argument]
  /home/travis/build/qemu/qemu/pc-bios/s390-ccw/main.c:284:5: warning: no previous prototype for function 'main' [-Wmissing-prototypes]
  int main(void)
      ^

1 warning generated.
clang: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported [-Wignored-optimization-argument]

[*] https://packages.ubuntu.com/bionic-updates/clang-10

---
However this doesn't resolve:

    /home/travis/build/philmd/qemu/pc-bios/s390-ccw/jump2ipl.c:67:18: error: invalid operand for instruction
        asm volatile("lghi 1,1\n\t"
                     ^
    <inline asm>:1:7: note: instantiated into assembly here
            lghi 1,1
                 ^
    /home/travis/build/philmd/qemu/pc-bios/s390-ccw/jump2ipl.c:67:29: error: invalid operand for instruction
        asm volatile("lghi 1,1\n\t"
                                ^
    <inline asm>:2:7: note: instantiated into assembly here
            diag 1,1,0x308
                 ^
    2 errors generated.
    Makefile:20: recipe for target 'jump2ipl.o' failed
    make[1]: *** [jump2ipl.o] Error 1

(see https://travis-ci.org/github/philmd/qemu/jobs/770920106#L1803,
https://travis-ci.org/github/philmd/qemu/jobs/770920522#L1818 for more errors).

---
 .travis.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
.travis.yml +1 -0
index 4609240b5aa..9c0deea9a06 100644
@@ -278,6 +278,7 @@ jobs:
       compiler: clang
       addons:
         apt_packages:
+          - clang-10
           - libaio-dev
           - libattr1-dev
           - libbrlapi-dev

.travis.yml jobs: · line 307

Quoted 5 lines
.travis.yml +1 -1
@@ -303,7 +304,7 @@ jobs:
       env:
         - TEST_CMD="make check-unit"
         - CONFIG="--disable-containers --disable-tcg --enable-kvm
-                  --disable-tools --host-cc=clang --cxx=clang++"
+                  --disable-tools --host-cc=clang-10 --cc=clang-10 --cxx=clang++-10"

I forgot to mention we were missing the --cc= flag, so s390-ccw was built with an inconsistent $CC. I might respin this part separately.

Quoted 4 lines
.travis.yml +0 -0
         - UNRELIABLE=true
 
     # Release builds
#2 lore raw
Quoted 61 lines · Philippe Mathieu-Daudé
Quoted 60 lines · Philippe Mathieu-Daudé

On Ubuntu Bionic 18.04 LTS clang binary points to the 6.0 version:

   $ clang --version
   clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)

However we can install clang-10 from the bionic-updates stream [*] and use it, to silent the following warnings:

      CC      pc-bios/s390-ccw/main.o
   clang: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported [-Wignored-optimization-argument]
   clang: warning: argument unused during compilation: '-msoft-float' [-Wunused-command-line-argument]
   /home/travis/build/qemu/qemu/pc-bios/s390-ccw/main.c:284:5: warning: no previous prototype for function 'main' [-Wmissing-prototypes]
   int main(void)
       ^

1 warning generated.
clang: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported [-Wignored-optimization-argument]

[*] https://packages.ubuntu.com/bionic-updates/clang-10

---
However this doesn't resolve:

     /home/travis/build/philmd/qemu/pc-bios/s390-ccw/jump2ipl.c:67:18: error: invalid operand for instruction
         asm volatile("lghi 1,1\n\t"
                      ^
     <inline asm>:1:7: note: instantiated into assembly here
             lghi 1,1
                  ^
     /home/travis/build/philmd/qemu/pc-bios/s390-ccw/jump2ipl.c:67:29: error: invalid operand for instruction
         asm volatile("lghi 1,1\n\t"
                                 ^
     <inline asm>:2:7: note: instantiated into assembly here
             diag 1,1,0x308
                  ^
     2 errors generated.
     Makefile:20: recipe for target 'jump2ipl.o' failed
     make[1]: *** [jump2ipl.o] Error 1

(see https://travis-ci.org/github/philmd/qemu/jobs/770920106#L1803,
https://travis-ci.org/github/philmd/qemu/jobs/770920522#L1818 for more errors).

---
  .travis.yml | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
.travis.yml +1 -0
index 4609240b5aa..9c0deea9a06 100644
@@ -278,6 +278,7 @@ jobs:
        compiler: clang
        addons:
          apt_packages:
+          - clang-10
            - libaio-dev
            - libattr1-dev
            - libbrlapi-dev
@@ -303,7 +304,7 @@ jobs:
        env:
Quoted 8 lines

.travis.yml jobs: · line 307

Quoted 4 lines
.travis.yml +1 -1
          - TEST_CMD="make check-unit"
          - CONFIG="--disable-containers --disable-tcg --enable-kvm
-                  --disable-tools --host-cc=clang --cxx=clang++"
+                  --disable-tools --host-cc=clang-10 --cc=clang-10 --cxx=clang++-10"

I forgot to mention we were missing the --cc= flag, so s390-ccw was built with an inconsistent $CC. I might respin this part separately.

I think the configure script uses the same compiler as --host-cc for --cc if it is not specified. So depending on whether Daniel sets the minimum version to 6.3 or 6.0, we either can use this patch or we don't need it at all.

Thomas

#3 lore raw
Quoted 71 lines · Thomas Huth
Quoted 61 lines · Philippe Mathieu-Daudé
Quoted 60 lines · Philippe Mathieu-Daudé

On Ubuntu Bionic 18.04 LTS clang binary points to the 6.0 version:

   $ clang --version
   clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)

However we can install clang-10 from the bionic-updates stream [*] and use it, to silent the following warnings:

      CC      pc-bios/s390-ccw/main.o
   clang: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported [-Wignored-optimization-argument]
   clang: warning: argument unused during compilation: '-msoft-float' [-Wunused-command-line-argument]
   /home/travis/build/qemu/qemu/pc-bios/s390-ccw/main.c:284:5: warning: no previous prototype for function 'main' [-Wmissing-prototypes]
   int main(void)
       ^

1 warning generated.
clang: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported [-Wignored-optimization-argument]

[*] https://packages.ubuntu.com/bionic-updates/clang-10

---
However this doesn't resolve:

     /home/travis/build/philmd/qemu/pc-bios/s390-ccw/jump2ipl.c:67:18: error: invalid operand for instruction
         asm volatile("lghi 1,1\n\t"
                      ^
     <inline asm>:1:7: note: instantiated into assembly here
             lghi 1,1
                  ^
     /home/travis/build/philmd/qemu/pc-bios/s390-ccw/jump2ipl.c:67:29: error: invalid operand for instruction
         asm volatile("lghi 1,1\n\t"
                                 ^
     <inline asm>:2:7: note: instantiated into assembly here
             diag 1,1,0x308
                  ^
     2 errors generated.
     Makefile:20: recipe for target 'jump2ipl.o' failed
     make[1]: *** [jump2ipl.o] Error 1

(see https://travis-ci.org/github/philmd/qemu/jobs/770920106#L1803,
https://travis-ci.org/github/philmd/qemu/jobs/770920522#L1818 for more errors).

---
  .travis.yml | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
.travis.yml +1 -0
index 4609240b5aa..9c0deea9a06 100644
@@ -278,6 +278,7 @@ jobs:
        compiler: clang
        addons:
          apt_packages:
+          - clang-10
            - libaio-dev
            - libattr1-dev
            - libbrlapi-dev
@@ -303,7 +304,7 @@ jobs:
        env:
Quoted 8 lines

.travis.yml jobs: · line 307

Quoted 4 lines
.travis.yml +1 -1
          - TEST_CMD="make check-unit"
          - CONFIG="--disable-containers --disable-tcg --enable-kvm
-                  --disable-tools --host-cc=clang --cxx=clang++"
+                  --disable-tools --host-cc=clang-10 --cc=clang-10 --cxx=clang++-10"

I forgot to mention we were missing the --cc= flag, so s390-ccw was built with an inconsistent $CC. I might respin this part separately.

Quoted 3 lines

I think the configure script uses the same compiler as --host-cc for --cc if it is not specified. So depending on whether Daniel sets the minimum version to 6.3 or 6.0, we either can use this patch or we don't need it at all.

I'm going to set min to 6.0.0, because I expect most users on ubuntu will install the default "clang" and not realize there are extra clang-NNN versions

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#4 lore raw
Quoted 9 lines · Daniel P. Berrangé
Quoted 4 lines · Thomas Huth

I think the configure script uses the same compiler as --host-cc for --cc if it is not specified. So depending on whether Daniel sets the minimum version to 6.3 or 6.0, we either can use this patch or we don't need it at all.

I'm going to set min to 6.0.0, because I expect most users on ubuntu will install the default "clang" and not realize there are extra clang-NNN versions

Actually I messed up debian versions for clang in the same way, so I'll set clang min to 3.8

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|