All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 0/3] Recipes fix for build in x32 ABI
@ 2015-03-17 16:06 Aníbal Limón
  2015-03-17 16:06 ` [PATCHv2 1/3] mdadm: Fix " Aníbal Limón
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Aníbal Limón @ 2015-03-17 16:06 UTC (permalink / raw)
  To: openembedded-core

The next set of patches fixes builds for mdadm, systemtap and puzzles related 
to time_t that is long long int in x32 ABI instead of long int in normal x86_64.

The following changes since commit df0672b038e6942c97d266af9ca175a06f2b0423:

  bitbake: toaster: Fix the orderkey to match the column (2015-03-16 17:44:13 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib alimon/x32_time_t_bugs
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=alimon/x32_time_t_bugs

Aníbal Limón (3):
  mdadm: Fix build in x32 ABI
  systemtap: Fix build in x32 ABI
  puzzles: Fix build in x32 ABI

 .../mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch   | 26 +++++++++++++++++
 meta/recipes-extended/mdadm/mdadm_3.3.2.bb         |  1 +
 .../systemtap/systemtap/x32_abi_time.patch         | 34 ++++++++++++++++++++++
 meta/recipes-kernel/systemtap/systemtap_git.inc    |  1 +
 .../puzzles/files/puzzles_x32_abi_time.patch       | 30 +++++++++++++++++++
 meta/recipes-sato/puzzles/puzzles_r10116.bb        |  1 +
 6 files changed, 93 insertions(+)
 create mode 100644 meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
 create mode 100644 meta/recipes-kernel/systemtap/systemtap/x32_abi_time.patch
 create mode 100644 meta/recipes-sato/puzzles/files/puzzles_x32_abi_time.patch

-- 
1.9.1



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

* [PATCHv2 1/3] mdadm: Fix build in x32 ABI
  2015-03-17 16:06 [PATCHv2 0/3] Recipes fix for build in x32 ABI Aníbal Limón
@ 2015-03-17 16:06 ` Aníbal Limón
  2015-03-17 16:06 ` [PATCHv2 2/3] systemtap: " Aníbal Limón
  2015-03-17 16:06 ` [PATCHv2 3/3] puzzles: " Aníbal Limón
  2 siblings, 0 replies; 4+ messages in thread
From: Aníbal Limón @ 2015-03-17 16:06 UTC (permalink / raw)
  To: openembedded-core

Add a patch for fix build in x32 ABI, the fail is cause by time_t
printf because time_t is long int in x64 and long long int in x32.

[YOCTO #7422]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
 .../mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch   | 26 ++++++++++++++++++++++
 meta/recipes-extended/mdadm/mdadm_3.3.2.bb         |  1 +
 2 files changed, 27 insertions(+)
 create mode 100644 meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch

diff --git a/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch b/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
new file mode 100644
index 0000000..143a8d9
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
@@ -0,0 +1,26 @@
+When try to print time_t values as a long int it causes an error because time_t
+data type in x32 ABI is long long int.
+
+Upstream-Status: Pending
+
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
+
+diff --git a/monitor.c b/monitor.c
+index f81e707..19ea041 100644
+--- a/monitor.c
++++ b/monitor.c
+@@ -260,8 +260,13 @@ static int read_and_act(struct active_array *a)
+ 	}
+ 
+ 	gettimeofday(&tv, NULL);
++#if defined(__x86_64__) && defined(__ILP32__)
++	dprintf("%s(%d): %lld.%06lld state:%s prev:%s action:%s prev: %s start:%llu\n",
++#else
+ 	dprintf("%s(%d): %ld.%06ld state:%s prev:%s action:%s prev: %s start:%llu\n",
+-		__func__, a->info.container_member,
++#endif
++		__func__,
++		a->info.container_member,
+ 		tv.tv_sec, tv.tv_usec,
+ 		array_states[a->curr_state],
+ 		array_states[a->prev_state],
diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.2.bb b/meta/recipes-extended/mdadm/mdadm_3.3.2.bb
index 7140990..c6a5635 100644
--- a/meta/recipes-extended/mdadm/mdadm_3.3.2.bb
+++ b/meta/recipes-extended/mdadm/mdadm_3.3.2.bb
@@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
            file://mdadm-3.2.2_fix_for_x32.patch \
            file://gcc-4.9.patch \
+           file://mdadm-3.3.2_x32_abi_time_t.patch \
 	  "
 
 SRC_URI[md5sum] = "44698d351501cac6a89072dc877eb220"
-- 
1.9.1



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

* [PATCHv2 2/3] systemtap: Fix build in x32 ABI
  2015-03-17 16:06 [PATCHv2 0/3] Recipes fix for build in x32 ABI Aníbal Limón
  2015-03-17 16:06 ` [PATCHv2 1/3] mdadm: Fix " Aníbal Limón
@ 2015-03-17 16:06 ` Aníbal Limón
  2015-03-17 16:06 ` [PATCHv2 3/3] puzzles: " Aníbal Limón
  2 siblings, 0 replies; 4+ messages in thread
From: Aníbal Limón @ 2015-03-17 16:06 UTC (permalink / raw)
  To: openembedded-core

Add a patch for fix printing of time_t value that is long long int
in x32 ABI instead of long int.

[YOCTO #7423]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
 .../systemtap/systemtap/x32_abi_time.patch         | 34 ++++++++++++++++++++++
 meta/recipes-kernel/systemtap/systemtap_git.inc    |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 meta/recipes-kernel/systemtap/systemtap/x32_abi_time.patch

diff --git a/meta/recipes-kernel/systemtap/systemtap/x32_abi_time.patch b/meta/recipes-kernel/systemtap/systemtap/x32_abi_time.patch
new file mode 100644
index 0000000..28a7eae
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/x32_abi_time.patch
@@ -0,0 +1,34 @@
+Fix time_t print because in x32 ABI is long long int instead of long int.
+
+Upstream-Status: Pending
+
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
+
+diff --git a/cache.cxx b/cache.cxx
+index 3546b30..19c77ca 100644
+--- a/cache.cxx
++++ b/cache.cxx
+@@ -294,7 +294,11 @@ clean_cache(systemtap_session& s)
+         {
+           //interval not passed, don't continue
+           if (s.verbose > 1)
++#if defined(__x86_64__) && defined (__ILP32__)
++            clog << _F("Cache cleaning skipped, interval not reached %lld s / %lu s.",
++#else
+             clog << _F("Cache cleaning skipped, interval not reached %lu s / %lu s.",
++#endif
+                        (current_time.tv_sec-sb.st_mtime), cache_clean_interval)  << endl;
+           return;
+         }
+@@ -302,7 +306,11 @@ clean_cache(systemtap_session& s)
+         {
+           //interval reached, continue
+           if (s.verbose > 1)
++#if defined(__x86_64__) && defined (__ILP32__)
++            clog << _F("Cleaning cache, interval reached %lld s > %lu s.",
++#else
+             clog << _F("Cleaning cache, interval reached %lu s > %lu s.",
++#endif
+                        (current_time.tv_sec-sb.st_mtime), cache_clean_interval)  << endl;
+         }
+ 
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index 4a1f4fb..59a578d 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -8,6 +8,7 @@ SRC_URI = "git://sourceware.org/git/systemtap.git \
            file://obsolete_automake_macros.patch \
            file://system_map_location.patch \
            file://configure-allow-to-disable-libvirt.patch \
+           file://x32_abi_time.patch \
           "
 
 # systemtap doesn't support mips
-- 
1.9.1



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

* [PATCHv2 3/3] puzzles: Fix build in x32 ABI
  2015-03-17 16:06 [PATCHv2 0/3] Recipes fix for build in x32 ABI Aníbal Limón
  2015-03-17 16:06 ` [PATCHv2 1/3] mdadm: Fix " Aníbal Limón
  2015-03-17 16:06 ` [PATCHv2 2/3] systemtap: " Aníbal Limón
@ 2015-03-17 16:06 ` Aníbal Limón
  2 siblings, 0 replies; 4+ messages in thread
From: Aníbal Limón @ 2015-03-17 16:06 UTC (permalink / raw)
  To: openembedded-core

Add patch for make castings to time_t values that are long long int
in x32 ABI.

[YOCTO #7447]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
 .../puzzles/files/puzzles_x32_abi_time.patch       | 30 ++++++++++++++++++++++
 meta/recipes-sato/puzzles/puzzles_r10116.bb        |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 meta/recipes-sato/puzzles/files/puzzles_x32_abi_time.patch

diff --git a/meta/recipes-sato/puzzles/files/puzzles_x32_abi_time.patch b/meta/recipes-sato/puzzles/files/puzzles_x32_abi_time.patch
new file mode 100644
index 0000000..63ab0b8
--- /dev/null
+++ b/meta/recipes-sato/puzzles/files/puzzles_x32_abi_time.patch
@@ -0,0 +1,30 @@
+Fix printf's for time_t value add castings because ISOC90
+don't support long long int that is used in x32 ABI for 
+time_t.
+
+Upstream-Status: Backport
+
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
+
+--- a/magnets.c	2015-03-15 11:57:39.106674811 +0000
++++ b/magnets.c	2015-03-15 11:57:58.638674795 +0000
+@@ -2562,7 +2562,7 @@
+         goto done;
+     }
+     s = new_game(NULL, p, desc);
+-    printf("%s:%s (seed %ld)\n", id, desc, seed);
++    printf("%s:%s (seed %ld)\n", id, desc, (long) seed);
+     if (aux) {
+         /* We just generated this ourself. */
+         if (verbose || print) {
+--- a/signpost.c	2015-03-15 11:58:52.866674751 +0000
++++ b/signpost.c	2015-03-15 11:59:08.190674738 +0000
+@@ -2393,7 +2393,7 @@
+         }
+     }
+ 
+-    sprintf(newseed, "%lu", time(NULL));
++    sprintf(newseed, "%lu", (unsigned long) time(NULL));
+     seedstr = dupstr(newseed);
+ 
+     if (id || !stdin_desc) {
diff --git a/meta/recipes-sato/puzzles/puzzles_r10116.bb b/meta/recipes-sato/puzzles/puzzles_r10116.bb
index 6ee4d96..3bc2c85 100644
--- a/meta/recipes-sato/puzzles/puzzles_r10116.bb
+++ b/meta/recipes-sato/puzzles/puzzles_r10116.bb
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=33bcd4bce8f3c197f2aefbdbd2d299bc"
 
 SRC_URI = "svn://svn.tartarus.org/sgt;module=puzzles;rev=${MOD_PV} \
            file://fix-compiling-failure-with-option-g-O.patch \
+           file://puzzles_x32_abi_time.patch \
 "
 
 S = "${WORKDIR}/${BPN}"
-- 
1.9.1



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

end of thread, other threads:[~2015-03-17 16:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-17 16:06 [PATCHv2 0/3] Recipes fix for build in x32 ABI Aníbal Limón
2015-03-17 16:06 ` [PATCHv2 1/3] mdadm: Fix " Aníbal Limón
2015-03-17 16:06 ` [PATCHv2 2/3] systemtap: " Aníbal Limón
2015-03-17 16:06 ` [PATCHv2 3/3] puzzles: " Aníbal Limón

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.