Announcement

Collapse
No announcement yet.

Clang LTO Support Merged For Linux 5.12 Including ARM64 + x86_64

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Clang LTO Support Merged For Linux 5.12 Including ARM64 + x86_64

    Phoronix: Clang LTO Support Merged For Linux 5.12 Including ARM64 + x86_64

    Pop open the champagne as the in-development Linux 5.12 kernel will be able to support link-time optimizations (LTO) in conjunction with the LLVM Clang compiler on not only AArch64 (64-bit ARM) but also x86_64...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    A very quick test of this and my Raven system didn't boot, it's an EFI stub kernel booted directly by UEFI without grub

    Comment


    • #3
      Originally posted by FireBurn View Post
      A very quick test of this and my Raven system didn't boot, it's an EFI stub kernel booted directly by UEFI without grub
      I'd strongly recommend reporting this upstream and providing any details you can.

      Comment


      • #4
        I'll need to reboot my other machine

        I've compiled it again on another and noticed these warnings:

        vmlinux.o: warning: objtool: aesni_gcm_init_avx_gen2()+0x12: unsupported stack pointer realignment
        vmlinux.o: warning: objtool: aesni_gcm_enc_update_avx_gen2()+0x12: unsupported stack pointer realignment
        vmlinux.o: warning: objtool: aesni_gcm_dec_update_avx_gen2()+0x12: unsupported stack pointer realignment
        vmlinux.o: warning: objtool: aesni_gcm_finalize_avx_gen2()+0x12: unsupported stack pointer realignment
        vmlinux.o: warning: objtool: aesni_gcm_init_avx_gen4()+0x12: unsupported stack pointer realignment
        vmlinux.o: warning: objtool: aesni_gcm_enc_update_avx_gen4()+0x12: unsupported stack pointer realignment
        vmlinux.o: warning: objtool: aesni_gcm_dec_update_avx_gen4()+0x12: unsupported stack pointer realignment
        vmlinux.o: warning: objtool: aesni_gcm_finalize_avx_gen4()+0x12: unsupported stack pointer realignment
        vmlinux.o: warning: objtool: sha1_transform_avx2()+0xc: unsupported stack pointer realignment
        vmlinux.o: warning: objtool: sha1_ni_transform()+0x7: unsupported stack pointer realignment
        vmlinux.o: warning: objtool: sha256_transform_rorx()+0x13: unsupported stack pointer realignment
        vmlinux.o: warning: objtool: sha512_transform_ssse3()+0x13: unsupported stack pointer realignment
        vmlinux.o: warning: objtool: sha512_transform_avx()+0x13: unsupported stack pointer realignment
        vmlinux.o: warning: objtool: sha512_transform_rorx()+0x7: unsupported stack pointer realignment
        vmlinux.o: warning: objtool: crc_pcl()+0x87: sibling call from callable instruction with modified stack frame
        vmlinux.o: warning: objtool: eb_relocate_parse_slow()+0x457: stack state mismatch: cfa1=7+128 cfa2=-1+0
        vmlinux.o: warning: objtool: eb_copy_relocations()+0x1d5: stack state mismatch: cfa1=7+96 cfa2=-1+0

        Comment


        • #5
          I'll play around with it some more in the morning and see if I can find the issue, hopefully it's just my local setup

          Comment


          • #6
            I tried to compile(without LTO) Linux 5.11.0 with Clang 12 on x86_64 and it cannot load my modules on boot...
            I don't use a complicated config, it's basically Ubuntu's config.
            Same kernel + config compiled and ran fine with GCC 10.2.0.

            Comment


            • #7
              First, hooray for getting it merged! With an earlier version of the patchset wih x86_64, I had no issues on my system. But that was on 5.10 with Clang 11.0.1 and a Kernel config which was heavily stripped down for my setup. Some Kernel options are also known to be problematic, such as stripping of unneeded symbols or the option for hardening against spectre/meltdown. Please report any issues here with details of the kernel, used toolchain and your config file: https://github.com/ClangBuiltLinux/linux/issues
              Last edited by ms178; 24 February 2021, 06:32 AM.

              Comment


              • #8
                It's working fine on my main machine

                [ 0.000000] Linux version 5.11.0-tip+ (root@axion) (clang version 11.1.0, LLD 11.1.0) #2606 SMP Wed Feb 24 03:26:27 GMT 2021

                I'll reboot the Raven box manaully and see if it starts this time

                Comment


                • #9
                  Ah, I forgot about an AMDGPU fix I needed to apply for my RAVEN system

                  Comment


                  • #10
                    Originally posted by FireBurn View Post
                    I'll need to reboot my other machine

                    I've compiled it again on another and noticed these warnings:

                    vmlinux.o: warning: objtool: aesni_gcm_init_avx_gen2()+0x12: unsupported stack pointer realignment
                    vmlinux.o: warning: objtool: aesni_gcm_enc_update_avx_gen2()+0x12: unsupported stack pointer realignment
                    vmlinux.o: warning: objtool: aesni_gcm_dec_update_avx_gen2()+0x12: unsupported stack pointer realignment
                    vmlinux.o: warning: objtool: aesni_gcm_finalize_avx_gen2()+0x12: unsupported stack pointer realignment
                    vmlinux.o: warning: objtool: aesni_gcm_init_avx_gen4()+0x12: unsupported stack pointer realignment
                    vmlinux.o: warning: objtool: aesni_gcm_enc_update_avx_gen4()+0x12: unsupported stack pointer realignment
                    vmlinux.o: warning: objtool: aesni_gcm_dec_update_avx_gen4()+0x12: unsupported stack pointer realignment
                    vmlinux.o: warning: objtool: aesni_gcm_finalize_avx_gen4()+0x12: unsupported stack pointer realignment
                    vmlinux.o: warning: objtool: sha1_transform_avx2()+0xc: unsupported stack pointer realignment
                    vmlinux.o: warning: objtool: sha1_ni_transform()+0x7: unsupported stack pointer realignment
                    vmlinux.o: warning: objtool: sha256_transform_rorx()+0x13: unsupported stack pointer realignment
                    vmlinux.o: warning: objtool: sha512_transform_ssse3()+0x13: unsupported stack pointer realignment
                    vmlinux.o: warning: objtool: sha512_transform_avx()+0x13: unsupported stack pointer realignment
                    vmlinux.o: warning: objtool: sha512_transform_rorx()+0x7: unsupported stack pointer realignment
                    vmlinux.o: warning: objtool: crc_pcl()+0x87: sibling call from callable instruction with modified stack frame
                    vmlinux.o: warning: objtool: eb_relocate_parse_slow()+0x457: stack state mismatch: cfa1=7+128 cfa2=-1+0
                    vmlinux.o: warning: objtool: eb_copy_relocations()+0x1d5: stack state mismatch: cfa1=7+96 cfa2=-1+0
                    Could you please mention some details of your system where you see this issues on, such as some hardware details and the toolchain, config and kernel source used for reproducing these issues at this specific post: https://github.com/ClangBuiltLinux/linux/issues/977

                    If you are using custom compiler flags, that would also be of interest.

                    Thanks!

                    Comment

                    Working...
                    X