diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-07-11 16:16:27 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-07-11 16:16:37 +0200 |
commit | b4530012a6905a0f66a2e8491e90131c1c0dc5ad (patch) | |
tree | 5d4a82af9258c1f46309a0dbd0745358c836fa18 /patches | |
parent | dc40a95cad6e5c3e2581fd36fe19edca93518b34 (diff) | |
download | ptxdist-b4530012a6905a0f66a2e8491e90131c1c0dc5ad.tar.gz ptxdist-b4530012a6905a0f66a2e8491e90131c1c0dc5ad.tar.xz |
systemd: add upstream patch to fix building on PPC
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches')
4 files changed, 120 insertions, 7 deletions
diff --git a/patches/systemd-215/0001-util.h-include-missing.h-for-MAX_HANDLE_SZ.patch b/patches/systemd-215/0001-util.h-include-missing.h-for-MAX_HANDLE_SZ.patch index 13ad107dc..aaa2e17d4 100644 --- a/patches/systemd-215/0001-util.h-include-missing.h-for-MAX_HANDLE_SZ.patch +++ b/patches/systemd-215/0001-util.h-include-missing.h-for-MAX_HANDLE_SZ.patch @@ -4,11 +4,11 @@ Subject: [PATCH] util.h: include missing.h for MAX_HANDLE_SZ Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> --- - src/shared/util.h | 2 ++ + src/shared/util.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shared/util.h b/src/shared/util.h -index 0f8c393..8fd5b80 100644 +index e23069c..9bf5412 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -43,6 +43,8 @@ diff --git a/patches/systemd-215/0002-missing-defined-extra-clock-ids.patch b/patches/systemd-215/0002-missing-defined-extra-clock-ids.patch index 0927facfe..ed3e29486 100644 --- a/patches/systemd-215/0002-missing-defined-extra-clock-ids.patch +++ b/patches/systemd-215/0002-missing-defined-extra-clock-ids.patch @@ -4,16 +4,16 @@ Subject: [PATCH] missing: defined extra clock ids Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> --- - src/shared/missing.h | 10 ++++++++++ + src/shared/missing.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/shared/missing.h b/src/shared/missing.h -index 716d3b8..a01b7e2 100644 +index f129f0b..b344ec6 100644 --- a/src/shared/missing.h +++ b/src/shared/missing.h -@@ -415,3 +415,13 @@ enum { +@@ -478,3 +478,13 @@ static inline int setns(int fd, int nstype) { - #define IFLA_BOND_MAX (__IFLA_BOND_MAX - 1) + #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1) #endif + +#ifndef CLOCK_BOOTTIME diff --git a/patches/systemd-215/0003-always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch b/patches/systemd-215/0003-always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch new file mode 100644 index 000000000..fd85fe97a --- /dev/null +++ b/patches/systemd-215/0003-always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch @@ -0,0 +1,112 @@ +From: Lennart Poettering <lennart@poettering.net> +Date: Fri, 11 Jul 2014 15:56:16 +0200 +Subject: [PATCH] always check for __BYTE_ORDER == __BIG_ENDIAN when checking + for endianess + +Let's always stick to glibc's way to determine byte order, and not mix +autoconf-specific checks with gcc checks. +--- + src/shared/architecture.h | 12 ++++++------ + src/shared/gpt.h | 4 ++-- + src/shared/time-dst.c | 6 +++--- + 3 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/src/shared/architecture.h b/src/shared/architecture.h +index 4821d5d..58e97e5 100644 +--- a/src/shared/architecture.h ++++ b/src/shared/architecture.h +@@ -80,7 +80,7 @@ Architecture uname_architecture(void); + # define native_architecture() ARCHITECTURE_X86 + # define LIB_ARCH_TUPLE "i386-linux-gnu" + #elif defined(__powerpc64__) +-# if defined(WORDS_BIGENDIAN) ++# if __BYTE_ORDER == __BIG_ENDIAN + # define native_architecture() ARCHITECTURE_PPC64 + # define LIB_ARCH_TUPLE "ppc64-linux-gnu" + # else +@@ -88,7 +88,7 @@ Architecture uname_architecture(void); + # error "Missing LIB_ARCH_TUPLE for PPC64LE" + # endif + #elif defined(__powerpc__) +-# if defined(WORDS_BIGENDIAN) ++# if __BYTE_ORDER == __BIG_ENDIAN + # define native_architecture() ARCHITECTURE_PPC + # define LIB_ARCH_TUPLE "powerpc-linux-gnu" + # else +@@ -117,7 +117,7 @@ Architecture uname_architecture(void); + # define native_architecture() ARCHITECTURE_SPARC + # define LIB_ARCH_TUPLE "sparc-linux-gnu" + #elif defined(__mips64__) +-# if defined(WORDS_BIGENDIAN) ++# if __BYTE_ORDER == __BIG_ENDIAN + # define native_architecture() ARCHITECTURE_MIPS64 + # error "Missing LIB_ARCH_TUPLE for MIPS64" + # else +@@ -125,7 +125,7 @@ Architecture uname_architecture(void); + # error "Missing LIB_ARCH_TUPLE for MIPS64_LE" + # endif + #elif defined(__mips__) +-# if defined(WORDS_BIGENDIAN) ++# if __BYTE_ORDER == __BIG_ENDIAN + # define native_architecture() ARCHITECTURE_MIPS + # define LIB_ARCH_TUPLE "mips-linux-gnu" + # else +@@ -136,7 +136,7 @@ Architecture uname_architecture(void); + # define native_architecture() ARCHITECTURE_ALPHA + # define LIB_ARCH_TUPLE "alpha-linux-gnu" + #elif defined(__aarch64__) +-# if defined(WORDS_BIGENDIAN) ++# if __BYTE_ORDER == __BIG_ENDIAN + # define native_architecture() ARCHITECTURE_ARM64_BE + # define LIB_ARCH_TUPLE "aarch64_be-linux-gnu" + # else +@@ -144,7 +144,7 @@ Architecture uname_architecture(void); + # define LIB_ARCH_TUPLE "aarch64-linux-gnu" + # endif + #elif defined(__arm__) +-# if defined(WORDS_BIGENDIAN) ++# if __BYTE_ORDER == __BIG_ENDIAN + # define native_architecture() ARCHITECTURE_ARM_BE + # if defined(__ARM_EABI__) + # if defined(__ARM_PCS_VFP) +diff --git a/src/shared/gpt.h b/src/shared/gpt.h +index 64090e0..278940b 100644 +--- a/src/shared/gpt.h ++++ b/src/shared/gpt.h +@@ -42,10 +42,10 @@ + # define GPT_ROOT_NATIVE GPT_ROOT_X86 + #endif + +-#if defined(__aarch64__) && !defined(WORDS_BIGENDIAN) ++#if defined(__aarch64__) && (__BYTE_ORDER != __BIG_ENDIAN) + # define GPT_ROOT_NATIVE GPT_ROOT_ARM_64 + # define GPT_ROOT_SECONDARY GPT_ROOT_ARM +-#elif defined(__arm__) && !defined(WORDS_BIGENDIAN) ++#elif defined(__arm__) && (__BYTE_ORDER != __BIG_ENDIAN) + # define GPT_ROOT_NATIVE GPT_ROOT_ARM + #endif + +diff --git a/src/shared/time-dst.c b/src/shared/time-dst.c +index ceca2fa..6195b11 100644 +--- a/src/shared/time-dst.c ++++ b/src/shared/time-dst.c +@@ -207,8 +207,8 @@ read_again: + if (type_idxs[i] >= num_types) + return -EINVAL; + +- if (BYTE_ORDER == BIG_ENDIAN ? sizeof(time_t) == 8 && trans_width == 4 +- : sizeof(time_t) == 4 || trans_width == 4) { ++ if (__BYTE_ORDER == __BIG_ENDIAN ? sizeof(time_t) == 8 && trans_width == 4 ++ : sizeof(time_t) == 4 || trans_width == 4) { + /* Decode the transition times, stored as 4-byte integers in + network (big-endian) byte order. We work from the end of + the array so as not to clobber the next element to be +@@ -216,7 +216,7 @@ read_again: + i = num_transitions; + while (i-- > 0) + transitions[i] = decode((char *)transitions + i * 4); +- } else if (BYTE_ORDER != BIG_ENDIAN && sizeof(time_t) == 8) { ++ } else if (__BYTE_ORDER != __BIG_ENDIAN && sizeof(time_t) == 8) { + /* Decode the transition times, stored as 8-byte integers in + network (big-endian) byte order. */ + for (i = 0; i < num_transitions; ++i) diff --git a/patches/systemd-215/series b/patches/systemd-215/series index f1b53f35b..f0c8f0c83 100644 --- a/patches/systemd-215/series +++ b/patches/systemd-215/series @@ -2,4 +2,5 @@ #tag:base --start-number 1 0001-util.h-include-missing.h-for-MAX_HANDLE_SZ.patch 0002-missing-defined-extra-clock-ids.patch -# bbb663749308eea6ee98749ae00ecbd4 - git-ptx-patches magic +0003-always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch +# 69ccf43a69835ab1b39ba354f76f27f9 - git-ptx-patches magic |