@@ -362,7 +362,7 @@ else()
362362 endif ()
363363 endif ()
364364
365- if (NACL AND USE_NACL_SAIGO AND SAIGO_ARCH STREQUAL "arm" )
365+ if (NACL AND USE_NACL_SAIGO AND SAIGO_DAEMON_ARCH_arm )
366366 # This should be set for every build type because build type flags
367367 # are set after the other custom flags and then have the last word.
368368 # DEBUG should already use -O0 anyway.
@@ -503,12 +503,12 @@ else()
503503
504504 if ("${FLAG_LINKER_PIE} " AND MINGW)
505505 # https://github.com/msys2/MINGW-packages/issues/4100
506- if (ARCH STREQUAL "i686" )
506+ if (DAEMON_ARCH_i686 )
507507 set_linker_flag ("-Wl,-e,_mainCRTStartup" )
508- elseif (ARCH STREQUAL "amd64" )
508+ elseif (DAEMON_ARCH_amd64 )
509509 set_linker_flag ("-Wl,-e,mainCRTStartup" )
510510 else ()
511- message (FATAL_ERROR "Unsupported architecture ${ARCH } " )
511+ message (FATAL_ERROR "Unsupported architecture ${DAEMON_ARCH } " )
512512 endif ()
513513 endif ()
514514 endif ()
@@ -578,7 +578,7 @@ option(USE_CPU_RECOMMENDED_FEATURES "Use some common hardware features like SSE2
578578
579579# Target options.
580580if (MSVC )
581- if (ARCH STREQUAL "i686" )
581+ if (DAEMON_ARCH_i686 )
582582 if (USE_CPU_RECOMMENDED_FEATURES)
583583 set_c_cxx_flag ("/arch:SSE2" ) # This is the default
584584 else ()
@@ -598,7 +598,7 @@ elseif (NOT NACL)
598598 # Running a server with a native executable game is also a valid usage
599599 # not requiring the NX bit.
600600
601- if (ARCH STREQUAL "amd64" )
601+ if (DAEMON_ARCH_amd64 )
602602 # K8 or EM64T minimum: AMD Athlon 64 ClawHammer, Intel Xeon Nocona, Intel Pentium 4 model F (Prescott revision EO), VIA Nano.
603603 if (DAEMON_CXX_COMPILER_ICC)
604604 set (GCC_GENERIC_ARCH "pentium4" )
@@ -608,15 +608,15 @@ elseif (NOT NACL)
608608 set (GCC_GENERIC_ARCH "x86-64" )
609609 endif ()
610610 set (GCC_GENERIC_TUNE "generic" )
611- elseif (ARCH STREQUAL "i686" )
611+ elseif (DAEMON_ARCH_i686 )
612612 # P6 or K6 minimum: Intel Pentium Pro, AMD K6, Via Cyrix III, Via C3.
613613 set (GCC_GENERIC_ARCH "i686" )
614614 set (GCC_GENERIC_TUNE "generic" )
615- elseif (ARCH STREQUAL "arm64" )
615+ elseif (DAEMON_ARCH_arm64 )
616616 # Armv8-A minimum: Cortex-A50.
617617 set (GCC_GENERIC_ARCH "armv8-a" )
618618 set (GCC_GENERIC_TUNE "generic" )
619- elseif (ARCH STREQUAL "armhf" )
619+ elseif (DAEMON_ARCH_armhf )
620620 # Armv7-A minimum with VFPv3 and optional NEONv1: Cortex-A5.
621621 # Hard float ABI (mainstream 32-bit ARM Linux distributions).
622622 # An FPU should be explicitly set on recent compilers or this
@@ -625,15 +625,15 @@ elseif (NOT NACL)
625625 # lacks an FPU
626626 set (GCC_GENERIC_ARCH "armv7-a+fp" )
627627 set (GCC_GENERIC_TUNE "generic-armv7-a" )
628- elseif (ARCH STREQUAL "armel" )
628+ elseif (DAEMON_ARCH_armel )
629629 # Armv6 minimum with optional VFP: ARM11.
630630 # Soft float ABI (previous mainstream 32-bit ARM Linux
631631 # distributions, mainstream 32-bit ARM Android distributions).
632632 set (GCC_GENERIC_ARCH "armv6" )
633633 # There is no generic tuning option for armv6.
634634 unset (GCC_GENERIC_TUNE)
635635 else ()
636- message (WARNING "Unknown architecture ${ARCH } " )
636+ message (WARNING "Unknown architecture ${DAEMON_ARCH } " )
637637 endif ()
638638
639639 if ("${DAEMON_CXX_COMPILER_NAME} " STREQUAL "Zig" )
@@ -652,18 +652,18 @@ elseif (NOT NACL)
652652 endif ()
653653
654654 if (USE_CPU_RECOMMENDED_FEATURES)
655- if (ARCH STREQUAL "amd64" )
655+ if (DAEMON_ARCH_amd64 )
656656 # CMPXCHG16B minimum (x86-64-v2): AMD64 revision F.
657657 try_c_cxx_flag_werror (MCX16 "-mcx16" )
658- elseif (ARCH STREQUAL "i686" )
658+ elseif (DAEMON_ARCH_i686 )
659659 # SSE2 minimum: Intel Pentium 4 (Prescott),
660660 # Intel Pentium M (Banias), AMD K8, Via C7.
661661 try_c_cxx_flag_werror (MSSE2 "-msse2" )
662662 try_c_cxx_flag_werror (MFPMATH_SSE "-mfpmath=sse" )
663- elseif (ARCH STREQUAL "armhf" )
663+ elseif (DAEMON_ARCH_armhf )
664664 # NEONv1 minimum.
665665 try_c_cxx_flag_werror (MFPU_NEON "-mfpu=neon" )
666- elseif (ARCH STREQUAL "armel" )
666+ elseif (DAEMON_ARCH_armel )
667667 # VFP minimum, hard float with soft float ABI.
668668 try_c_cxx_flag_werror (MFPU_VFP "-mfpu=vfp" )
669669 try_c_cxx_flag_werror (MFLOAT_ABI_SOFTFP "-mfloat-abi=softfp" )
0 commit comments