From: John Paul Adrian Glaubitz Date: Thu, 2 Mar 2017 00:51:53 +0000 (+0100) Subject: basic/architecture: Add sub-architecture types for SuperH X-Git-Tag: v234~395^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9da2a0ac4e09dc36da5570bec80fd7d78ac4da8e;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/basic/architecture.h b/src/basic/architecture.h index f0de76f3fa5..db7e03f02a4 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"