Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3rdparty.lua: Fix compilation of Lzma for arm64 architecture #13080

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FlykeSpice
Copy link
Contributor

The builder was failing in compiling the Lzma source code due to the global compiler flag -Werror -Wstrict-prototype triggering errors when compiling code specific to arm64 architecture.

This PR sets the -Wno-error=strict-prototypes flag when building the Lzma library

@FlykeSpice
Copy link
Contributor Author

FlykeSpice commented Dec 14, 2024

It was causing the following build error:

Compiling 3rdparty/lzma/C/Bra.c...
Compiling 3rdparty/lzma/C/Bra86.c...
Compiling 3rdparty/lzma/C/BraIA64.c...
Compiling 3rdparty/lzma/C/CpuArch.c...
../../../../../3rdparty/lzma/C/CpuArch.c:777:3: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  777 |   MY_HWCAP_CHECK_FUNC_2(NEON, ASIMD)
      |   ^
../../../../../3rdparty/lzma/C/CpuArch.c:772:36: note: expanded from macro 'MY_HWCAP_CHECK_FUNC_2'
  772 |   BoolInt CPU_IsSupported_ ## name1() { return (getauxval(AT_HWCAP)  & (HWCAP_  ## name2)) ? 1 : 0; }
      |                                    ^
../../../../../3rdparty/lzma/C/CpuArch.c:793:1: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  793 | MY_HWCAP_CHECK_FUNC (CRC32)
      | ^
../../../../../3rdparty/lzma/C/CpuArch.c:776:3: note: expanded from macro 'MY_HWCAP_CHECK_FUNC'
  776 |   MY_HWCAP_CHECK_FUNC_2(name, name)
      |   ^
../../../../../3rdparty/lzma/C/CpuArch.c:772:36: note: expanded from macro 'MY_HWCAP_CHECK_FUNC_2'
  772 |   BoolInt CPU_IsSupported_ ## name1() { return (getauxval(AT_HWCAP)  & (HWCAP_  ## name2)) ? 1 : 0; }
      |                                    ^
../../../../../3rdparty/lzma/C/CpuArch.c:794:1: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  794 | MY_HWCAP_CHECK_FUNC (SHA1)
      | ^
../../../../../3rdparty/lzma/C/CpuArch.c:776:3: note: expanded from macro 'MY_HWCAP_CHECK_FUNC'
  776 |   MY_HWCAP_CHECK_FUNC_2(name, name)
      |   ^
../../../../../3rdparty/lzma/C/CpuArch.c:772:36: note: expanded from macro 'MY_HWCAP_CHECK_FUNC_2'
  772 |   BoolInt CPU_IsSupported_ ## name1() { return (getauxval(AT_HWCAP)  & (HWCAP_  ## name2)) ? 1 : 0; }
      |                                    ^
../../../../../3rdparty/lzma/C/CpuArch.c:795:1: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  795 | MY_HWCAP_CHECK_FUNC (SHA2)
      | ^
../../../../../3rdparty/lzma/C/CpuArch.c:776:3: note: expanded from macro 'MY_HWCAP_CHECK_FUNC'
  776 |   MY_HWCAP_CHECK_FUNC_2(name, name)
      |   ^
../../../../../3rdparty/lzma/C/CpuArch.c:772:36: note: expanded from macro 'MY_HWCAP_CHECK_FUNC_2'
  772 |   BoolInt CPU_IsSupported_ ## name1() { return (getauxval(AT_HWCAP)  & (HWCAP_  ## name2)) ? 1 : 0; }
      |                                    ^
../../../../../3rdparty/lzma/C/CpuArch.c:796:1: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  796 | MY_HWCAP_CHECK_FUNC (AES)
      | ^
../../../../../3rdparty/lzma/C/CpuArch.c:776:3: note: expanded from macro 'MY_HWCAP_CHECK_FUNC'
  776 |   MY_HWCAP_CHECK_FUNC_2(name, name)
      |   ^
../../../../../3rdparty/lzma/C/CpuArch.c:772:36: note: expanded from macro 'MY_HWCAP_CHECK_FUNC_2'
  772 |   BoolInt CPU_IsSupported_ ## name1() { return (getauxval(AT_HWCAP)  & (HWCAP_  ## name2)) ? 1 : 0; }
      |                                    ^
5 errors generated.
make[2]: *** [7z.make:531: ../../../../android/obj/arm64/Debug/3rdparty/lzma/C/CpuArch.o] Error 1``

@FlykeSpice FlykeSpice changed the title 3rdparty.lua: Fix compiling of Lzma to arm64 architecture 3rdparty.lua: Fix the compilation of Lzma to arm64 architecture Dec 14, 2024
@FlykeSpice FlykeSpice changed the title 3rdparty.lua: Fix the compilation of Lzma to arm64 architecture 3rdparty.lua: Fix compilation of Lzma for arm64 architecture Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant