diff options
author | John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> | 2017-03-02 01:50:36 +0100 |
---|---|---|
committer | John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> | 2017-03-02 01:50:36 +0100 |
commit | 4c7c70c7c23c86836bb96e793e76c79f44784c07 (patch) | |
tree | 8ecd5d31ef7d18e81e1141b5de78edd5f51694f9 /src/basic/architecture.h | |
parent | Revert "environment.d: fix date" (diff) | |
download | systemd-4c7c70c7c23c86836bb96e793e76c79f44784c07.tar.xz systemd-4c7c70c7c23c86836bb96e793e76c79f44784c07.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/basic/architecture.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/basic/architecture.h b/src/basic/architecture.h index 46883719d1..d07bc411e5 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 |