ARM32 gcc12 build workaround (#1297)

* add ARM32 gcc compile option workaround

* add no-ipa-modref only in gcc11 and higher
This commit is contained in:
Michael Baentsch 2022-09-07 19:21:27 +02:00 committed by GitHub
parent 930f78d066
commit 489aa7eb59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,6 +169,12 @@ elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
endif () endif ()
endif() endif()
# workaround for gcc issues on ARM32 as per https://github.com/open-quantum-safe/liboqs/issues/1288
if(ARCH_ARM32v7 AND (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "11.0.0"))
add_compile_options(-fno-ipa-modref)
add_compile_options(-fno-ipa-pure-const)
endif()
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC") elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
# Warning C4146 is raised when a unary minus operator is applied to an # Warning C4146 is raised when a unary minus operator is applied to an
# unsigned type; this has nonetheless been standard and portable for as # unsigned type; this has nonetheless been standard and portable for as