--- a/src/corelib/plugin/qelfparser_p.cpp
+++ b/src/corelib/plugin/qelfparser_p.cpp
@@ -377,7 +377,9 @@ Q_DECL_UNUSED Q_DECL_COLD_FUNCTION stati
     // list definitely not exhaustive!
     case EM_NONE:       d << ", no machine"; break;
     case EM_ARM:        d << ", ARM"; break;
+#ifdef EM_AARCH64
     case EM_AARCH64:    d << ", AArch64"; break;
+#endif
 #ifdef EM_BLACKFIN
     case EM_BLACKFIN:   d << ", Blackfin"; break;
 #endif
