diff --git a/cmake/system.cmake b/cmake/system.cmake index c0dc308d9..ecc67174e 100644 --- a/cmake/system.cmake +++ b/cmake/system.cmake @@ -199,12 +199,15 @@ if (NEED_PIC) endif() endif () -if (X86 OR X86_64 OR ARM64 OR PPC) - if (DYNAMIC_ARCH) +if (DYNAMIC_ARCH) + if (X86 OR X86_64 OR ARM64 OR PPC) set(CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_ARCH") if (DYNAMIC_OLDER) set(CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_OLDER") endif () + else () + unset (DYNAMIC_ARCH) + message (STATUS "DYNAMIC_ARCH is not supported on the target architecture, removing") endif () endif ()