From: John Paul Adrian Glaubitz Date: Thu, 2 Mar 2017 00:50:36 +0000 (+0100) Subject: basic/architecture: Properly set LIB_ARCH_TUPLE for x32 X-Git-Tag: v234~395^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c7c70c7c23c86836bb96e793e76c79f44784c07;p=thirdparty%2Fsystemd.git basic/architecture: Properly set LIB_ARCH_TUPLE for x32 On x86_64, there are two possible ABIs and hence values for LIB_ARCH_TUPLE. The convential 64-bit type and the 32-bit variant, called x32. The latter can be detected by checking whether __ILP32__ is defined. --- diff --git a/src/basic/architecture.h b/src/basic/architecture.h index 46883719d16..d07bc411e58 100644 --- a/src/basic/architecture.h +++ b/src/basic/architecture.h @@ -79,7 +79,11 @@ int uname_architecture(void); #if defined(__x86_64__) # define native_architecture() ARCHITECTURE_X86_64 -# define LIB_ARCH_TUPLE "x86_64-linux-gnu" +# if defined(__ILP32__) +# define LIB_ARCH_TUPLE "x86_64-linux-gnux32" +# else +# define LIB_ARCH_TUPLE "x86_64-linux-gnu" +# endif # define SECONDARY_ARCHITECTURE ARCHITECTURE_X86 #elif defined(__i386__) # define native_architecture() ARCHITECTURE_X86