fixes for x32 ABI build
cover fixes for x32 ABI build
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
Signature · 1 line
1.9.1
PATCH 1/3 mdadm: Fix build in x32 ABI
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]
--- .../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
meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch new file +24 -0
@@ -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],
meta/recipes-extended/mdadm/mdadm_3.3.2.bb +1 -0
@@ -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"
Signature · 1 line
1.9.1
PATCH 2/3 systemtap: Fix build in x32 ABI
In reply to Aníbal LimónAdd a patch for fix printing of time_t value that is long long int in x32 ABI instead of long int.
[YOCTO #7423]
--- .../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
meta/recipes-kernel/systemtap/systemtap/x32_abi_time.patch new file +32 -0
@@ -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; + } +
meta/recipes-kernel/systemtap/systemtap_git.inc +1 -0
@@ -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
Signature · 1 line
1.9.1
PATCH 3/3 puzzles: Fix build in x32 ABI
In reply to Aníbal LimónAdd patch for make castings to time_t values that are long long int in x32 ABI.
[YOCTO #7447]
--- .../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
meta/recipes-sato/puzzles/files/puzzles_x32_abi_time.patch new file +28 -0
@@ -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) {
meta/recipes-sato/puzzles/puzzles_r10116.bb +1 -0
@@ -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}"
Signature · 1 line
1.9.1
Hi Anibal,
Quoted 5 lines · Aníbal Limón
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