Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 01/16] valgrind: skip for linux-gnux32
  2017-01-05 19:46 [PATCH 00/16] Various fixes for x32 Christopher Larson
@ 2017-01-05 19:46 ` Christopher Larson
  2017-01-05 19:46 ` [PATCH 02/16] packagegroup-core-tools-profile: exclude valgrind for x32 Christopher Larson
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Christopher Larson @ 2017-01-05 19:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

valgrind doesn't support x32 at this time, so skip it for that host.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/recipes-devtools/valgrind/valgrind_3.12.0.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
index 3385ef7..a4a3e72 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
@@ -37,6 +37,9 @@ COMPATIBLE_HOST_armv4 = 'null'
 COMPATIBLE_HOST_armv5 = 'null'
 COMPATIBLE_HOST_armv6 = 'null'
 
+# X32 isn't supported by valgrind at this time
+COMPATIBLE_HOST_linux-gnux32 = 'null'
+
 # Disable for some MIPS variants
 COMPATIBLE_HOST_mipsarcho32 = "${@bb.utils.contains("TARGET_FPU", "soft", "null", ".*-linux", d)}"
 COMPATIBLE_HOST_mipsarchn32 = 'null'
-- 
2.8.0



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

* [PATCH 02/16] packagegroup-core-tools-profile: exclude valgrind for x32
  2017-01-05 19:46 [PATCH 00/16] Various fixes for x32 Christopher Larson
  2017-01-05 19:46 ` [PATCH 01/16] valgrind: skip for linux-gnux32 Christopher Larson
@ 2017-01-05 19:46 ` Christopher Larson
  2017-01-05 19:46 ` [PATCH 03/16] grub-efi: ignore arch mismatch " Christopher Larson
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Christopher Larson @ 2017-01-05 19:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

valgrind doesn't seem to support x32 at this time, even in current upstream.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
index 31ad82b..946c947 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
@@ -68,6 +68,7 @@ VALGRIND_armv4 = ""
 VALGRIND_armv5 = ""
 VALGRIND_armv6 = ""
 VALGRIND_aarch64 = ""
+VALGRIND_linux-gnux32 = ""
 
 RDEPENDS_${PN} = "\
     ${PROFILETOOLS} \
-- 
2.8.0



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

* [PATCH 03/16] grub-efi: ignore arch mismatch for x32
  2017-01-05 19:46 [PATCH 00/16] Various fixes for x32 Christopher Larson
  2017-01-05 19:46 ` [PATCH 01/16] valgrind: skip for linux-gnux32 Christopher Larson
  2017-01-05 19:46 ` [PATCH 02/16] packagegroup-core-tools-profile: exclude valgrind for x32 Christopher Larson
@ 2017-01-05 19:46 ` Christopher Larson
  2017-01-05 19:46 ` [PATCH 04/16] lttng-tools: fix " Christopher Larson
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Christopher Larson @ 2017-01-05 19:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

Ordinary 64-bit binaries are expected for the bootloader.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/recipes-bsp/grub/grub-efi_2.00.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-bsp/grub/grub-efi_2.00.bb b/meta/recipes-bsp/grub/grub-efi_2.00.bb
index 531482b..03d273d 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.00.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.00.bb
@@ -65,5 +65,8 @@ FILES_${PN} += "${libdir}/grub/${GRUB_TARGET}-efi \
                 ${datadir}/grub \
                 "
 
-BBCLASSEXTEND = "native"
+# 64-bit binaries are expected for the bootloader with an x32 userland
+INSANE_SKIP_${PN}_append_linux-gnux32 = " arch"
+INSANE_SKIP_${PN}-dbg_append_linux-gnux32 = " arch"
 
+BBCLASSEXTEND = "native"
-- 
2.8.0



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

* [PATCH 00/16] Various fixes for x32
@ 2017-01-05 19:46 Christopher Larson
  2017-01-05 19:46 ` [PATCH 01/16] valgrind: skip for linux-gnux32 Christopher Larson
                   ` (15 more replies)
  0 siblings, 16 replies; 22+ messages in thread
From: Christopher Larson @ 2017-01-05 19:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

Tested both qemux86-64 and intel-corei7-64 (plus the meta-intel fix) with:

    DEFAULTTUNE_intel-corei7-64 = "corei7-64-x32"
    DEFAULTTUNE_qemux86-64 = "core2-64-x32"

The following changes since commit af330fc0087692039d4256a6fb1e122742e8ec1a:

  packagegroup-core-lsb: add opengl to REQUIRED_DISTRO_FEATURES (2017-01-05 13:53:45 +0000)

are available in the git repository at:

  git://github.com/kergoth/openembedded-core x32
  https://github.com/kergoth/openembedded-core/tree/x32

Christopher Larson (16):
  valgrind: skip for linux-gnux32
  packagegroup-core-tools-profile: exclude valgrind for x32
  grub-efi: ignore arch mismatch for x32
  lttng-tools: fix for x32
  gnu-efi: build 64-bit for x32
  gnu-efi: ignore arch mismatch for x32
  gummiboot: fix for x32 from systemd-boot
  ltp: fix build for x32
  boost: drop flags bits, fix for x32
  gstreamer1.0-libav: disable asm for x32
  ffmpeg: disable asm for x32
  x264: for x32, disable asm and pass -mx32
  nss: fix for x32
  libunwind: apply a patch to fix x32
  gnome-desktop3: fix for x32
  webkitgtk: patch & disable JIT for x32

 meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb          |  12 ++
 meta/recipes-bsp/grub/grub-efi_2.00.bb             |   5 +-
 .../gummiboot/configure-allow-setting-EFI_CC.patch |  28 ++++
 meta/recipes-bsp/gummiboot/gummiboot_git.bb        |   1 +
 .../packagegroup-core-tools-profile.bb             |   1 +
 meta/recipes-devtools/valgrind/valgrind_3.12.0.bb  |   3 +
 .../ltp/fcntl-fix-the-time-def-to-use-time_t.patch |  28 ++++
 meta/recipes-extended/ltp/ltp_20160126.bb          |   1 +
 ...op-thumbnail-don-t-convert-time_t-to-long.patch |  72 +++++++++++
 .../gnome-desktop/gnome-desktop3_3.22.2.bb         |   2 +
 meta/recipes-kernel/lttng/lttng-tools/x32.patch    |  16 +++
 meta/recipes-kernel/lttng/lttng-tools_git.bb       |   1 +
 meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb     |   2 +
 .../gstreamer/gstreamer1.0-libav.inc               |   4 +
 .../x264/x264/Fix-X32-build-by-disabling-asm.patch |  53 ++++++++
 meta/recipes-multimedia/x264/x264_git.bb           |   1 +
 .../webkit/webkitgtk/x32_support.patch             |  22 ++++
 meta/recipes-sato/webkit/webkitgtk_2.14.2.bb       |   7 +
 meta/recipes-support/boost/boost.inc               |   3 +
 ...-Apply-boost-1.62.0-no-forced-flags.patch.patch | 101 +++++++++++++++
 ...Don-t-set-up-m32-m64-we-do-that-ourselves.patch |  98 ++++++++++++++
 ...p-arch-instruction-set-flags-we-do-that-o.patch | 144 +++++++++++++++++++++
 meta/recipes-support/boost/boost_1.62.0.bb         |   3 +
 .../libunwind/libunwind/libunwind-1.1-x32.patch    |  31 +++++
 meta/recipes-support/libunwind/libunwind_git.bb    |   1 +
 .../nss/nss/Fix-compilation-for-X32.patch          |  31 +++++
 meta/recipes-support/nss/nss_3.27.1.bb             |   1 +
 27 files changed, 671 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-bsp/gummiboot/gummiboot/configure-allow-setting-EFI_CC.patch
 create mode 100644 meta/recipes-extended/ltp/ltp/fcntl-fix-the-time-def-to-use-time_t.patch
 create mode 100644 meta/recipes-gnome/gnome-desktop/gnome-desktop/gnome-desktop-thumbnail-don-t-convert-time_t-to-long.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-tools/x32.patch
 create mode 100644 meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch
 create mode 100644 meta/recipes-sato/webkit/webkitgtk/x32_support.patch
 create mode 100644 meta/recipes-support/boost/boost/0001-Apply-boost-1.62.0-no-forced-flags.patch.patch
 create mode 100644 meta/recipes-support/boost/boost/0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch
 create mode 100644 meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch
 create mode 100644 meta/recipes-support/libunwind/libunwind/libunwind-1.1-x32.patch
 create mode 100644 meta/recipes-support/nss/nss/Fix-compilation-for-X32.patch

-- 
2.8.0



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

* [PATCH 04/16] lttng-tools: fix for x32
  2017-01-05 19:46 [PATCH 00/16] Various fixes for x32 Christopher Larson
                   ` (2 preceding siblings ...)
  2017-01-05 19:46 ` [PATCH 03/16] grub-efi: ignore arch mismatch " Christopher Larson
@ 2017-01-05 19:46 ` Christopher Larson
  2017-01-05 19:46 ` [PATCH 05/16] gnu-efi: build 64-bit " Christopher Larson
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Christopher Larson @ 2017-01-05 19:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/recipes-kernel/lttng/lttng-tools/x32.patch | 16 ++++++++++++++++
 meta/recipes-kernel/lttng/lttng-tools_git.bb    |  1 +
 2 files changed, 17 insertions(+)
 create mode 100644 meta/recipes-kernel/lttng/lttng-tools/x32.patch

diff --git a/meta/recipes-kernel/lttng/lttng-tools/x32.patch b/meta/recipes-kernel/lttng/lttng-tools/x32.patch
new file mode 100644
index 0000000..b1bb8e4
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/x32.patch
@@ -0,0 +1,16 @@
+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 @@
+ #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/meta/recipes-kernel/lttng/lttng-tools_git.bb b/meta/recipes-kernel/lttng/lttng-tools_git.bb
index 0d2bd00..29fd75b 100644
--- a/meta/recipes-kernel/lttng/lttng-tools_git.bb
+++ b/meta/recipes-kernel/lttng/lttng-tools_git.bb
@@ -31,6 +31,7 @@ PACKAGECONFIG_remove_libc-musl = "lttng-ust"
 
 SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.8 \
            file://0001-Fix-error.h-common-error.h.patch \
+           file://x32.patch \
            file://run-ptest"
 
 S = "${WORKDIR}/git"
-- 
2.8.0



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

* [PATCH 05/16] gnu-efi: build 64-bit for x32
  2017-01-05 19:46 [PATCH 00/16] Various fixes for x32 Christopher Larson
                   ` (3 preceding siblings ...)
  2017-01-05 19:46 ` [PATCH 04/16] lttng-tools: fix " Christopher Larson
@ 2017-01-05 19:46 ` Christopher Larson
  2017-01-19 15:32   ` Wold, Saul
  2017-01-05 19:46 ` [PATCH 06/16] gnu-efi: ignore arch mismatch " Christopher Larson
                   ` (10 subsequent siblings)
  15 siblings, 1 reply; 22+ messages in thread
From: Christopher Larson @ 2017-01-05 19:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

We're targeting the x86_64 EFI ABI.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb
index 9ddc4ba..e55ab7f 100644
--- a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb
@@ -52,3 +52,12 @@ BBCLASSEXTEND = "native"
 # CFLAGS += -mno-mmx -mno-sse
 # So also remove -mfpmath=sse from TUNE_CCARGS
 TUNE_CCARGS_remove = "-mfpmath=sse"
+
+python () {
+    ccargs = d.getVar('TUNE_CCARGS', True).split()
+    if '-mx32' in ccargs:
+        # use x86_64 EFI ABI
+        ccargs.remove('-mx32')
+        ccargs.append('-m64')
+        d.setVar('TUNE_CCARGS', ' '.join(ccargs))
+}
-- 
2.8.0



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

* [PATCH 06/16] gnu-efi: ignore arch mismatch for x32
  2017-01-05 19:46 [PATCH 00/16] Various fixes for x32 Christopher Larson
                   ` (4 preceding siblings ...)
  2017-01-05 19:46 ` [PATCH 05/16] gnu-efi: build 64-bit " Christopher Larson
@ 2017-01-05 19:46 ` Christopher Larson
  2017-01-05 19:46 ` [PATCH 07/16] gummiboot: fix for x32 from systemd-boot Christopher Larson
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Christopher Larson @ 2017-01-05 19:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb
index e55ab7f..f95029a 100644
--- a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb
@@ -46,6 +46,9 @@ do_install() {
 
 FILES_${PN} += "${libdir}/*.lds"
 
+# 64-bit binaries are expected for EFI when targeting X32
+INSANE_SKIP_${PN}-dev_append_linux-gnux32 = " arch"
+
 BBCLASSEXTEND = "native"
 
 # It doesn't support sse, its make.defaults sets:
-- 
2.8.0



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

* [PATCH 07/16] gummiboot: fix for x32 from systemd-boot
  2017-01-05 19:46 [PATCH 00/16] Various fixes for x32 Christopher Larson
                   ` (5 preceding siblings ...)
  2017-01-05 19:46 ` [PATCH 06/16] gnu-efi: ignore arch mismatch " Christopher Larson
@ 2017-01-05 19:46 ` Christopher Larson
  2017-01-05 19:46 ` [PATCH 08/16] ltp: fix build for x32 Christopher Larson
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Christopher Larson @ 2017-01-05 19:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 .../gummiboot/configure-allow-setting-EFI_CC.patch | 28 ++++++++++++++++++++++
 meta/recipes-bsp/gummiboot/gummiboot_git.bb        |  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 meta/recipes-bsp/gummiboot/gummiboot/configure-allow-setting-EFI_CC.patch

diff --git a/meta/recipes-bsp/gummiboot/gummiboot/configure-allow-setting-EFI_CC.patch b/meta/recipes-bsp/gummiboot/gummiboot/configure-allow-setting-EFI_CC.patch
new file mode 100644
index 0000000..59997f2
--- /dev/null
+++ b/meta/recipes-bsp/gummiboot/gummiboot/configure-allow-setting-EFI_CC.patch
@@ -0,0 +1,28 @@
+From e18c86d8eb1fb6166b8c386446123790e503d28c Mon Sep 17 00:00:00 2001
+From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
+Date: Wed, 8 Apr 2015 22:33:53 +0200
+Subject: [PATCH] configure: allow setting EFI_CC
+
+Upstream-Status: Backport [from systemd-boot]
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ configure.ac | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 27bbe1d..3efb810 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -37,8 +37,7 @@ AC_SYS_LARGEFILE
+ AC_PROG_CC
+ 
+ dnl Don't try to use things like -std=c99 for efi compilation
+-EFI_CC=$CC
+-AC_SUBST([EFI_CC])
++AC_CHECK_TOOL(EFI_CC, gcc)
+ 
+ AC_PROG_CC_C99
+ AM_PROG_CC_C_O
+-- 
+2.8.0
+
diff --git a/meta/recipes-bsp/gummiboot/gummiboot_git.bb b/meta/recipes-bsp/gummiboot/gummiboot_git.bb
index c684b83..d7d6c28 100644
--- a/meta/recipes-bsp/gummiboot/gummiboot_git.bb
+++ b/meta/recipes-bsp/gummiboot/gummiboot_git.bb
@@ -14,6 +14,7 @@ SRCREV = "2bcd919c681c952eb867ef1bdb458f1bc49c2d55"
 SRC_URI = "git://anongit.freedesktop.org/gummiboot \
            file://fix-objcopy.patch \
            file://0001-console-Fix-C-syntax-errors-for-function-declaration.patch \
+           file://configure-allow-setting-EFI_CC.patch \
           "
 
 PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native"
-- 
2.8.0



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

* [PATCH 08/16] ltp: fix build for x32
  2017-01-05 19:46 [PATCH 00/16] Various fixes for x32 Christopher Larson
                   ` (6 preceding siblings ...)
  2017-01-05 19:46 ` [PATCH 07/16] gummiboot: fix for x32 from systemd-boot Christopher Larson
@ 2017-01-05 19:46 ` Christopher Larson
  2017-01-05 19:46 ` [PATCH 09/16] boost: drop flags bits, fix " Christopher Larson
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Christopher Larson @ 2017-01-05 19:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

We need to use the correct time() definition with time_t rather than a long,
since long is 32-bit on x32.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 .../ltp/fcntl-fix-the-time-def-to-use-time_t.patch | 28 ++++++++++++++++++++++
 meta/recipes-extended/ltp/ltp_20160126.bb          |  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 meta/recipes-extended/ltp/ltp/fcntl-fix-the-time-def-to-use-time_t.patch

diff --git a/meta/recipes-extended/ltp/ltp/fcntl-fix-the-time-def-to-use-time_t.patch b/meta/recipes-extended/ltp/ltp/fcntl-fix-the-time-def-to-use-time_t.patch
new file mode 100644
index 0000000..f7e805a
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/fcntl-fix-the-time-def-to-use-time_t.patch
@@ -0,0 +1,28 @@
+From 9590d073d3abe02fe0783ef8c530aef2e873ba9b Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 12:48:29 -0700
+Subject: [PATCH] fcntl: fix the time() def to use time_t
+
+This fixes the build on X32, where long is 32-bit rather than 64-bit.
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ testcases/kernel/syscalls/fcntl/fcntl14.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/syscalls/fcntl/fcntl14.c b/testcases/kernel/syscalls/fcntl/fcntl14.c
+index 3b36572..65ac8fa 100644
+--- a/testcases/kernel/syscalls/fcntl/fcntl14.c
++++ b/testcases/kernel/syscalls/fcntl/fcntl14.c
+@@ -789,7 +789,7 @@ void dochild(void)
+ 
+ void run_test(int file_flag, int file_mode, int seek, int start, int end)
+ {
+-	extern long time();
++	extern time_t time();
+ 
+ 	/* reset fail to 0 for each run_test call */
+ 	fail = 0;
+-- 
+2.8.0
+
diff --git a/meta/recipes-extended/ltp/ltp_20160126.bb b/meta/recipes-extended/ltp/ltp_20160126.bb
index 6e2ceac..72d465b 100644
--- a/meta/recipes-extended/ltp/ltp_20160126.bb
+++ b/meta/recipes-extended/ltp/ltp_20160126.bb
@@ -65,6 +65,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
            file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
            file://0037-containers-netns_netlink-Avoid-segmentation-fault.patch \
            file://0038-run-posix-option-group-test-replace-CWD-qith-PWD.patch \
+           file://fcntl-fix-the-time-def-to-use-time_t.patch \
            "
 
 S = "${WORKDIR}/git"
-- 
2.8.0



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

* [PATCH 09/16] boost: drop flags bits, fix for x32
  2017-01-05 19:46 [PATCH 00/16] Various fixes for x32 Christopher Larson
                   ` (7 preceding siblings ...)
  2017-01-05 19:46 ` [PATCH 08/16] ltp: fix build for x32 Christopher Larson
@ 2017-01-05 19:46 ` Christopher Larson
  2017-01-05 20:29   ` Burton, Ross
  2017-01-05 19:46 ` [PATCH 10/16] gstreamer1.0-libav: disable asm " Christopher Larson
                   ` (6 subsequent siblings)
  15 siblings, 1 reply; 22+ messages in thread
From: Christopher Larson @ 2017-01-05 19:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

boost was adding -march/-mcpu itself, and adding -m32/-m64 itself as well.
Patch that behavior out, apply another similar patch from elsewhere, and
adjust BJAM_OPTS to fix the x32 build.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/recipes-support/boost/boost.inc               |   3 +
 ...-Apply-boost-1.62.0-no-forced-flags.patch.patch | 101 +++++++++++++++
 ...Don-t-set-up-m32-m64-we-do-that-ourselves.patch |  98 ++++++++++++++
 ...p-arch-instruction-set-flags-we-do-that-o.patch | 144 +++++++++++++++++++++
 meta/recipes-support/boost/boost_1.62.0.bb         |   3 +
 5 files changed, 349 insertions(+)
 create mode 100644 meta/recipes-support/boost/boost/0001-Apply-boost-1.62.0-no-forced-flags.patch.patch
 create mode 100644 meta/recipes-support/boost/boost/0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch
 create mode 100644 meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch

diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index a1a6a90..0b2b17d 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -177,6 +177,9 @@ BJAM_OPTS    = '${BOOST_PARALLEL_MAKE} -d+2 -q \
 # Native compilation of bzip2 isn't working
 BJAM_OPTS_append_class-native = ' -sNO_BZIP2=1'
 
+# Adjust the build for x32
+BJAM_OPTS_append_linux-gnux32 = " abi=x32 address-model=64"
+
 do_configure() {
 	cp -f ${S}/boost/config/platform/linux.hpp ${S}/boost/config/platform/linux-gnueabi.hpp
 
diff --git a/meta/recipes-support/boost/boost/0001-Apply-boost-1.62.0-no-forced-flags.patch.patch b/meta/recipes-support/boost/boost/0001-Apply-boost-1.62.0-no-forced-flags.patch.patch
new file mode 100644
index 0000000..8cd6ceb
--- /dev/null
+++ b/meta/recipes-support/boost/boost/0001-Apply-boost-1.62.0-no-forced-flags.patch.patch
@@ -0,0 +1,101 @@
+From 8845a786598f1d9e83aa1b7d2966b0d1eb765ba0 Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 10:14:31 -0700
+Subject: [PATCH 1/3] Apply boost-1.62.0-no-forced-flags.patch
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ libs/log/build/Jamfile.v2           |  4 ++--
+ libs/log/config/x86-ext/Jamfile.jam | 16 ++++++++--------
+ libs/log/src/dump_avx2.cpp          |  4 ++++
+ libs/log/src/dump_ssse3.cpp         |  4 ++++
+ 4 files changed, 18 insertions(+), 10 deletions(-)
+
+diff --git a/libs/log/build/Jamfile.v2 b/libs/log/build/Jamfile.v2
+index 4abbdbc..b3016fc 100644
+--- a/libs/log/build/Jamfile.v2
++++ b/libs/log/build/Jamfile.v2
+@@ -373,7 +373,7 @@ rule avx2-targets-cond ( properties * )
+             }
+             else if <toolset>clang in $(properties)
+             {
+-                result = <cxxflags>"-mavx -mavx2" ;
++                result = <cxxflags> ;
+             }
+             else if <toolset>intel in $(properties)
+             {
+@@ -383,7 +383,7 @@ rule avx2-targets-cond ( properties * )
+                 }
+                 else
+                 {
+-                    result = <cxxflags>"-xCORE-AVX2 -fabi-version=0" ;
++                    result = <cxxflags>"-fabi-version=0" ;
+                 }
+             }
+             else if <toolset>msvc in $(properties)
+diff --git a/libs/log/config/x86-ext/Jamfile.jam b/libs/log/config/x86-ext/Jamfile.jam
+index 0e9695a..dcc394d 100644
+--- a/libs/log/config/x86-ext/Jamfile.jam
++++ b/libs/log/config/x86-ext/Jamfile.jam
+@@ -15,19 +15,19 @@ project /boost/log/x86-extensions
+ 
+ obj ssse3 : ssse3.cpp
+     :
+-        <toolset>gcc:<cxxflags>"-msse -msse2 -msse3 -mssse3"
+-        <toolset>clang:<cxxflags>"-msse -msse2 -msse3 -mssse3"
+-        <toolset>intel-linux:<cxxflags>"-xSSSE3"
+-        <toolset>intel-darwin:<cxxflags>"-xSSSE3"
++        <toolset>gcc:<cxxflags>
++        <toolset>clang:<cxxflags>
++        <toolset>intel-linux:<cxxflags>
++        <toolset>intel-darwin:<cxxflags>
+         <toolset>intel-win:<cxxflags>"/QxSSSE3"
+     ;
+ 
+ obj avx2 : avx2.cpp
+     :
+-        <toolset>gcc:<cxxflags>"-mavx -mavx2 -fabi-version=0"
+-        <toolset>clang:<cxxflags>"-mavx -mavx2"
+-        <toolset>intel-linux:<cxxflags>"-xCORE-AVX2 -fabi-version=0"
+-        <toolset>intel-darwin:<cxxflags>"-xCORE-AVX2 -fabi-version=0"
++        <toolset>gcc:<cxxflags>"-fabi-version=0"
++        <toolset>clang:<cxxflags>
++        <toolset>intel-linux:<cxxflags>"-fabi-version=0"
++        <toolset>intel-darwin:<cxxflags>"-fabi-version=0"
+         <toolset>intel-win:<cxxflags>"/arch:CORE-AVX2"
+         <toolset>msvc:<cxxflags>"/arch:AVX"
+     ;
+diff --git a/libs/log/src/dump_avx2.cpp b/libs/log/src/dump_avx2.cpp
+index 4ab1250..610fc6d 100644
+--- a/libs/log/src/dump_avx2.cpp
++++ b/libs/log/src/dump_avx2.cpp
+@@ -22,6 +22,10 @@
+ #include <boost/cstdint.hpp>
+ #include <boost/log/detail/header.hpp>
+ 
++#if !defined(__AVX2__)
++#error "AVX2 Unsupported!"
++#endif
++
+ #if defined(__x86_64) || defined(__x86_64__) || \
+     defined(__amd64__) || defined(__amd64) || \
+     defined(_M_X64)
+diff --git a/libs/log/src/dump_ssse3.cpp b/libs/log/src/dump_ssse3.cpp
+index 1325b49..60d4112 100644
+--- a/libs/log/src/dump_ssse3.cpp
++++ b/libs/log/src/dump_ssse3.cpp
+@@ -22,6 +22,10 @@
+ #include <boost/cstdint.hpp>
+ #include <boost/log/detail/header.hpp>
+ 
++#if !defined(__SSSE3__)
++#error "SSSE3 Unsupported!"
++#endif
++
+ #if defined(__x86_64) || defined(__x86_64__) || \
+     defined(__amd64__) || defined(__amd64) || \
+     defined(_M_X64)
+-- 
+2.8.0
+
diff --git a/meta/recipes-support/boost/boost/0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch b/meta/recipes-support/boost/boost/0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch
new file mode 100644
index 0000000..ef9ec55
--- /dev/null
+++ b/meta/recipes-support/boost/boost/0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch
@@ -0,0 +1,98 @@
+From c0e785f8da2caa6617052b1c7b347e0dffb1520d Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 10:29:17 -0700
+Subject: [PATCH 2/3] Don't set up -m32/-m64, we do that ourselves
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ tools/build/src/tools/gcc.jam | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam
+index 0f346a5..942f141 100644
+--- a/tools/build/src/tools/gcc.jam
++++ b/tools/build/src/tools/gcc.jam
+@@ -509,7 +509,6 @@ rule compile.c++.pch ( targets * : sources * : properties * )
+ {
+     setup-threading $(targets) : $(sources) : $(properties) ;
+     setup-fpic $(targets) : $(sources) : $(properties) ;
+-    setup-address-model $(targets) : $(sources) : $(properties) ;
+ }
+ 
+ actions compile.c++.pch
+@@ -521,7 +520,6 @@ rule compile.c.pch ( targets * : sources * : properties * )
+ {
+     setup-threading $(targets) : $(sources) : $(properties) ;
+     setup-fpic $(targets) : $(sources) : $(properties) ;
+-    setup-address-model $(targets) : $(sources) : $(properties) ;
+ }
+ 
+ actions compile.c.pch
+@@ -533,7 +531,6 @@ rule compile.c++.preprocess ( targets * : sources * : properties * )
+ {
+     setup-threading $(targets) : $(sources) : $(properties) ;
+     setup-fpic $(targets) : $(sources) : $(properties) ;
+-    setup-address-model $(targets) : $(sources) : $(properties) ;
+ 
+     # Some extensions are compiled as C++ by default. For others, we need to
+     # pass -x c++. We could always pass -x c++ but distcc does not work with it.
+@@ -548,7 +545,6 @@ rule compile.c.preprocess ( targets * : sources * : properties * )
+ {
+     setup-threading $(targets) : $(sources) : $(properties) ;
+     setup-fpic $(targets) : $(sources) : $(properties) ;
+-    setup-address-model $(targets) : $(sources) : $(properties) ;
+ 
+     # If we use the name g++ then default file suffix -> language mapping does
+     # not work. So have to pass -x option. Maybe, we can work around this by
+@@ -564,7 +560,6 @@ rule compile.c++ ( targets * : sources * : properties * )
+ {
+     setup-threading $(targets) : $(sources) : $(properties) ;
+     setup-fpic $(targets) : $(sources) : $(properties) ;
+-    setup-address-model $(targets) : $(sources) : $(properties) ;
+ 
+     # Some extensions are compiled as C++ by default. For others, we need to
+     # pass -x c++. We could always pass -x c++ but distcc does not work with it.
+@@ -594,7 +589,6 @@ rule compile.c ( targets * : sources * : properties * )
+ {
+     setup-threading $(targets) : $(sources) : $(properties) ;
+     setup-fpic $(targets) : $(sources) : $(properties) ;
+-    setup-address-model $(targets) : $(sources) : $(properties) ;
+ 
+     # If we use the name g++ then default file suffix -> language mapping does
+     # not work. So have to pass -x option. Maybe, we can work around this by
+@@ -610,7 +604,6 @@ rule compile.fortran ( targets * : sources * : properties * )
+ {
+     setup-threading $(targets) : $(sources) : $(properties) ;
+     setup-fpic $(targets) : $(sources) : $(properties) ;
+-    setup-address-model $(targets) : $(sources) : $(properties) ;
+ }
+ 
+ actions compile.c++ bind PCH_FILE
+@@ -641,7 +634,6 @@ actions compile.fortran
+ rule compile.asm ( targets * : sources * : properties * )
+ {
+     setup-fpic $(targets) : $(sources) : $(properties) ;
+-    setup-address-model $(targets) : $(sources) : $(properties) ;
+     LANG on $(<) = "-x assembler-with-cpp" ;
+ }
+ 
+@@ -950,7 +942,6 @@ rule quote-rpath ( targets * )
+ rule link ( targets * : sources * : properties * )
+ {
+     setup-threading $(targets) : $(sources) : $(properties) ;
+-    setup-address-model $(targets) : $(sources) : $(properties) ;
+     SPACE on $(targets) = " " ;
+     # Serialize execution of the 'link' action, since running N links in
+     # parallel is just slower. For now, serialize only gcc links, it might be a
+@@ -1018,7 +1009,6 @@ actions piecemeal archive
+ rule link.dll ( targets * : sources * : properties * )
+ {
+     setup-threading $(targets) : $(sources) : $(properties) ;
+-    setup-address-model $(targets) : $(sources) : $(properties) ;
+     SPACE on $(targets) = " " ;
+     JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
+     quote-rpath $(targets) ;
+-- 
+2.8.0
+
diff --git a/meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch b/meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch
new file mode 100644
index 0000000..548e051
--- /dev/null
+++ b/meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch
@@ -0,0 +1,144 @@
+From 7c49525812567f1219706c4ed330b3bd2cc8e94a Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 10:29:32 -0700
+Subject: [PATCH 3/3] Don't set up arch/instruction-set flags, we do that
+ ourselves
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ tools/build/src/tools/gcc.jam | 121 ------------------------------------------
+ 1 file changed, 121 deletions(-)
+
+diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam
+index 942f141..d062c20 100644
+--- a/tools/build/src/tools/gcc.jam
++++ b/tools/build/src/tools/gcc.jam
+@@ -1068,124 +1068,3 @@ local rule cpu-flags ( toolset variable : architecture : instruction-set + :
+         <architecture>$(architecture)/<instruction-set>$(instruction-set)
+         : $(values) ;
+ }
+-
+-
+-# Set architecture/instruction-set options.
+-#
+-# x86 and compatible
+-# The 'native' option appeared in gcc 4.2 so we cannot safely use it as default.
+-# Use i686 instead for 32-bit.
+-toolset.flags gcc OPTIONS <architecture>x86/<address-model>32/<instruction-set> : -march=i686 ;
+-cpu-flags gcc OPTIONS : x86 : native : -march=native ;
+-cpu-flags gcc OPTIONS : x86 : i486 : -march=i486 ;
+-cpu-flags gcc OPTIONS : x86 : i586 : -march=i586 ;
+-cpu-flags gcc OPTIONS : x86 : i686 : -march=i686 ;
+-cpu-flags gcc OPTIONS : x86 : pentium : -march=pentium ;
+-cpu-flags gcc OPTIONS : x86 : pentium-mmx : -march=pentium-mmx ;
+-cpu-flags gcc OPTIONS : x86 : pentiumpro : -march=pentiumpro ;
+-cpu-flags gcc OPTIONS : x86 : pentium2 : -march=pentium2 ;
+-cpu-flags gcc OPTIONS : x86 : pentium3 : -march=pentium3 ;
+-cpu-flags gcc OPTIONS : x86 : pentium3m : -march=pentium3m ;
+-cpu-flags gcc OPTIONS : x86 : pentium-m : -march=pentium-m ;
+-cpu-flags gcc OPTIONS : x86 : pentium4 : -march=pentium4 ;
+-cpu-flags gcc OPTIONS : x86 : pentium4m : -march=pentium4m ;
+-cpu-flags gcc OPTIONS : x86 : prescott : -march=prescott ;
+-cpu-flags gcc OPTIONS : x86 : nocona : -march=nocona ;
+-cpu-flags gcc OPTIONS : x86 : core2 : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : conroe : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : conroe-xe : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : conroe-l : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : allendale : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : wolfdale : -march=core2 -msse4.1 ;
+-cpu-flags gcc OPTIONS : x86 : merom : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : merom-xe : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : kentsfield : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : kentsfield-xe : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : yorksfield : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : penryn : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : corei7 : -march=corei7 ;
+-cpu-flags gcc OPTIONS : x86 : nehalem : -march=corei7 ;
+-cpu-flags gcc OPTIONS : x86 : corei7-avx : -march=corei7-avx ;
+-cpu-flags gcc OPTIONS : x86 : sandy-bridge : -march=corei7-avx ;
+-cpu-flags gcc OPTIONS : x86 : core-avx-i : -march=core-avx-i ;
+-cpu-flags gcc OPTIONS : x86 : ivy-bridge : -march=core-avx-i ;
+-cpu-flags gcc OPTIONS : x86 : haswell : -march=core-avx-i -mavx2 -mfma -mbmi -mbmi2 -mlzcnt ;
+-cpu-flags gcc OPTIONS : x86 : k6 : -march=k6 ;
+-cpu-flags gcc OPTIONS : x86 : k6-2 : -march=k6-2 ;
+-cpu-flags gcc OPTIONS : x86 : k6-3 : -march=k6-3 ;
+-cpu-flags gcc OPTIONS : x86 : athlon : -march=athlon ;
+-cpu-flags gcc OPTIONS : x86 : athlon-tbird : -march=athlon-tbird ;
+-cpu-flags gcc OPTIONS : x86 : athlon-4 : -march=athlon-4 ;
+-cpu-flags gcc OPTIONS : x86 : athlon-xp : -march=athlon-xp ;
+-cpu-flags gcc OPTIONS : x86 : athlon-mp : -march=athlon-mp ;
+-##
+-cpu-flags gcc OPTIONS : x86 : k8 : -march=k8 ;
+-cpu-flags gcc OPTIONS : x86 : opteron : -march=opteron ;
+-cpu-flags gcc OPTIONS : x86 : athlon64 : -march=athlon64 ;
+-cpu-flags gcc OPTIONS : x86 : athlon-fx : -march=athlon-fx ;
+-cpu-flags gcc OPTIONS : x86 : k8-sse3 : -march=k8-sse3 ;
+-cpu-flags gcc OPTIONS : x86 : opteron-sse3 : -march=opteron-sse3 ;
+-cpu-flags gcc OPTIONS : x86 : athlon64-sse3 : -march=athlon64-sse3 ;
+-cpu-flags gcc OPTIONS : x86 : amdfam10 : -march=amdfam10 ;
+-cpu-flags gcc OPTIONS : x86 : barcelona : -march=barcelona ;
+-cpu-flags gcc OPTIONS : x86 : bdver1 : -march=bdver1 ;
+-cpu-flags gcc OPTIONS : x86 : bdver2 : -march=bdver2 ;
+-cpu-flags gcc OPTIONS : x86 : bdver3 : -march=bdver3 ;
+-cpu-flags gcc OPTIONS : x86 : btver1 : -march=btver1 ;
+-cpu-flags gcc OPTIONS : x86 : btver2 : -march=btver2 ;
+-cpu-flags gcc OPTIONS : x86 : winchip-c6 : -march=winchip-c6 ;
+-cpu-flags gcc OPTIONS : x86 : winchip2 : -march=winchip2 ;
+-cpu-flags gcc OPTIONS : x86 : c3 : -march=c3 ;
+-cpu-flags gcc OPTIONS : x86 : c3-2 : -march=c3-2 ;
+-##
+-cpu-flags gcc OPTIONS : x86 : atom : -march=atom ;
+-# Sparc
+-cpu-flags gcc OPTIONS : sparc : v7 : -mcpu=v7 : default ;
+-cpu-flags gcc OPTIONS : sparc : cypress : -mcpu=cypress ;
+-cpu-flags gcc OPTIONS : sparc : v8 : -mcpu=v8 ;
+-cpu-flags gcc OPTIONS : sparc : supersparc : -mcpu=supersparc ;
+-cpu-flags gcc OPTIONS : sparc : sparclite : -mcpu=sparclite ;
+-cpu-flags gcc OPTIONS : sparc : hypersparc : -mcpu=hypersparc ;
+-cpu-flags gcc OPTIONS : sparc : sparclite86x : -mcpu=sparclite86x ;
+-cpu-flags gcc OPTIONS : sparc : f930 : -mcpu=f930 ;
+-cpu-flags gcc OPTIONS : sparc : f934 : -mcpu=f934 ;
+-cpu-flags gcc OPTIONS : sparc : sparclet : -mcpu=sparclet ;
+-cpu-flags gcc OPTIONS : sparc : tsc701 : -mcpu=tsc701 ;
+-cpu-flags gcc OPTIONS : sparc : v9 : -mcpu=v9 ;
+-cpu-flags gcc OPTIONS : sparc : ultrasparc : -mcpu=ultrasparc ;
+-cpu-flags gcc OPTIONS : sparc : ultrasparc3 : -mcpu=ultrasparc3 ;
+-# RS/6000 & PowerPC
+-cpu-flags gcc OPTIONS : power : 403 : -mcpu=403 ;
+-cpu-flags gcc OPTIONS : power : 505 : -mcpu=505 ;
+-cpu-flags gcc OPTIONS : power : 601 : -mcpu=601 ;
+-cpu-flags gcc OPTIONS : power : 602 : -mcpu=602 ;
+-cpu-flags gcc OPTIONS : power : 603 : -mcpu=603 ;
+-cpu-flags gcc OPTIONS : power : 603e : -mcpu=603e ;
+-cpu-flags gcc OPTIONS : power : 604 : -mcpu=604 ;
+-cpu-flags gcc OPTIONS : power : 604e : -mcpu=604e ;
+-cpu-flags gcc OPTIONS : power : 620 : -mcpu=620 ;
+-cpu-flags gcc OPTIONS : power : 630 : -mcpu=630 ;
+-cpu-flags gcc OPTIONS : power : 740 : -mcpu=740 ;
+-cpu-flags gcc OPTIONS : power : 7400 : -mcpu=7400 ;
+-cpu-flags gcc OPTIONS : power : 7450 : -mcpu=7450 ;
+-cpu-flags gcc OPTIONS : power : 750 : -mcpu=750 ;
+-cpu-flags gcc OPTIONS : power : 801 : -mcpu=801 ;
+-cpu-flags gcc OPTIONS : power : 821 : -mcpu=821 ;
+-cpu-flags gcc OPTIONS : power : 823 : -mcpu=823 ;
+-cpu-flags gcc OPTIONS : power : 860 : -mcpu=860 ;
+-cpu-flags gcc OPTIONS : power : 970 : -mcpu=970 ;
+-cpu-flags gcc OPTIONS : power : 8540 : -mcpu=8540 ;
+-cpu-flags gcc OPTIONS : power : power : -mcpu=power ;
+-cpu-flags gcc OPTIONS : power : power2 : -mcpu=power2 ;
+-cpu-flags gcc OPTIONS : power : power3 : -mcpu=power3 ;
+-cpu-flags gcc OPTIONS : power : power4 : -mcpu=power4 ;
+-cpu-flags gcc OPTIONS : power : power5 : -mcpu=power5 ;
+-cpu-flags gcc OPTIONS : power : powerpc : -mcpu=powerpc ;
+-cpu-flags gcc OPTIONS : power : powerpc64 : -mcpu=powerpc64 ;
+-cpu-flags gcc OPTIONS : power : rios : -mcpu=rios ;
+-cpu-flags gcc OPTIONS : power : rios1 : -mcpu=rios1 ;
+-cpu-flags gcc OPTIONS : power : rios2 : -mcpu=rios2 ;
+-cpu-flags gcc OPTIONS : power : rsc : -mcpu=rsc ;
+-cpu-flags gcc OPTIONS : power : rs64a : -mcpu=rs64 ;
+-# AIX variant of RS/6000 & PowerPC
+-toolset.flags gcc AROPTIONS <address-model>64/<target-os>aix : "-X64" ;
+-- 
+2.8.0
+
diff --git a/meta/recipes-support/boost/boost_1.62.0.bb b/meta/recipes-support/boost/boost_1.62.0.bb
index 120d129..96f9241 100644
--- a/meta/recipes-support/boost/boost_1.62.0.bb
+++ b/meta/recipes-support/boost/boost_1.62.0.bb
@@ -9,4 +9,7 @@ SRC_URI += "\
     file://0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch \
     file://0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch \
     file://boost-math-disable-pch-for-gcc.patch \
+    file://0001-Apply-boost-1.62.0-no-forced-flags.patch.patch \
+    file://0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \
+    file://0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch \
 "
-- 
2.8.0



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

* [PATCH 10/16] gstreamer1.0-libav: disable asm for x32
  2017-01-05 19:46 [PATCH 00/16] Various fixes for x32 Christopher Larson
                   ` (8 preceding siblings ...)
  2017-01-05 19:46 ` [PATCH 09/16] boost: drop flags bits, fix " Christopher Larson
@ 2017-01-05 19:46 ` Christopher Larson
  2017-01-05 19:46 ` [PATCH 11/16] ffmpeg: " Christopher Larson
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Christopher Larson @ 2017-01-05 19:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

The included libav lacks support for x32, so disable the assembly
optimizations.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc
index ea01163..c228306 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc
@@ -30,6 +30,10 @@ LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \
   ${GSTREAMER_1_0_DEBUG} \
   --cross-prefix='${HOST_PREFIX}'"
 
+# Disable assembly optimizations for X32, as this libav lacks the support
+PACKAGECONFIG_remove_linux-gnux32 = "yasm"
+LIBAV_EXTRA_CONFIGURE_COMMON_ARG_append_linux-gnux32 = " --disable-asm"
+
 LIBAV_EXTRA_CONFIGURE_COMMON = \
 '${LIBAV_EXTRA_CONFIGURE}="${LIBAV_EXTRA_CONFIGURE_COMMON_ARG}"'
 
-- 
2.8.0



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

* [PATCH 11/16] ffmpeg: disable asm for x32
  2017-01-05 19:46 [PATCH 00/16] Various fixes for x32 Christopher Larson
                   ` (9 preceding siblings ...)
  2017-01-05 19:46 ` [PATCH 10/16] gstreamer1.0-libav: disable asm " Christopher Larson
@ 2017-01-05 19:46 ` Christopher Larson
  2017-01-05 19:46 ` [PATCH 12/16] x264: for x32, disable asm and pass -mx32 Christopher Larson
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Christopher Larson @ 2017-01-05 19:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

This is the usual way this is handled in desktop distros (see debian, gentoo).
I wasn't able to track down a patch to add proper x32 support to ffmpeg. There
was, however, a libav patch series which may be worth investigating.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb
index 4fac46b..66718c4 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb
@@ -92,6 +92,8 @@ EXTRA_OECONF = " \
     ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \
 "
 
+EXTRA_OECONF_append_linux-gnux32 = " --disable-asm"
+
 do_configure() {
     ${S}/configure ${EXTRA_OECONF}
 }
-- 
2.8.0



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

* [PATCH 12/16] x264: for x32, disable asm and pass -mx32
  2017-01-05 19:46 [PATCH 00/16] Various fixes for x32 Christopher Larson
                   ` (10 preceding siblings ...)
  2017-01-05 19:46 ` [PATCH 11/16] ffmpeg: " Christopher Larson
@ 2017-01-05 19:46 ` Christopher Larson
  2017-01-05 19:46 ` [PATCH 13/16] nss: fix for x32 Christopher Larson
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Christopher Larson @ 2017-01-05 19:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

We should probably patch it to stop adding the -m argument to CFLAGS/LDFLAGS
in the first place, since we pass it in via CC, but this will do for now.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 .../x264/x264/Fix-X32-build-by-disabling-asm.patch | 53 ++++++++++++++++++++++
 meta/recipes-multimedia/x264/x264_git.bb           |  1 +
 2 files changed, 54 insertions(+)
 create mode 100644 meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch

diff --git a/meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch b/meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch
new file mode 100644
index 0000000..087a448
--- /dev/null
+++ b/meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch
@@ -0,0 +1,53 @@
+From 66b120079fb21ed38cab0900c63360b0a7853eaa Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 14:22:32 -0700
+Subject: [PATCH] Fix X32 build by disabling asm
+
+This applies gentoo's x32 patch, adjusted slightly, which disables asm support
+for x32 as well as correcting -m.
+
+Debian has a different patch which does the same, and there's a superior yet
+out of date patch series on the x264 list which keeps asm support enabled, but
+doesn't successfully build at this time, and my assembly is very rusty.
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ configure | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index 3109ec4..844aeae 100755
+--- a/configure
++++ b/configure
+@@ -703,7 +703,13 @@ case $host_cpu in
+         AS_EXT=".asm"
+         ASFLAGS="$ASFLAGS -DARCH_X86_64=1 -I\$(SRCPATH)/common/x86/"
+         stack_alignment=16
+-        [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
++        if [ $compiler = GNU ]; then
++            if cpp_check "" "" "__ILP32__" ; then
++                CFLAGS="-mx32 $CFLAGS" && LDFLAGS="-mx32 $LDFLAGS"
++            else
++                CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
++            fi
++        fi
+         if [ "$SYS" = MACOSX ]; then
+             ASFLAGS="$ASFLAGS -f macho64 -DPIC -DPREFIX"
+             if cc_check '' "-arch x86_64"; then
+@@ -722,7 +728,11 @@ case $host_cpu in
+                 RCFLAGS="--target=pe-x86-64 $RCFLAGS"
+             fi
+         else
+-            ASFLAGS="$ASFLAGS -f elf64"
++            if cpp_check "" "" "__ILP32__" ; then
++                asm=no
++            else
++                ASFLAGS="$ASFLAGS -f elf64"
++            fi
+         fi
+         ;;
+     powerpc*)
+-- 
+2.8.0
+
diff --git a/meta/recipes-multimedia/x264/x264_git.bb b/meta/recipes-multimedia/x264/x264_git.bb
index 1dafdd5..64193dc 100644
--- a/meta/recipes-multimedia/x264/x264_git.bb
+++ b/meta/recipes-multimedia/x264/x264_git.bb
@@ -10,6 +10,7 @@ DEPENDS = "yasm-native"
 
 SRC_URI = "git://github.com/mirror/x264;branch=stable \
            file://don-t-default-to-cortex-a9-with-neon.patch \
+           file://Fix-X32-build-by-disabling-asm.patch \
            "
 
 SRCREV = "86b71982e131eaa70125f8d0e725fcade9c4c677"
-- 
2.8.0



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

* [PATCH 13/16] nss: fix for x32
  2017-01-05 19:46 [PATCH 00/16] Various fixes for x32 Christopher Larson
                   ` (11 preceding siblings ...)
  2017-01-05 19:46 ` [PATCH 12/16] x264: for x32, disable asm and pass -mx32 Christopher Larson
@ 2017-01-05 19:46 ` Christopher Larson
  2017-01-05 19:46 ` [PATCH 14/16] libunwind: apply a patch to fix x32 Christopher Larson
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 22+ messages in thread
From: Christopher Larson @ 2017-01-05 19:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

This was casting to a pointer, and the pointer sizes are 32-bit on X32, not
64-bit. Adjust as appropriate.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 .../nss/nss/Fix-compilation-for-X32.patch          | 31 ++++++++++++++++++++++
 meta/recipes-support/nss/nss_3.27.1.bb             |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 meta/recipes-support/nss/nss/Fix-compilation-for-X32.patch

diff --git a/meta/recipes-support/nss/nss/Fix-compilation-for-X32.patch b/meta/recipes-support/nss/nss/Fix-compilation-for-X32.patch
new file mode 100644
index 0000000..f7f2c21
--- /dev/null
+++ b/meta/recipes-support/nss/nss/Fix-compilation-for-X32.patch
@@ -0,0 +1,31 @@
+From c8eadfcdfbc1d5a4799e9a264b0f859cb5954c05 Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 11:40:47 -0700
+Subject: [PATCH 7/7] Fix compilation for X32
+
+X32 uses 32-bit pointers, not 64-bit.
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c b/nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c
+index 2a3301e..d4ade41 100644
+--- a/nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c
++++ b/nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c
+@@ -87,7 +87,11 @@ static poly1305_state_internal INLINE
+     *
+     poly1305_aligned_state(poly1305_state *state)
+ {
++#ifdef __ILP32__
++    return (poly1305_state_internal *)(((uint32_t)state + 63) & ~63);
++#else
+     return (poly1305_state_internal *)(((uint64_t)state + 63) & ~63);
++#endif
+ }
+ 
+ /* copy 0-63 bytes */
+-- 
+2.8.0
+
diff --git a/meta/recipes-support/nss/nss_3.27.1.bb b/meta/recipes-support/nss/nss_3.27.1.bb
index 0917938..0b4b5f9 100644
--- a/meta/recipes-support/nss/nss_3.27.1.bb
+++ b/meta/recipes-support/nss/nss_3.27.1.bb
@@ -22,6 +22,7 @@ SRC_URI = "\
     file://nss-fix-nsinstall-build.patch \
     file://disable-Wvarargs-with-clang.patch \
     file://pqg.c-ULL_addend.patch \
+    file://Fix-compilation-for-X32.patch \
     file://nss.pc.in \
     file://signlibs.sh \
 "
-- 
2.8.0



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

* [PATCH 14/16] libunwind: apply a patch to fix x32
  2017-01-05 19:46 [PATCH 00/16] Various fixes for x32 Christopher Larson
                   ` (12 preceding siblings ...)
  2017-01-05 19:46 ` [PATCH 13/16] nss: fix for x32 Christopher Larson
@ 2017-01-05 19:46 ` Christopher Larson
  2017-01-05 19:46 ` [PATCH 15/16] gnome-desktop3: fix for x32 Christopher Larson
  2017-01-05 19:46 ` [PATCH 16/16] webkitgtk: patch & disable JIT " Christopher Larson
  15 siblings, 0 replies; 22+ messages in thread
From: Christopher Larson @ 2017-01-05 19:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

Apply patch to fix the X32 build from https://github.com/sjnewbury/x32

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 .../libunwind/libunwind/libunwind-1.1-x32.patch    | 31 ++++++++++++++++++++++
 meta/recipes-support/libunwind/libunwind_git.bb    |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 meta/recipes-support/libunwind/libunwind/libunwind-1.1-x32.patch

diff --git a/meta/recipes-support/libunwind/libunwind/libunwind-1.1-x32.patch b/meta/recipes-support/libunwind/libunwind/libunwind-1.1-x32.patch
new file mode 100644
index 0000000..3251646
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind/libunwind-1.1-x32.patch
@@ -0,0 +1,31 @@
+From 506bd37bd580d7382d7c58257dac4b1e502a887c Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 09:50:34 -0700
+Subject: [PATCH] Fix for X32
+
+Apply patch to fix the X32 build from https://github.com/sjnewbury/x32.
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ src/x86_64/Gos-linux.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/x86_64/Gos-linux.c b/src/x86_64/Gos-linux.c
+index 9e1acfc..8169d5a 100644
+--- a/src/x86_64/Gos-linux.c
++++ b/src/x86_64/Gos-linux.c
+@@ -143,8 +143,8 @@ x86_64_sigreturn (unw_cursor_t *cursor)
+ 
+   Debug (8, "resuming at ip=%llx via sigreturn(%p)\n",
+              (unsigned long long) c->dwarf.ip, sc);
+-  __asm__ __volatile__ ("mov %0, %%rsp;"
+-                        "mov %1, %%rax;"
++  __asm__ __volatile__ ("mov %q0, %%rsp;"
++                        "mov %q1, %%rax;"
+                         "syscall"
+                         :: "r"(sc), "i"(SYS_rt_sigreturn)
+                         : "memory");
+-- 
+2.8.0
+
diff --git a/meta/recipes-support/libunwind/libunwind_git.bb b/meta/recipes-support/libunwind/libunwind_git.bb
index 4249430..b637c5c 100644
--- a/meta/recipes-support/libunwind/libunwind_git.bb
+++ b/meta/recipes-support/libunwind/libunwind_git.bb
@@ -11,6 +11,7 @@ SRC_URI = "git://git.sv.gnu.org/libunwind.git \
            file://0001-Fix-build-on-mips-musl.patch \
            file://0001-add-knobs-to-disable-enable-tests.patch \
            file://0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \
+           file://libunwind-1.1-x32.patch \
            "
 
 SRC_URI_append_libc-musl = " file://musl-header-conflict.patch"
-- 
2.8.0



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

* [PATCH 15/16] gnome-desktop3: fix for x32
  2017-01-05 19:46 [PATCH 00/16] Various fixes for x32 Christopher Larson
                   ` (13 preceding siblings ...)
  2017-01-05 19:46 ` [PATCH 14/16] libunwind: apply a patch to fix x32 Christopher Larson
@ 2017-01-05 19:46 ` Christopher Larson
  2017-01-05 19:46 ` [PATCH 16/16] webkitgtk: patch & disable JIT " Christopher Larson
  15 siblings, 0 replies; 22+ messages in thread
From: Christopher Larson @ 2017-01-05 19:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

Explicitly use strftime+strptime rather than snprintf+atol. This fixes the
build for X32, where long's size doesn't match that of time_t.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 ...op-thumbnail-don-t-convert-time_t-to-long.patch | 72 ++++++++++++++++++++++
 .../gnome-desktop/gnome-desktop3_3.22.2.bb         |  2 +
 2 files changed, 74 insertions(+)
 create mode 100644 meta/recipes-gnome/gnome-desktop/gnome-desktop/gnome-desktop-thumbnail-don-t-convert-time_t-to-long.patch

diff --git a/meta/recipes-gnome/gnome-desktop/gnome-desktop/gnome-desktop-thumbnail-don-t-convert-time_t-to-long.patch b/meta/recipes-gnome/gnome-desktop/gnome-desktop/gnome-desktop-thumbnail-don-t-convert-time_t-to-long.patch
new file mode 100644
index 0000000..18a069f
--- /dev/null
+++ b/meta/recipes-gnome/gnome-desktop/gnome-desktop/gnome-desktop-thumbnail-don-t-convert-time_t-to-long.patch
@@ -0,0 +1,72 @@
+From adfa0c8f9fec1faac4bea6a94d947ea32e585923 Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 20:39:51 -0700
+Subject: [PATCH] gnome-desktop-thumbnail: don't convert time_t to long
+
+Explicitly use strftime+strptime rather than snprintf+atol. This fixes the
+build for X32, where long's size doesn't match that of time_t.
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ libgnome-desktop/gnome-desktop-thumbnail.c | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/libgnome-desktop/gnome-desktop-thumbnail.c b/libgnome-desktop/gnome-desktop-thumbnail.c
+index 3946309..b756333 100644
+--- a/libgnome-desktop/gnome-desktop-thumbnail.c
++++ b/libgnome-desktop/gnome-desktop-thumbnail.c
+@@ -126,6 +126,8 @@
+  * Since: 2.2
+  */
+ 
++#define _XOPEN_SOURCE
++
+ #include <config.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -1483,6 +1485,7 @@ save_thumbnail (GdkPixbuf  *pixbuf,
+   char *tmp_path = NULL;
+   int tmp_fd;
+   char mtime_str[21];
++  struct tm *tmp_mtime = NULL;
+   gboolean ret = FALSE;
+   GError *error = NULL;
+   const char *width, *height;
+@@ -1502,7 +1505,11 @@ save_thumbnail (GdkPixbuf  *pixbuf,
+     goto out;
+   close (tmp_fd);
+ 
+-  g_snprintf (mtime_str, 21, "%ld",  mtime);
++  tmp_mtime = localtime (&mtime);
++  if (!tmp_mtime)
++    goto out;
++  strftime (mtime_str, 21, "%s", tmp_mtime);
++  free (tmp_mtime);
+   width = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::Image::Width");
+   height = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::Image::Height");
+ 
+@@ -1695,6 +1702,7 @@ gnome_desktop_thumbnail_is_valid (GdkPixbuf          *pixbuf,
+ {
+   const char *thumb_uri, *thumb_mtime_str;
+   time_t thumb_mtime;
++  struct tm tmp_mtime;
+   
+   thumb_uri = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::URI");
+   if (!thumb_uri)
+@@ -1705,7 +1713,11 @@ gnome_desktop_thumbnail_is_valid (GdkPixbuf          *pixbuf,
+   thumb_mtime_str = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::MTime");
+   if (!thumb_mtime_str)
+     return FALSE;
+-  thumb_mtime = atol (thumb_mtime_str);
++  if (!strptime (thumb_mtime_str, "%s", &tmp_mtime))
++    return FALSE;
++  thumb_mtime = mktime (&tmp_mtime);
++  if (!thumb_mtime)
++    return FALSE;
+   if (mtime != thumb_mtime)
+     return FALSE;
+   
+-- 
+2.8.0
+
diff --git a/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.22.2.bb b/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.22.2.bb
index e4e9d2f..e72c6ce 100644
--- a/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.22.2.bb
+++ b/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.22.2.bb
@@ -10,6 +10,8 @@ inherit gnome pkgconfig upstream-version-is-even gobject-introspection
 SRC_URI[archive.md5sum] = "3d7222d5305f3db022eca31d8108e02d"
 SRC_URI[archive.sha256sum] = "51d7ebf7a6c359be14c3dd7a022213e931484653815eb10b0131bef4c8979e1c"
 
+SRC_URI += "file://gnome-desktop-thumbnail-don-t-convert-time_t-to-long.patch"
+
 DEPENDS += "intltool-native gnome-common-native gsettings-desktop-schemas gconf virtual/libx11 gtk+3 glib-2.0 startup-notification xkeyboard-config iso-codes udev"
 
 inherit distro_features_check gtk-doc
-- 
2.8.0



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

* [PATCH 16/16] webkitgtk: patch & disable JIT for x32
  2017-01-05 19:46 [PATCH 00/16] Various fixes for x32 Christopher Larson
                   ` (14 preceding siblings ...)
  2017-01-05 19:46 ` [PATCH 15/16] gnome-desktop3: fix for x32 Christopher Larson
@ 2017-01-05 19:46 ` Christopher Larson
  15 siblings, 0 replies; 22+ messages in thread
From: Christopher Larson @ 2017-01-05 19:46 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

It might not be speedy, but it does build now.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 .../webkit/webkitgtk/x32_support.patch             | 22 ++++++++++++++++++++++
 meta/recipes-sato/webkit/webkitgtk_2.14.2.bb       |  7 +++++++
 2 files changed, 29 insertions(+)
 create mode 100644 meta/recipes-sato/webkit/webkitgtk/x32_support.patch

diff --git a/meta/recipes-sato/webkit/webkitgtk/x32_support.patch b/meta/recipes-sato/webkit/webkitgtk/x32_support.patch
new file mode 100644
index 0000000..fea4c27
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/x32_support.patch
@@ -0,0 +1,22 @@
+From: Daniel Schepler <dschepler@gmail.com>
+Subject: Fix FTBFS in x32
+Bug-Debian: https://bugs.debian.org/700795
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Index: webkitgtk/Source/WTF/wtf/Platform.h
+===================================================================
+--- webkitgtk.orig/Source/WTF/wtf/Platform.h
++++ webkitgtk/Source/WTF/wtf/Platform.h
+@@ -182,8 +182,12 @@
+ /* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */
+ #if   defined(__x86_64__) \
+     || defined(_M_X64)
++#ifdef __ILP32__
++#define WTF_CPU_X86_64_32 1
++#else
+ #define WTF_CPU_X86_64 1
+ #endif
++#endif
+ 
+ /* CPU(ARM64) - Apple */
+ #if (defined(__arm64__) && defined(__APPLE__)) || defined(__aarch64__)
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.14.2.bb b/meta/recipes-sato/webkit/webkitgtk_2.14.2.bb
index 46b5468..9720432 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.14.2.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.14.2.bb
@@ -20,6 +20,7 @@ SRC_URI = "http://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
            file://0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch \
            file://0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch \
            file://detect_atomics.patch \
+           file://x32_support.patch \
            "
 
 SRC_URI[md5sum] = "2fe3cadbc546d93ca68a13756c2be015"
@@ -85,6 +86,12 @@ EXTRA_OECMAKE_append_toolchain-clang = " -DUSE_LD_GOLD=OFF "
 # JIT not supported on MIPS either
 EXTRA_OECMAKE_append_mipsarch = " -DENABLE_JIT=OFF "
 
+# JIT not supported on X32
+# An attempt was made to upstream JIT support for x32 in
+# https://bugs.webkit.org/show_bug.cgi?id=100450, but this was closed as
+# unresolved due to limited X32 adoption.
+EXTRA_OECMAKE_append_linux-gnux32 = " -DENABLE_JIT=OFF"
+
 SECURITY_CFLAGS_remove_aarch64 = "-fpie"
 SECURITY_CFLAGS_append_aarch64 = " -fPIE"
 
-- 
2.8.0



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

* Re: [PATCH 09/16] boost: drop flags bits, fix for x32
  2017-01-05 19:46 ` [PATCH 09/16] boost: drop flags bits, fix " Christopher Larson
@ 2017-01-05 20:29   ` Burton, Ross
  2017-01-05 20:31     ` Christopher Larson
  0 siblings, 1 reply; 22+ messages in thread
From: Burton, Ross @ 2017-01-05 20:29 UTC (permalink / raw)
  To: Christopher Larson; +Cc: Christopher Larson, OE-core

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

On 5 January 2017 at 19:46, Christopher Larson <kergoth@gmail.com> wrote:

> +Upstream-Status: Pending
>

I think Inappropriate is more fitting here, but you're brave for daring to
look into bjam. :)

Ross

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

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

* Re: [PATCH 09/16] boost: drop flags bits, fix for x32
  2017-01-05 20:29   ` Burton, Ross
@ 2017-01-05 20:31     ` Christopher Larson
  2017-01-09 19:03       ` Khem Raj
  0 siblings, 1 reply; 22+ messages in thread
From: Christopher Larson @ 2017-01-05 20:31 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

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

On Thu, Jan 5, 2017 at 1:29 PM, Burton, Ross <ross.burton@intel.com> wrote:

> On 5 January 2017 at 19:46, Christopher Larson <kergoth@gmail.com> wrote:
>
>> +Upstream-Status: Pending
>>
>
> I think Inappropriate is more fitting here, but you're brave for daring to
> look into bjam. :)
>

That’s a good point, I’ll fix it on the branch. Thanks!
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics

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

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

* Re: [PATCH 09/16] boost: drop flags bits, fix for x32
  2017-01-05 20:31     ` Christopher Larson
@ 2017-01-09 19:03       ` Khem Raj
  0 siblings, 0 replies; 22+ messages in thread
From: Khem Raj @ 2017-01-09 19:03 UTC (permalink / raw)
  To: Christopher Larson; +Cc: OE-core

it will be interesting to know some performance changes due to this patch if any

On Thu, Jan 5, 2017 at 12:31 PM, Christopher Larson <kergoth@gmail.com> wrote:
>
> On Thu, Jan 5, 2017 at 1:29 PM, Burton, Ross <ross.burton@intel.com> wrote:
>>
>> On 5 January 2017 at 19:46, Christopher Larson <kergoth@gmail.com> wrote:
>>>
>>> +Upstream-Status: Pending
>>
>>
>> I think Inappropriate is more fitting here, but you're brave for daring to
>> look into bjam. :)
>
>
> That’s a good point, I’ll fix it on the branch. Thanks!
> --
> Christopher Larson
> kergoth at gmail dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Senior Software Engineer, Mentor Graphics
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>


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

* Re: [PATCH 05/16] gnu-efi: build 64-bit for x32
  2017-01-05 19:46 ` [PATCH 05/16] gnu-efi: build 64-bit " Christopher Larson
@ 2017-01-19 15:32   ` Wold, Saul
  2017-01-19 15:47     ` Christopher Larson
  0 siblings, 1 reply; 22+ messages in thread
From: Wold, Saul @ 2017-01-19 15:32 UTC (permalink / raw)
  To: kergoth@gmail.com, openembedded-core@lists.openembedded.org
  Cc: chris_larson@mentor.com

On Thu, 2017-01-05 at 12:46 -0700, Christopher Larson wrote:
> From: Christopher Larson <chris_larson@mentor.com>
> 
> We're targeting the x86_64 EFI ABI.
> 
Chris, 

Firstly, thanks for all the x32 patches!

I tried to build gnu-efi for x32 via genericx86-64 and still got a
failure about missing the gnu/stubs-64.h. I am building pure x32, is it
possibly you build x32 in a TMPDIR that already had a 64bit build?

There is a generated stubs-x32.h, but not the required -64 variant.

Can you confirm this builds correctly?

Thanks

Sau!

> Signed-off-by: Christopher Larson <chris_larson@mentor.com>
> ---
>  meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb
> b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb
> index 9ddc4ba..e55ab7f 100644
> --- a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb
> +++ b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb
> @@ -52,3 +52,12 @@ BBCLASSEXTEND = "native"
>  # CFLAGS += -mno-mmx -mno-sse
>  # So also remove -mfpmath=sse from TUNE_CCARGS
>  TUNE_CCARGS_remove = "-mfpmath=sse"
> +
> +python () {
> +    ccargs = d.getVar('TUNE_CCARGS', True).split()
> +    if '-mx32' in ccargs:
> +        # use x86_64 EFI ABI
> +        ccargs.remove('-mx32')
> +        ccargs.append('-m64')
> +        d.setVar('TUNE_CCARGS', ' '.join(ccargs))
> +}
> -- 
> 2.8.0
> 

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

* Re: [PATCH 05/16] gnu-efi: build 64-bit for x32
  2017-01-19 15:32   ` Wold, Saul
@ 2017-01-19 15:47     ` Christopher Larson
  0 siblings, 0 replies; 22+ messages in thread
From: Christopher Larson @ 2017-01-19 15:47 UTC (permalink / raw)
  To: Wold, Saul; +Cc: openembedded-core@lists.openembedded.org

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

On Thu, Jan 19, 2017 at 8:32 AM, Wold, Saul <saul.wold@intel.com> wrote:

> On Thu, 2017-01-05 at 12:46 -0700, Christopher Larson wrote:
> > From: Christopher Larson <chris_larson@mentor.com>
> >
> > We're targeting the x86_64 EFI ABI.
> >
> Chris,
>
> Firstly, thanks for all the x32 patches!
>
> I tried to build gnu-efi for x32 via genericx86-64 and still got a
> failure about missing the gnu/stubs-64.h. I am building pure x32, is it
> possibly you build x32 in a TMPDIR that already had a 64bit build?
>
> There is a generated stubs-x32.h, but not the required -64 variant.
>
> Can you confirm this builds correctly?


I'm building x32-only, but admittedly 90% of my builds are with an external
toolchain, so any bugs in the build of the toolchain obviously wouldn't be
encountered in that case. I suspect that's what's happening here, so this
would be a new issue to dive into.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics

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

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

end of thread, other threads:[~2017-01-19 15:48 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-05 19:46 [PATCH 00/16] Various fixes for x32 Christopher Larson
2017-01-05 19:46 ` [PATCH 01/16] valgrind: skip for linux-gnux32 Christopher Larson
2017-01-05 19:46 ` [PATCH 02/16] packagegroup-core-tools-profile: exclude valgrind for x32 Christopher Larson
2017-01-05 19:46 ` [PATCH 03/16] grub-efi: ignore arch mismatch " Christopher Larson
2017-01-05 19:46 ` [PATCH 04/16] lttng-tools: fix " Christopher Larson
2017-01-05 19:46 ` [PATCH 05/16] gnu-efi: build 64-bit " Christopher Larson
2017-01-19 15:32   ` Wold, Saul
2017-01-19 15:47     ` Christopher Larson
2017-01-05 19:46 ` [PATCH 06/16] gnu-efi: ignore arch mismatch " Christopher Larson
2017-01-05 19:46 ` [PATCH 07/16] gummiboot: fix for x32 from systemd-boot Christopher Larson
2017-01-05 19:46 ` [PATCH 08/16] ltp: fix build for x32 Christopher Larson
2017-01-05 19:46 ` [PATCH 09/16] boost: drop flags bits, fix " Christopher Larson
2017-01-05 20:29   ` Burton, Ross
2017-01-05 20:31     ` Christopher Larson
2017-01-09 19:03       ` Khem Raj
2017-01-05 19:46 ` [PATCH 10/16] gstreamer1.0-libav: disable asm " Christopher Larson
2017-01-05 19:46 ` [PATCH 11/16] ffmpeg: " Christopher Larson
2017-01-05 19:46 ` [PATCH 12/16] x264: for x32, disable asm and pass -mx32 Christopher Larson
2017-01-05 19:46 ` [PATCH 13/16] nss: fix for x32 Christopher Larson
2017-01-05 19:46 ` [PATCH 14/16] libunwind: apply a patch to fix x32 Christopher Larson
2017-01-05 19:46 ` [PATCH 15/16] gnome-desktop3: fix for x32 Christopher Larson
2017-01-05 19:46 ` [PATCH 16/16] webkitgtk: patch & disable JIT " Christopher Larson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox