chiark / gitweb /
architecture: also add tuples for old ARM BE ABI
[elogind.git] / src / shared / architecture.h
index 7163d1fcafa0b48ec0749325f5f999536c745d7b..4821d5d289f9dda0d6f961c39093bded046be09a 100644 (file)
 
 #include "util.h"
 
-/* A cleaned up architecture definition */
+/* A cleaned up architecture definition. We don't want to get lost in
+ * processor features, models, generations or even ABIs. Hence we
+ * focus on general family, and distuignish word width and
+ * endianess. */
 
 typedef enum Architecture {
         ARCHITECTURE_X86 = 0,
@@ -143,17 +146,25 @@ Architecture uname_architecture(void);
 #elif defined(__arm__)
 #  if defined(WORDS_BIGENDIAN)
 #    define native_architecture() ARCHITECTURE_ARM_BE
-#    if defined(__ARM_PCS_VFP)
-#      define LIB_ARCH_TUPLE "armeb-linux-gnueabihf"
+#    if defined(__ARM_EABI__)
+#      if defined(__ARM_PCS_VFP)
+#        define LIB_ARCH_TUPLE "armeb-linux-gnueabihf"
+#      else
+#        define LIB_ARCH_TUPLE "armeb-linux-gnueabi"
+#      endif
 #    else
-#      define LIB_ARCH_TUPLE "armeb-linux-gnueabi"
+#      define LIB_ARCH_TUPLE "armeb-linux-gnu"
 #    endif
 #  else
 #    define native_architecture() ARCHITECTURE_ARM
-#    if defined(__ARM_PCS_VFP)
-#      define LIB_ARCH_TUPLE "arm-linux-gnueabihf"
+#    if defined(__ARM_EABI__)
+#      if defined(__ARM_PCS_VFP)
+#        define LIB_ARCH_TUPLE "arm-linux-gnueabihf"
+#      else
+#        define LIB_ARCH_TUPLE "arm-linux-gnueabi"
+#      endif
 #    else
-#      define LIB_ARCH_TUPLE "arm-linux-gnueabi"
+#      define LIB_ARCH_TUPLE "arm-linux-gnu"
 #    endif
 #  endif
 #elif defined(__sh64__)