From b11f0b6a703a7f10e7c19c3f857911bf0bf26636 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 25 Jun 2019 19:09:50 +0200 Subject: [PATCH] Do not propagate DYNAMIC_ARCH to CFLAGS if it is not supported on the architecture --- cmake/system.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/system.cmake b/cmake/system.cmake index 4cd77ba09..c0dc308d9 100644 --- a/cmake/system.cmake +++ b/cmake/system.cmake @@ -199,10 +199,12 @@ if (NEED_PIC) endif() endif () -if (DYNAMIC_ARCH) - set(CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_ARCH") - if (DYNAMIC_OLDER) - set(CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_OLDER") +if (X86 OR X86_64 OR ARM64 OR PPC) + if (DYNAMIC_ARCH) + set(CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_ARCH") + if (DYNAMIC_OLDER) + set(CCOMMON_OPT "${CCOMMON_OPT} -DDYNAMIC_OLDER") + endif () endif () endif ()