]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic/architecture: Properly set LIB_ARCH_TUPLE for powerpcspe
authorJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Thu, 2 Mar 2017 00:51:11 +0000 (01:51 +0100)
committerJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Thu, 2 Mar 2017 00:51:11 +0000 (01:51 +0100)
On powerpc, there are two possible ABIs and hence values for
LIB_ARCH_TUPLE. The convential type with an FPU and the embedded
variant, called powerpcspe, which does not have a convential FPU
but a special Signal Processing Engine (SPE). The latter can be
detected by checking whether __NO_FPRS__ is defined.

src/basic/architecture.h

index d07bc411e58b7522291881fd5c36fedbbbb19628..f0de76f3fa5e5b53fa2d22477636a9433003a82d 100644 (file)
@@ -101,7 +101,11 @@ int uname_architecture(void);
 #elif defined(__powerpc__)
 #  if __BYTE_ORDER == __BIG_ENDIAN
 #    define native_architecture() ARCHITECTURE_PPC
-#    define LIB_ARCH_TUPLE "powerpc-linux-gnu"
+#    if defined(__NO_FPRS__)
+#      define LIB_ARCH_TUPLE "powerpc-linux-gnuspe"
+#    else
+#      define LIB_ARCH_TUPLE "powerpc-linux-gnu"
+#    endif
 #  else
 #    define native_architecture() ARCHITECTURE_PPC_LE
 #    error "Missing LIB_ARCH_TUPLE for PPCLE"