All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix build errors for x32
@ 2018-12-13 14:14 kai.kang
  2018-12-13 14:14 ` [PATCH 1/2] systemd: fix compile error " kai.kang
  2018-12-13 14:14 ` [PATCH 2/2] lttng-tools: " kai.kang
  0 siblings, 2 replies; 3+ messages in thread
From: kai.kang @ 2018-12-13 14:14 UTC (permalink / raw)
  To: openembedded-core

From: Kai Kang <kai.kang@windriver.com>

The following changes since commit e235a9e18bad4758650c11cd98133de695b72bd1:

  bitbake: bitbake-user-manual: Added "usehead" parameter. (2018-12-10 20:32:05 +0000)

are available in the Git repository at:

  git://git.pokylinux.org/poky-contrib kangkai/systemd-req
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/systemd-req

Kai Kang (2):
  systemd: fix compile error for x32
  lttng-tools: fix compile error for x32

 ...hanges-type-of-drift_freq-to-int64_t.patch | 49 +++++++++++++++++++
 meta/recipes-core/systemd/systemd_239.bb      |  1 +
 .../lttng/lttng-tools/x32.patch               | 28 +++++++++--
 3 files changed, 74 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-timesync-changes-type-of-drift_freq-to-int64_t.patch

-- 
2.19.0.rc2



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] systemd: fix compile error for x32
  2018-12-13 14:14 [PATCH 0/2] Fix build errors for x32 kai.kang
@ 2018-12-13 14:14 ` kai.kang
  2018-12-13 14:14 ` [PATCH 2/2] lttng-tools: " kai.kang
  1 sibling, 0 replies; 3+ messages in thread
From: kai.kang @ 2018-12-13 14:14 UTC (permalink / raw)
  To: openembedded-core

From: Kai Kang <kai.kang@windriver.com>

Backport patch to fix systemd compile error for x32:

| ../git/src/timesync/timesyncd-manager.c:607:19: error: format '%lli'
| expects argument of type 'long long int', but argument 11 has type
| 'long int' [-Werror=format=]

[YOCTO #13074]

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 ...hanges-type-of-drift_freq-to-int64_t.patch | 49 +++++++++++++++++++
 meta/recipes-core/systemd/systemd_239.bb      |  1 +
 2 files changed, 50 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-timesync-changes-type-of-drift_freq-to-int64_t.patch

diff --git a/meta/recipes-core/systemd/systemd/0001-timesync-changes-type-of-drift_freq-to-int64_t.patch b/meta/recipes-core/systemd/systemd/0001-timesync-changes-type-of-drift_freq-to-int64_t.patch
new file mode 100644
index 0000000000..8d395c2fa3
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-timesync-changes-type-of-drift_freq-to-int64_t.patch
@@ -0,0 +1,49 @@
+Backport patch to fix systemd build failure on x32.
+
+Upstream-Status: Backport [https://github.com/systemd/systemd/commit/75ca162]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+From 75ca1621db4647a4d62d7873cd6715e28fe0f9fa Mon Sep 17 00:00:00 2001
+From: Yu Watanabe <watanabe.yu+github@gmail.com>
+Date: Sat, 23 Jun 2018 09:41:55 +0900
+Subject: [PATCH] timesync: changes type of drift_freq to int64_t
+
+drift_freq is used for storing timex.freq, and is a 64bit integer.
+To support x32 ABI, this changes the type of drift_freq to int64_t.
+
+Fixes #9387.
+---
+ src/timesync/timesyncd-manager.c | 2 +-
+ src/timesync/timesyncd-manager.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c
+index 2b731af9e..404a2b189 100644
+--- a/src/timesync/timesyncd-manager.c
++++ b/src/timesync/timesyncd-manager.c
+@@ -604,7 +604,7 @@ static int manager_receive_response(sd_event_source *source, int fd, uint32_t re
+         m->dest_time = *recv_time;
+         m->spike = spike;
+ 
+-        log_debug("interval/delta/delay/jitter/drift " USEC_FMT "s/%+.3fs/%.3fs/%.3fs/%+"PRI_TIMEX"ppm%s",
++        log_debug("interval/delta/delay/jitter/drift " USEC_FMT "s/%+.3fs/%.3fs/%.3fs/%+"PRIi64"ppm%s",
+                   m->poll_interval_usec / USEC_PER_SEC, offset, delay, m->samples_jitter, m->drift_freq / 65536,
+                   spike ? " (ignored)" : "");
+ 
+diff --git a/src/timesync/timesyncd-manager.h b/src/timesync/timesyncd-manager.h
+index d8d97cc1e..18347416d 100644
+--- a/src/timesync/timesyncd-manager.h
++++ b/src/timesync/timesyncd-manager.h
+@@ -79,7 +79,7 @@ struct Manager {
+         /* last change */
+         bool jumped;
+         bool sync;
+-        long drift_freq;
++        int64_t drift_freq;
+ 
+         /* watch for time changes */
+         sd_event_source *event_clock_watch;
+-- 
+2.17.0
+
diff --git a/meta/recipes-core/systemd/systemd_239.bb b/meta/recipes-core/systemd/systemd_239.bb
index c53ce0d78e..a40c89973a 100644
--- a/meta/recipes-core/systemd/systemd_239.bb
+++ b/meta/recipes-core/systemd/systemd_239.bb
@@ -34,6 +34,7 @@ SRC_URI += "file://touchscreen.rules \
            file://0001-chown-recursive-let-s-rework-the-recursive-logic-to-.patch \
            file://0001-dhcp6-make-sure-we-have-enough-space-for-the-DHCP6-o.patch \
            file://0001-Revert-sysctl.d-request-ECN-on-both-in-and-outgoing-.patch \
+           file://0001-timesync-changes-type-of-drift_freq-to-int64_t.patch \
            "
 
 # patches made for musl are only applied on TCLIBC is musl
-- 
2.19.0.rc2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] lttng-tools: fix compile error for x32
  2018-12-13 14:14 [PATCH 0/2] Fix build errors for x32 kai.kang
  2018-12-13 14:14 ` [PATCH 1/2] systemd: fix compile error " kai.kang
@ 2018-12-13 14:14 ` kai.kang
  1 sibling, 0 replies; 3+ messages in thread
From: kai.kang @ 2018-12-13 14:14 UTC (permalink / raw)
  To: openembedded-core

From: Kai Kang <kai.kang@windriver.com>

Fix build error of src/common/utils.c for x32:

| .../src/common/utils.c: Assembler messages:
| .../src/common/utils.c:1026: Error: register type mismatch for `bsr'
| .../src/common/utils.c:1028: Error: operand type mismatch for `movq'
| make[3]: *** [utils.lo] Error 1

[YOCTO #13081]

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 .../lttng/lttng-tools/x32.patch               | 28 ++++++++++++++++---
 1 file changed, 24 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-kernel/lttng/lttng-tools/x32.patch b/meta/recipes-kernel/lttng/lttng-tools/x32.patch
index b1bb8e4930..42cebf94ac 100644
--- a/meta/recipes-kernel/lttng/lttng-tools/x32.patch
+++ b/meta/recipes-kernel/lttng/lttng-tools/x32.patch
@@ -1,11 +1,31 @@
 Fix build for x32
 
-Upstream-Status: Pending
 Signed-off-by: Christopher Larson <chris_larson@mentor.com>
 
---- lttng-tools-2.6.0/src/bin/lttng/utils.c~	2015-01-26 18:17:15.000000000 +0100
-+++ lttng-tools-2.6.0/src/bin/lttng/utils.c	2015-07-30 19:45:25.632045712 +0200
-@@ -130,7 +130,7 @@
+Fix build error of src/common/utils.c for x32.
+
+Upstream-Status: Submitted [https://github.com/lttng/lttng-tools/pull/150]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+diff --git a/src/bin/lttng/utils.c b/src/bin/lttng/utils.c
+index 0e96ef0c..5c79c8c7 100644
+--- a/src/bin/lttng/utils.c
++++ b/src/bin/lttng/utils.c
+@@ -158,7 +158,7 @@ unsigned int fls_u32(uint32_t x)
+ #define HAS_FLS_U32
+ #endif
+ 
+-#if defined(__x86_64)
++#if defined(__x86_64) && !defined(__ILP32__)
+ static inline
+ unsigned int fls_u64(uint64_t x)
+ {
+diff --git a/src/common/utils.c b/src/common/utils.c
+index 08139e5e..3c389981 100644
+--- a/src/common/utils.c
++++ b/src/common/utils.c
+@@ -1223,7 +1223,7 @@ static inline unsigned int fls_u32(uint32_t x)
  #define HAS_FLS_U32
  #endif
  
-- 
2.19.0.rc2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-13 14:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-13 14:14 [PATCH 0/2] Fix build errors for x32 kai.kang
2018-12-13 14:14 ` [PATCH 1/2] systemd: fix compile error " kai.kang
2018-12-13 14:14 ` [PATCH 2/2] lttng-tools: " kai.kang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.