Menu

#413 ARM/PowerPC compilation fix for Linux 7-Zip 23.01

open
nobody
patch (7)
5
2023-06-24
2023-06-22
yokota
No

Linux 7-Zip 23.01 requires some fix when building 7-Zip on ARMv5, ARMv7, PowerPC.
Apply these patch to fix it.

  • ARM v5: disable NEON.
  • ARM v7: disable ARM v8 extended NEON.
  • PowerPC: rename "PPC" to "Z7_PPC". "PPC" is already defined as "1" by compiler.

Build logs can be examin from Debian build bot page
https://buildd.debian.org/status/package.php?p=7zip

3 Attachments

Discussion

  • Igor Pavlov

    Igor Pavlov - 2023-06-22

    7-zip detects neon availability at runtime via hwcap.
    And 7-zip can select between neon and non-neon code.
    So we want to use NEON in some functions, even if main code is not neon.
    for x86, we just use __attribute__ for avx2 functions:

    __attribute__((__target__("avx2")))
    

    What way to do similar thing for arm-neon ?

     

    Last edit: Igor Pavlov 2023-06-22
  • yokota

    yokota - 2023-06-22

    vrev16q_u8() requires -mfpu=neon option.
    If not, just provides compilation error.

    I rewrite0007-Disable-hardware-swap-code-on-armhf.patch and use NEON code in specfic section.
    Replace 0007 pacth and apply new one.

    PS: I don't have ARM machines. So I can't test this patch.

     

Log in to post a comment.