summaryrefslogtreecommitdiffstats
path: root/src/basic/architecture.h
diff options
context:
space:
mode:
authorJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>2017-03-02 01:51:53 +0100
committerJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>2017-03-02 10:29:43 +0100
commit9da2a0ac4e09dc36da5570bec80fd7d78ac4da8e (patch)
tree26c9f123723c63fdc7496f9d2c9e55a5d20b89da /src/basic/architecture.h
parentbasic/architecture: Properly set LIB_ARCH_TUPLE for powerpcspe (diff)
downloadsystemd-9da2a0ac4e09dc36da5570bec80fd7d78ac4da8e.tar.xz
systemd-9da2a0ac4e09dc36da5570bec80fd7d78ac4da8e.zip
basic/architecture: Add sub-architecture types for SuperH
On SuperH, there are multiple sub-architectures defined with different values for LIB_ARCH_TUPLE. The different sub- architectures can be detected by checking whether __SH1__, __SH2__, __SH3__, __SH4__, and so on are defined.
Diffstat (limited to '')
-rw-r--r--src/basic/architecture.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/basic/architecture.h b/src/basic/architecture.h
index f0de76f3fa..db7e03f02a 100644
--- a/src/basic/architecture.h
+++ b/src/basic/architecture.h
@@ -197,7 +197,23 @@ int uname_architecture(void);
# error "Missing LIB_ARCH_TUPLE for SH64"
#elif defined(__sh__)
# define native_architecture() ARCHITECTURE_SH
-# define LIB_ARCH_TUPLE "sh4-linux-gnu"
+# if defined(__SH1__)
+# define LIB_ARCH_TUPLE "sh1-linux-gnu"
+# elif defined(__SH2__)
+# define LIB_ARCH_TUPLE "sh2-linux-gnu"
+# elif defined(__SH2A__)
+# define LIB_ARCH_TUPLE "sh2a-linux-gnu"
+# elif defined(__SH2E__)
+# define LIB_ARCH_TUPLE "sh2e-linux-gnu"
+# elif defined(__SH3__)
+# define LIB_ARCH_TUPLE "sh3-linux-gnu"
+# elif defined(__SH3E__)
+# define LIB_ARCH_TUPLE "sh3e-linux-gnu"
+# elif defined(__SH4__) && !defined(__SH4A__)
+# define LIB_ARCH_TUPLE "sh4-linux-gnu"
+# elif defined(__SH4A__)
+# define LIB_ARCH_TUPLE "sh4a-linux-gnu"
+# endif
#elif defined(__m68k__)
# define native_architecture() ARCHITECTURE_M68K
# define LIB_ARCH_TUPLE "m68k-linux-gnu"