All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] fixes for x32 ABI build
@ 2015-03-15 21:28 Aníbal Limón
  2015-03-15 21:28 ` [PATCH 1/3] mdadm: Fix build in x32 ABI Aníbal Limón
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Aníbal Limón @ 2015-03-15 21:28 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 7f30749fe026e9ceb75d73b89271145a45a60763:

  oeqa/parselogs: Skip hda opcode errors (2015-03-12 12:50:24 +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   | 24 ++++++++++++++++
 meta/recipes-extended/mdadm/mdadm_3.3.2.bb         |  1 +
 .../systemtap/systemtap/x32_abi_time.patch         | 32 ++++++++++++++++++++++
 meta/recipes-kernel/systemtap/systemtap_git.inc    |  1 +
 .../puzzles/files/puzzles_x32_abi_time.patch       | 28 +++++++++++++++++++
 meta/recipes-sato/puzzles/puzzles_r10116.bb        |  1 +
 6 files changed, 87 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] 5+ messages in thread

* [PATCH 1/3] mdadm: Fix build in x32 ABI
  2015-03-15 21:28 [PATCH 0/3] fixes for x32 ABI build Aníbal Limón
@ 2015-03-15 21:28 ` Aníbal Limón
  2015-03-15 21:28 ` [PATCH 2/3] systemtap: " Aníbal Limón
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Aníbal Limón @ 2015-03-15 21:28 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   | 24 ++++++++++++++++++++++
 meta/recipes-extended/mdadm/mdadm_3.3.2.bb         |  1 +
 2 files changed, 25 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..79f21b5
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
@@ -0,0 +1,24 @@
+Upstream-Status: Pending
+
+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.
+
+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] 5+ messages in thread

* [PATCH 2/3] systemtap: Fix build in x32 ABI
  2015-03-15 21:28 [PATCH 0/3] fixes for x32 ABI build Aníbal Limón
  2015-03-15 21:28 ` [PATCH 1/3] mdadm: Fix build in x32 ABI Aníbal Limón
@ 2015-03-15 21:28 ` Aníbal Limón
  2015-03-15 21:28 ` [PATCH 3/3] puzzles: " Aníbal Limón
  2015-03-16 11:36 ` [PATCH 0/3] fixes for x32 ABI build Burton, Ross
  3 siblings, 0 replies; 5+ messages in thread
From: Aníbal Limón @ 2015-03-15 21:28 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         | 32 ++++++++++++++++++++++
 meta/recipes-kernel/systemtap/systemtap_git.inc    |  1 +
 2 files changed, 33 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..9447376
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/x32_abi_time.patch
@@ -0,0 +1,32 @@
+Upstream-Status: Pending
+
+Fix time_t print because in x32 ABI is long long int instead of long int.
+
+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] 5+ messages in thread

* [PATCH 3/3] puzzles: Fix build in x32 ABI
  2015-03-15 21:28 [PATCH 0/3] fixes for x32 ABI build Aníbal Limón
  2015-03-15 21:28 ` [PATCH 1/3] mdadm: Fix build in x32 ABI Aníbal Limón
  2015-03-15 21:28 ` [PATCH 2/3] systemtap: " Aníbal Limón
@ 2015-03-15 21:28 ` Aníbal Limón
  2015-03-16 11:36 ` [PATCH 0/3] fixes for x32 ABI build Burton, Ross
  3 siblings, 0 replies; 5+ messages in thread
From: Aníbal Limón @ 2015-03-15 21:28 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       | 28 ++++++++++++++++++++++
 meta/recipes-sato/puzzles/puzzles_r10116.bb        |  1 +
 2 files changed, 29 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..560a97a
--- /dev/null
+++ b/meta/recipes-sato/puzzles/files/puzzles_x32_abi_time.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Backport
+
+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.
+
+--- 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] 5+ messages in thread

* Re: [PATCH 0/3] fixes for x32 ABI build
  2015-03-15 21:28 [PATCH 0/3] fixes for x32 ABI build Aníbal Limón
                   ` (2 preceding siblings ...)
  2015-03-15 21:28 ` [PATCH 3/3] puzzles: " Aníbal Limón
@ 2015-03-16 11:36 ` Burton, Ross
  3 siblings, 0 replies; 5+ messages in thread
From: Burton, Ross @ 2015-03-16 11:36 UTC (permalink / raw)
  To: Aníbal Limón; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 309 bytes --]

Hi Anibal,

On 15 March 2015 at 23:28, Aníbal Limón <anibal.limon@linux.intel.com>
wrote:

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

The patches need a Signed-off-by alongside the Upstream-Status tags.

Ross

[-- Attachment #2: Type: text/html, Size: 724 bytes --]

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

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

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-15 21:28 [PATCH 0/3] fixes for x32 ABI build Aníbal Limón
2015-03-15 21:28 ` [PATCH 1/3] mdadm: Fix build in x32 ABI Aníbal Limón
2015-03-15 21:28 ` [PATCH 2/3] systemtap: " Aníbal Limón
2015-03-15 21:28 ` [PATCH 3/3] puzzles: " Aníbal Limón
2015-03-16 11:36 ` [PATCH 0/3] fixes for x32 ABI build Burton, Ross

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.