summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-24 19:21:18 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-24 19:21:18 +0100
commitae0e60fbbc28990617964204ea925a1ef8f42262 (patch)
treeb411a7ce44ab8f3e1d86d722f795637276505ab3 /src
parentd27893efdf652c6d85ea590fa0b7c2b88f817083 (diff)
architecture: apparently there is LE ppc now
Diffstat (limited to 'src')
-rw-r--r--src/shared/architecture.c4
-rw-r--r--src/shared/architecture.h14
2 files changed, 16 insertions, 2 deletions
diff --git a/src/shared/architecture.c b/src/shared/architecture.c
index 1dc5fa5c0f..ceba492f2b 100644
--- a/src/shared/architecture.c
+++ b/src/shared/architecture.c
@@ -51,7 +51,9 @@ Architecture uname_architecture(void) {
{ "i386", ARCHITECTURE_X86 },
#elif defined(__powerpc__) || defined(__powerpc64__)
{ "ppc64", ARCHITECTURE_PPC64 },
+ { "ppc64le", ARCHITECTURE_PPC64_LE },
{ "ppc", ARCHITECTURE_PPC },
+ { "ppcle", ARCHITECTURE_PPC_LE },
#elif defined(__ia64__)
{ "ia64", ARCHITECTURE_IA64 },
#elif defined(__hppa__) || defined(__hppa64__)
@@ -136,7 +138,9 @@ static const char *const architecture_table[_ARCHITECTURE_MAX] = {
[ARCHITECTURE_X86] = "x86",
[ARCHITECTURE_X86_64] = "x86-64",
[ARCHITECTURE_PPC] = "ppc",
+ [ARCHITECTURE_PPC_LE] = "ppc-le",
[ARCHITECTURE_PPC64] = "ppc64",
+ [ARCHITECTURE_PPC64_LE] = "ppc64-le",
[ARCHITECTURE_IA64] = "ia64",
[ARCHITECTURE_PARISC] = "parisc",
[ARCHITECTURE_PARISC64] = "parisc64",
diff --git a/src/shared/architecture.h b/src/shared/architecture.h
index 58a8164a75..3183645fec 100644
--- a/src/shared/architecture.h
+++ b/src/shared/architecture.h
@@ -27,7 +27,9 @@ typedef enum Architecture {
ARCHITECTURE_X86 = 0,
ARCHITECTURE_X86_64,
ARCHITECTURE_PPC,
+ ARCHITECTURE_PPC_LE,
ARCHITECTURE_PPC64,
+ ARCHITECTURE_PPC64_LE,
ARCHITECTURE_IA64,
ARCHITECTURE_PARISC,
ARCHITECTURE_PARISC64,
@@ -56,9 +58,17 @@ Architecture uname_architecture(void);
#elif defined(__i386__)
# define native_architecture() ARCHITECTURE_X86
#elif defined(__powerpc64__)
-# define native_architecture() ARCHITECTURE_PPC64
+# if defined(WORDS_BIGENDIAN)
+# define native_architecture() ARCHITECTURE_PPC64
+# else
+# define native_architecture() ARCHITECTURE_PPC64_LE
+# endif
#elif defined(__powerpc__)
-# define native_architecture() ARCHITECTURE_PPC
+# if defined(WORDS_BIGENDIAN)
+# define native_architecture() ARCHITECTURE_PPC
+# else
+# define native_architecture() ARCHITECTURE_PPC_LE
+# endif
#elif defined(__ia64__)
# define native_architecture() ARCHITECTURE_IA64
#elif defined(__hppa64__)