From 861eaf0609de86e16fc992f53b32f622c072a6f6 Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Sat, 29 Sep 2018 10:54:39 +0200 Subject: [PATCH] chromium: fix gcc8 alignof issue on i686 (via Fedora) --- srcpkgs/chromium/patches/gcc8-alignof.patch | 17 +++++++++++++++++ srcpkgs/chromium/template | 4 ---- 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/chromium/patches/gcc8-alignof.patch diff --git a/srcpkgs/chromium/patches/gcc8-alignof.patch b/srcpkgs/chromium/patches/gcc8-alignof.patch new file mode 100644 index 00000000000..90aa32872c3 --- /dev/null +++ b/srcpkgs/chromium/patches/gcc8-alignof.patch @@ -0,0 +1,17 @@ +--- mojo/public/c/system/macros.h.orig 2018-09-06 10:11:54.336432699 -0400 ++++ mojo/public/c/system/macros.h 2018-09-06 10:13:56.555727572 -0400 +@@ -27,7 +27,13 @@ + (sizeof(void*) == 4 ? 32 : 0) + + // Like the C++11 |alignof| operator. +-#if __cplusplus >= 201103L ++#if defined(__GNUC__) && __GNUC__ >= 8 ++// GCC 8 has changed the alignof operator to return the minimal alignment ++// required by the target ABI, instead of the preferred alignment. ++// This means that on 32-bit x86, it will return 4 instead of 8. ++// Use __alignof__ instead to avoid this. ++#define MOJO_ALIGNOF(type) __alignof__(type) ++#elif __cplusplus >= 201103L + #define MOJO_ALIGNOF(type) alignof(type) + #elif defined(__GNUC__) + #define MOJO_ALIGNOF(type) __alignof__(type) diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template index b501b09468f..237bf4df375 100644 --- a/srcpkgs/chromium/template +++ b/srcpkgs/chromium/template @@ -18,10 +18,6 @@ nopie=yes # contains tools that are not PIE, enables PIE itself build_options="clang" desc_option_clang="Use clang to build" -case $XBPS_TARGET_MACHINE in - i686) build_options_default+=" clang" ;; -esac - hostmakedepends="$(vopt_if clang clang) yasm python pkg-config perl gperf bison ninja nodejs hwids libatomic-devel libevent-devel libglib-devel" makedepends="libpng-devel gtk+-devel gtk+3-devel nss-devel pciutils-devel